0 0 votes How could an operating system that can disable interrupts implement semaphores? Operating System tanenbaum operating-system process-and-threads interrupts semaphore descriptive + – admin 1.5k views answer comment Share Follow Print 0 reply Please log in or register to add a comment.
0 0 votes Answer: The operating system disables interrupts for doing the semaphore operation. After this it reads out the value of the semaphore, if the value is down and the value of the semaphore is $0$, it keeps the calling processes in the list containing all the blocked processes which are connected with the semaphore. If the semaphore is performing an up operation, it must inspect to see if there is any processes that are blocked on the semaphore. One of the processes is eliminated from the list containing the blocked processes and is made runnable if one or the more processes are blocked. After the completion of these operations, we can enable the interrupts again. `JEET answered Oct 26, 2019 `JEET comment Share Follow 0 reply Please log in or register to add a comment.