Assume the usual general instructions!
Version 1: disable interrupts -- prevent other activity on this CPU wait on spin lock -- block if other CPU in critical section .. critical section .. release spin lock -- allow other CPUs into critical section enable interrupts -- allow other activity on this CPU Version 2: wait on spin lock -- block if other CPU in critical section disable interrupts -- prevent other activity on this CPU .. critical section .. enable interrupts -- allow other activity on this CPU release spin lock -- allow other CPUs into critical section
The Problem In the event that some critical variable is updated in both an interrupt service routine and in a regular routine, one of these two code fragments is prone to deadlock. Which of the above is deadlock prone, and how does it deadlock?
Therefore, we seek another implementation. Consider having a single list of processes that is shared by all processes attempting to send a message to any box of a given process.
Part A: Outline the logic of the receive kernel call for this approach.
Part B: Outline the logic of the send kernel call for this approach.
Part C: In light of the above, what is the data structure of one process, at the level of detail presented in lecture 30 (only go into detail for those parts that are different from the notes for lecture 30).