# Multiple processors

## Multiple processors

## Sometimes, strict sequential ordering is neither necessary or desirable.

## x = 0; // P

## y = 0; // Q

## z = 0; // R

## Example

## In the example, it is not necessary to execute P ® Q ®R. If we had three CPUs, we could execute the three statements in parallel. We denote this in the formal notation as P || Q || R. This does not mean that P, Q & R must be executed in parallel, it simple states that their execution may overlap. More formally || means:

## P || Q « exists e: not (P ® Q) and not (Q ® P)

## P and Q are concurrent if and only if there exists at least one legal execution of the program in which P and Q overlap.