1. OVERVIEW
We are studying the interaction of concurrent sequential processes.
Each process is a sequence of process steps. We may define process steps to be any unit approporiate to the discussion. We consider them atomic -- we don't care what takes place within them.
Processes perform operations on resources.
Most of the resources we are concerned with are serially reusable. They may be reused, but only by one process at a time. Some resources, such as messages, are consumable; they are used once and disappear.
2. PRINCIPAL PROBLEMS
Processes that do not intentionally communicate interact due to competition for finite resources. In this case we address two main problems: determinism and scheduling.
The problem of preserving determinisim, discussed below, is addressed by study of mutual exclusion, synchronization, and deadlock.
The scheduling problem is to ensure that criteria based on peformance and fairness can be met in the presence of continual competition for resources.
The scheduling problem arises primarily for processors and memory. These resources are continuously needed by all processes, so there is almost always competition and waiting.
Other resources are needed only occasionally. For these, the primary issues are mutual exclusion and deadlock.
3. DETERMINISM
A process has the property of determinism if its outputs are determined only by its inputs, that is, not by the actions of other processes or the operating system. This does not include a timing guarantee, except that the process must complete eventually.
Our goal is to preserve this property while allowing resources to be shared. This should be possible, provided that
We may model the actions of a process in terms of its effect on the state of a system, consisting of all storage and I/O. The set of all state elements read by a process is called its read set. The set of all state elements written by a process is called its write set.
There is a potential conflict between processes only if the write set of one overlaps the read set of another. In this case we have a risk of violating determinism, unless we can maintain mutual exclusion and avoid deadlock.
4. MUTUAL EXCLUSION
We identify four conditions required for a satisfactory solution to mutual exclusion. These were first stated by Dijkstra:
5. DEADLOCK
There are three main strategies to overcome deadlock:
Two limitations on the use of the deadlock avoidance algorithm are:
6. IMPORTANT CONTRIBUTORS
Some important contributors to the study of concurrency are: