13.07.2015 Views

An Operating Systems Vade Mecum

An Operating Systems Vade Mecum

An Operating Systems Vade Mecum

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

260 Concurrency Chapter 8ABCDEFGHFigure 8.1 A synchronization graphIproperly limit the amount of concurrency.If we treat each row as a separate activity, then interactions between reading a program,compiling it, and outputting the result are implicit; interactions between this programand another are explicit. If we treat each column as a separate activity, then wehave a card-reader activity, a compilation activity, and an output activity. Each signalsthe next when it has performed all it needs to with respect to one Fortran compilation.Later we will introduce the producers-consumers problem and the readers-writersproblem as more complex synchronization tests. We will also return to the dining philosophersproblem, which we introduced in Chapter 4.2 MECHANISMSWe will now turn to mechanisms that can be used to provide mutual exclusion and synchronization.We will start with simple but conservative techniques and move towardmore complex, liberal ones. In each case we will show how the BeginRegion andEndRegion primitives are built.All mechanisms for mutual exclusion and synchronization depend ultimately onthe synchronous nature of hardware. Some rely on the fact that processors can be madeuninterruptible. These processor-synchronous methods work only for individual processors.Others rely on the fact that main store can service only one access request at atime, even in a multiprocessor. These store-synchronous methods have a wider range ofapplicability.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!