Properties of concurrent computation
- Non-termination: the program(s) may not terminate, and additionally the output of a program may not be the focus of the computation
- Parallelism: steps of computation can occur simultaneously
- Interference: the meaning of a program may depend on the behaviour of other programs that are being executed
- Non-determinism: the same computations do not always produce the same results
The calculus of communicating systems (CCS)
Milner’s general model:
- A concurrent system is a collection of processes
- A process is an independent agent that may perform internal activities in isolation, or may interact with the environment to perform shared activities
Example of CCS
A vending machine can be represented as follows:
With the following syntax:
- Actions: , ,
- Sequential composition: . (the dot)
- Non-deterministic choice: +
- Terminal process:
Processes perform actions () and become a new process: \begin{aligned}\textsf{coke.coin.}\overline{\textsf{coke\_can}}.0 + \textsf{chocolate.coin.}\overline{\textsf{chocolate\_bar}}.0 &\rightarrow^\textsf{coke} \textsf{coin.}\overline{\textsf{coke\_can}}.0 \\ &\rightarrow^\textsf{coin} \overline{\textsf{coke\_can}}.0 \\ &\rightarrow^\overline{\textsf{coke\_can}} 0 \end{aligned}
Syntax
The simplest possible process is a terminal process, represented by , which is a terminated, inactive, or deadlocked process.
A set of labels for actions: .
- Input actions: represents the receiving of an input
- Output actions: represent the sending of an output
- Internal actions: represents an internal action
The simplest behaviour is sequential action. If is a process, we write to denote the prefixing of with action .
models a system that is ready to perform the action and then it will behave as . i.e.