Back to CS 240

Mesa Monitors Reading Question

Please submit your response on Gradescope by Tuesday, October 1, 2024, 4:30 PDT.

  1. Explain from the Mesa paper: "[…] while any procedure suitable for forking can also be called sequentially, the converse is not generally true."

  2. Consider the memory allocation code in the Mesa paper.
    1. The paper states this code has a bug. What is it and what is the fix?
    2. Intuitively, how would you change this code to work with Hoare wakeup semantics?
    3. What happens if we make Expand an Entry routine?
    4. What happens if we make the wait call just put the current thread at the end of the run queue?
    5. Give the main monitor invariant for this code.