Covering Conditions

Let's discuss one last use case of the condition variables, the covering conditions.

We'll cover the following

We’ll now look at one more example of how condition variables can be used. This code study is drawn from Lampson and Redell’s paper on Pilot“Experience with Processes and Monitors in Mesa” by B.W. Lampson, D.R. Redell. Communications of the ACM. 23:2, pages 105-117, February 1980. A terrific paper about how to actually implement signaling and condition variables in a real system, leading to the term “Mesa” semantics for what it mzshortns to be woken up; the older semantics, developed by Tony Hoare, then became known as “Hoare” semantics, which is hard to say out loud in class with a straight face., the same group that first implemented the Mesa semantics described above (the language they used was Mesa, hence the name).

The problem

The problem they ran into is best shown via simple example, in this case in a simple multi-threaded memory allocation library. Given below is a code snippet that demonstrates the issue.

Get hands-on with 1200+ tech skills courses.