![]() |
Process |
Each process is executed in an infinite loop. If it tries to read data from an
empty FIFO buffer, it has to wait until the data is available in the buffer.
There is no possibility to pre-examine the buffer content and so the process has to wait
even if other connected input buffers are not empty.
For this reason a process has two different states. Either it is executing its task or it is
blocked because it is trying to read from an empty buffer.
Kahn based his model on the assumption that the FIFO buffers has an infinite size. Therefore no process
will be blocked during the writing on a FIFO buffer.
In practice the FIFO buffers often get a finite size due to a certain implementation or simulation.
So it is possible that a process tries
to write on a full buffer. In this case the process will also be blocked during the writing.
Due to the fact that processes can be blocked a deadlock situation can occur.
The process network has a deadlock if all process are blocked and so the
execution of the process network terminates. Without an intervention from the outside a deadlock
can not be resolved.
Kahn has specified the behaviour of a process in the form of a function written in the programming
language Ada. For the writing and the reading of data the special commands send and wait exist.
With the command Send a process writes data on a buffer and with the
command Wait the process can read data from a buffer.
Within this training module the behaviour of a process is divided into substeps and
a substep is implemented by a java statement.
Figure 11
In this training module the processes are represented by circles (see Figure 11). At the top of the circle the process name (H0) is displayed. Under the process name there are some lines which contain the currently executed substep (i = wait T1). If the process is blocked this will be shown by the string "BLOCKED" at the bottom.
In the following subsections you will find details about the substeps which you can use to specify the behaviour of a process. Also you will see how to create and remove a process and how you can interconnect it with a FIFO buffer.
Back | Next |