Next: 3.2.2 Semaphores
Up: 3.2 Synchronization of parallel
Previous: 3.2 Synchronization of parallel
  Contents
3.2.1 Some definitions
Remark :
Sequential programming is only the expression of our inability to
transfer the natural parallelism of the world to a machine.
Problems occur with the administration of parallel processes :
- totally independent processes (only a common power supply)
absolutely parallel (
not in the scope of interest)
- shared use of (limited) resources
multitasking/time-sharing
distribution strategy necessarily
- multiprocessor systems which contribute subtasks
information exchange via shared memory
or message passing (distributed memory).
Synchronization :
Prevention of an undefined status of a variable by means of a mechanism
which allows processes to access on that variable in a defined way.
Barrier :
Certain point in a program which has to be passed by all processes
(or a group of processes) before the execution continues.
This guarantees that each single process has to wait until
also all remaining processes have reached that program point.
Ex.: Undefined status
- An undefined status may occur in the access on shared memory.
Figure 3.3:
Undefined status.
 |
The value of
depends on the
execution speed of processes A, B and is therefore not predictable, i.e.,
the status of
is undefined.
Figure 3.4:
Results in an undefined status
![\begin{figure}Case a) \hfill
\unitlength0.06\textwidth
\begin{picture}(11,1)(0...
...0,0){(2)}}
\put(7,0.5){\makebox(0,0){(3)}}
\end{picture} \ [2ex] \end{figure}](img144.gif) |
For omitting the above undefined status, one has to
regard operations A and B as atomic operations, i.e.,
they cannot be split any further.
Exclusive access on
for one process during
that time is needed to finish the operation.
One realization of exclusive access will be presented in the
next section.
Next: 3.2.2 Semaphores
Up: 3.2 Synchronization of parallel
Previous: 3.2 Synchronization of parallel
  Contents
Gundolf Haase
2000-03-20