CSC 553 - Operating Systems
Dr. R. M. Siegfried
Assignment #5 - p. 248/5.1, Semaphores vs Monitors
Due Tuesday, October 10, 2023
5.1
Demonstrate the correct of Dekker's Algorithm:
- Show that mutual exclusion is enforced. Hint: Show that when
Pi enters its critical section, the following expression is true:
flag[i] and ( not flag[1 - i])
- Show that a process requiring access to its critical section will not be
delayed indefinitely. Hint: Consider the following cases: (1) a single
process is attempted to enter the critical section; (2) both processes are
attempting to enter the critical section, and (2a)
turn = 0
and (2b) turn = 0
and
flag[0] = true
.
Semaphores vs Monitor
In class, we discussed semaphores and monitor, it was said that semaphores
are generally regarded as lower level operations than monitors. Why would we
view in this way? Give one example that illustrates why this would be true?
[Back to the Assignments Index]