OS Process Synchronization
for P10 is identical except that it uses V(mutex) instead of P(mutex). What is the largest number of processes that can be inside the critical section at any moment (the mutex being initialized to 1)?
1
2
3
None of the mentioned
3
Any one of the 9 processes can get into critical section after executing P(mutex) which decrements the mutex value to 0. At this time P10 can enter critical section by incrementing the value to 1. Now any of the 9 processes can enter the critical section by again decrementing the mutex value to 0. None of the remaining processes can get into their critical sections.
3 Any one of the 9 processes can get into critical section after executing P(mutex) which decrements the mutex value to 0. At this time P10 can enter critical section by incrementing the value to 1. Now any of the 9 processes can enter the critical section by again decrementing the mutex value to 0. None of the remaining processes can get into their critical sections.
Related posts
In the bounded buffer problem ____________A. there is only one buffer
B. there are n buffers ( n being greater than one but finite)
C. there are infinite buffers
D. the buffer size is bounded
A minimum of _____ variable(s) is/are required to be shared between processes to solve the critical section problem.
A. one
B. two
C. three
D. four
In the bounded buffer problem, there are the empty and full semaphores that ____________
A. count the number of empty and full buffers
B. count the number of empty and full memory spaces
C. count the number of empty and full queues
D. none of the mentioned
The bounded buffer problem is also known as ____________
A. Readers โ Writers problem
B. Dining โ Philosophers problem
C. Producer โ Consumer problem
D. None of the mentioned
If the semaphore value is negative ____________
A. its magnitude is the number of processes waiting on that semaphore
B. it is invalid
C. no operation can be further performed on it until the signal operation is performed on it
D. none of the mentioned
The monitor construct ensures that ____________
A. only one process can be active at a time within the monitor
B. n number of processes can be active at a time within the monitor (n being greater than 1)
C. the queue has only one process in it at a time
D. all of the mentioned
A locking protocol is one that ____________
A. governs how locks are acquired
B. governs how locks are released
C. governs how locks are acquired and released
D. none of the mentioned
Leave a Reply