Is there a way to implement semaphores that allow blocking without underlying operating system support? Why or why not?
No, there is no way to implement semaphores that allow blocking
without underlying operating system support. This is beacuse the
semaphore values are kept in a table stored in kernel memory. A
semaphore is identified by a number corresponding to a
position
in this table.
There are system calls for creating or freeing semaphores, as
well
as for executing the wait and signal operations. These
operations
are executed in supervisor mode and hence atomically.
(interrupts
are disabled in supervisor mode).
Get Answers For Free
Most questions answered within 1 hours.