11.1. Introduction

In the previous chapter we studied how to implement synchronization primitives for a single computer system with multiple processors. We now show how those primitives may be used to solve concurrent programming problems; we shall need to use several semaphores, for example. On analysing the requirements for solutions we shall investigate:

  • which data structures are shared and writeable and must therefore be accessed under mutual exclusion;

  • how to manage the waiting for access and the waking up of waiting processes;

  • how to manage different categories of processes;

  • how to allow several processes to read at the same time while achieving exclusive access for a writing process.

The chapter ends with a more substantial case study (with ...

Get Operating Systems: Concurrent and Distributed Software Design now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.