Question 21
EasyWhich of these is a classic process-synchronisation problem?
- A.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Operating Systems
Which of these is a classic process-synchronisation problem?
The knapsack problem
The travelling salesman problem
Binary search
The dining philosophers problem
Sign up free to see the answer and a step-by-step explanation.
In the readers–writers problem, why may several readers access the shared data at the same time?
The data is copied for each reader
Readers are faster than writers
Readers have higher priority by law
Reading does not change the data, so readers cannot interfere with one another
Sign up free to see the answer and a step-by-step explanation.
A semaphore that guards 4 identical printers starts with the value 4. At most how many processes can be printing at the same time?
Any number
4
1
3
Sign up free to see the answer and a step-by-step explanation.
How does a mutex differ from a binary semaphore?
There is no possible difference
A binary semaphore can never be 0
A mutex has an owner: only the thread that locked it should unlock it
A mutex can count up to any number
Sign up free to see the answer and a step-by-step explanation.
Why is disabling interrupts not a good way to get mutual exclusion on a multiprocessor?
Other CPUs can still run and access the shared data
It makes the program use too much memory
It deletes the critical section
Interrupts cannot be disabled on any computer
Sign up free to see the answer and a step-by-step explanation.
What is starvation in process synchronisation?
A process runs out of memory
The CPU stops working
A process waits indefinitely while others keep getting the resource
A process finishes too quickly
Sign up free to see the answer and a step-by-step explanation.
What is the purpose of the exit section of a critical-section solution?
To release the lock so that another process can enter
To end the program
To restart the process
To save the file
Sign up free to see the answer and a step-by-step explanation.
A counting semaphore starts at 5. Seven wait() and four signal() operations are then performed. What is its final value?
Enter a number as the answer.
Sign up free to see the answer and a step-by-step explanation.
Semaphore S starts at 1. Three processes call wait(S) one after another and nobody calls signal(S). How many processes are blocked?
0
3
1
2
Sign up free to see the answer and a step-by-step explanation.
For how many processes does Peterson's solution work?
Two
One
Any number
Three
Sign up free to see the answer and a step-by-step explanation.