[Solved]-Uestion 2 Consider Implementations Semaphore S Wait Signal Operations Wait O Signal Disabl Q37172512

uestion # 2 Consider the below implementations of a semaphore’s wait and signal operations: wait O signal)* Disable interrupts; sem.value– if (sem.value < 0) ( Disable interrupts; sem.value++ if (sem . value <= 0){ save state (current) ; // current process State[current]- Blocked; //A gets blocked Enqueue(current, sem.queue); current- select from ready queue); State[current]Running; restore state (current); //B starts running k -Dequeue(sem.queue); State[k] -Ready; Enqueue (k, ReadyQueue): Enable interrupts; Enable interrupts; a) What are the critical sections inside the wait and signal operations which are protected by disabling and enabling of interrupts? Show transcribed image text uestion # 2 Consider the below implementations of a semaphore’s wait and signal operations: wait O signal)* Disable interrupts; sem.value– if (sem.value
Expert Answer
Answer to uestion # 2 Consider the below implementations of a semaphore’s wait and signal operations: wait O signal)* Disable inte… . . .
OR

