Mutual Exclusion

Critical Regions
2002 views
Critical Regions

How do we avoid race conditions? The key to preventing trouble here and in many other situations involving shared memory, shared files, and shared everything else is to find some way to forbid more than one process from reading and writing the shared data at the same time.

Peterson's Solution
2913 views
Peterson's Solution

By combining the idea of taking turns with the idea of lock variables and warning variables, a Dutch mathematician, T. Dekker, was the first one to plan a software solution to the mutual exclusion problem that does not require strict alternation. For a discussion of Dekker's algorithm, see (Dijkstra,

Monitors
2087 views
Monitors

With semaphores and mutexes interprocess communication looks easy, right? Forget it. Look closely at the order of the downs before inserting or removing items from the buffer in Semaphores Figigure 1. Assume that the two downs in the producer's code were reversed in

Page 0 of 1 Previous 1 Next