Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started