next up previous contents
Next: The event-based approach Up: Program structure Previous: The event scheduling

Primitives and event states

When an event is activated it can be manipulated in various ways. The event can be appended to a queue, it can be put back in the scheduler and so on. On its way it changes state. We identify the following states an event can be in (based on the simula states) :

The various primitives that manipulate the event and cause the change of state are then:

The invoking of a primitive has not always effect. The event should be in the correct state first. The invoking of the hold primitive for example assumes a passive or active event. This state can be obtained by first passivating or activating the event.

Consider the following transition diagram that shows the different states an event can be in, in relationship with the different functions, that manipulate them. The central state of an event is the passive state. Most events should first be passivated before they continue. Notice that an event also changes state if it is pending and is due to execute. This event (the first event in the scheduler) is extracted from the scheduler and becomes active. An event that is on the conditional list stays conditional while executing until it is explicitly passivated.

 

Entities

An entity (that combines several related events) has the same states and primitives as an event. The difference is in the use of an additional phase, as is explained in section 3.4.



next up previous contents
Next: The event-based approach Up: Program structure Previous: The event scheduling



A Eliens
Tue Oct 31 09:27:21 MET 1995