23.08.2013 Views

Specification of Reactive Hardware/Software Systems - Electronic ...

Specification of Reactive Hardware/Software Systems - Electronic ...

Specification of Reactive Hardware/Software Systems - Electronic ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

154 Modelling <strong>of</strong> Concurrent <strong>Reactive</strong> Behaviour<br />

The modelling <strong>of</strong> interleaving semantics define concurrency formally as a statement<br />

about the arbitrary ordering <strong>of</strong> actions:<br />

a ¢ b ab ba<br />

The parallel composition ( ¢ ) <strong>of</strong> actions a and b is interpreted as the behaviour in which<br />

action a precedes action b or ( ) in which action b precedes action a.<br />

This semantic model can be thought to use a time scale with a fine enough grain. Actions<br />

can be mapped upon this time scale, so that each action has an unique point in time. The<br />

only actions that can be performed simultaneously are the joined actions that together<br />

result in a synchronous communication.<br />

This model does not work for the parallel composition on the level <strong>of</strong> processes. In<br />

general the parallel composition <strong>of</strong> processes A and B cannot be modelled by interleaving<br />

<strong>of</strong> the behaviour <strong>of</strong> the processes as a whole:<br />

¢ A ¡ B AB BA<br />

We cannot accept that the complete behaviour A is performed before B or vice versa.<br />

Such processes would not be concurrent at all. Notice also that the behaviour <strong>of</strong> a process<br />

may be non-terminating. In this case it would be possible that the other process could<br />

never perform any action. So the interleaving should not be on the level <strong>of</strong> processes<br />

but on the level <strong>of</strong> the atomic internal actions performed by processes.<br />

In contrast to events or actions that happen in an arbitrary order, the actions performed<br />

by parallel processes in general have a real overlap in the time. To make the semantic<br />

model more realistic, it has to be extended with a notion <strong>of</strong> time. We come back to this<br />

subject in Section 6.7.<br />

6.2.3 Synchronisation<br />

Communication between both process objects and data objects is realised by synchronous<br />

message passing. If two objects pass a message, they are engaged in a rendezvous.<br />

This is the moment that both objects synchronise their activities.<br />

6.2.3.1 Non-Determinism<br />

America [AR89a] identifies the main problem <strong>of</strong> concurrency to be non-determinism. Synchronisation<br />

and mutual exclusion are mechanisms that can reduce non-determinism. A<br />

well known solution to extend sequential object-oriented languages with parallelism is<br />

to add processes as orthogonal concepts 1 . America states that the addition <strong>of</strong> processes<br />

as orthogonal concept is not a proper way to solve the non-determinism problem.<br />

Having processes as an orthogonal concept enables having more than one object active<br />

1 This notion <strong>of</strong> process is another concept than our process objects.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!