O'Reilly logo

Operating Systems: Concurrent and Distributed Software Design by Tim Harris, Jean Bacon

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

12.3. Synchronization at the granularity of operations

In Chapter 11 we programmed a cyclic buffer between many producers and many consumers. In the solution, producers first checked whether a slot was free, and consumers whether an item was available; then exclusive access to the buffer was ensured among producers or among consumers. One producer and one consumer could access different parts of the buffer at the same time.

The development from critical regions to conditional critical regions and then to monitors combined concurrency control and encapsulation. In order to carry out an operation on a shared object a process first calls a monitor procedure, which may involve a delay, waiting to enter the monitor. Once inside the monitor the process ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required