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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

6.2 Concurrency and Synchronisation 153<br />

modelled by processes and clusters. Sequential circuits can be modelled by:<br />

collaborating data objects;<br />

a single process object;<br />

collaborating processes in a concurrency boundary.<br />

In general, a synchronous hardware system requires a synchronous clock object that<br />

sends clock-tick messages to all objects that must be synchronised.<br />

S<strong>of</strong>tware can be implemented in various ways. The sort <strong>of</strong> concurrency can be described<br />

using the notion <strong>of</strong> thread. The number <strong>of</strong> threads that can be active simultaneously<br />

determines the sort <strong>of</strong> system. S<strong>of</strong>tware can be implemented as a:<br />

sequential program (the implementation has a single thread <strong>of</strong> control);<br />

quasi-concurrent program by multiprogramming (the implementation has multiple<br />

threads but only one active thread);<br />

concurrent program (the implementation has multiple active threads).<br />

The concepts we <strong>of</strong>fer enable the modelling <strong>of</strong> all these sorts <strong>of</strong> systems. The modelling<br />

<strong>of</strong> sequential s<strong>of</strong>tware is according to what has been described for hardware in<br />

this paragraph. Concurrency can be described by process objects and clusters. A quasiconcurrent<br />

system is in principle a sequential system. Such systems can be implemented<br />

rather effectively using an available (real-time) operating system as basis for communication<br />

and task scheduling. A first exploration <strong>of</strong> the path from a POOSL model to<br />

a quasi-concurrent implementation in C++ is described by J.D. van Felius [vF96]. He<br />

describes the development <strong>of</strong> a PEC (POOSL Extension <strong>of</strong> C++) library that enables<br />

the mapping <strong>of</strong> the communication primitives <strong>of</strong> POOSL to C++. Quasi concurrency<br />

is achieved by using threads based on the IEEE Portable Operating System Interface<br />

(POSIX) standard 1003.1c (also called Pthreads).<br />

6.2.2.8 Interleaving Semantics<br />

So far we treated concurrency mainly from the point <strong>of</strong> view <strong>of</strong> analysis and implementation.<br />

A more formal approach towards concurrency was necessary for the development<br />

<strong>of</strong> the formal semantics <strong>of</strong> POOSL. The formal semantics are a computational interleaving<br />

semantics. The execution <strong>of</strong> a system <strong>of</strong> collaborating instances is modelled as the<br />

interleaving <strong>of</strong> all atomic actions (see Section 9.5). This means that the behaviour <strong>of</strong> a<br />

system is interpreted as a sequential execution <strong>of</strong> actions. In the semantic model nothing<br />

happens really simultaneously, except for a rendezvous. This can be accepted if actions<br />

are assumed to take zero time. Concurrency <strong>of</strong> two processes then boils down to a mutual<br />

independence <strong>of</strong> their actions. It does not matter whether a process performs some<br />

action after or before an action <strong>of</strong> another process. This reasoning enables concurrency<br />

with an interleaving semantics.

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

Saved successfully!

Ooh no, something went wrong!