Question: 4. An adaptive mutex is a semaphore that makes a decision as to whether or not to busy wait depending upon the state of
4. An adaptive mutex is a semaphore that makes a decision as to whether or not to busy wait depending upon the state of other processes in a multi-processor system. When a process attempts to wait on a semaphore, the following is done (for simplicity, we consider a mutex between two processes only): wait (Semaphore S) { S.value = S.value - 1; if (S.value < 0) { /* Some other process P holds the semaphore */ P = process in critical region for semaphore S; if (state (P) == running) ( while (S.value < 0) /* busy wait */ no-op; } else { add calling process to wait list for S; block calling process; What is the rationale for providing such a semaphore?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
