Graphics Programs Reference
In-Depth Information
3.4.2
An example with the age memory policy
As an example of the use of the age memory policy, consider the timed
PN system depicted in Fig. 3.12. This net models the activity of a single
processor in a MIMD (multiple instruction multiple data) computer archi-
tecture. The processor operates in a multitasking environment, executing a
set of concurrent tasks performing cyclic activities. These activities include
a local operation phase, followed by a request for service addressed to one
of the neighbor processors. Each processor is available to provide service
to requests coming from the neighbors. Requests coming from outside have
priority over local activities, and thus preempt them. The external requests
are modelled by the loop: p ext req , t req start , p req exe , T req end , p ext , T ext . To-
kens in p local read y represent local ready tasks waiting for processor service,
which starts (one process at a time) when transition t start fires. The token
in p exec models the process activity and enables timed transition T end . If a
request for service arrives from a neighbor (firing of T ext ), one token moves
to p ext req , the immediate transition t req start fires and removes the token
from p not ext req , thus disabling T end . The active process is temporarily sus-
pended (the timer associated with T end is halted), but it will be restarted
after the firing of T req end , when the processor resumes the interrupted ac-
tivity. The age memory policy is necessary to capture the fact that the
reading reached by the timer associated with T end is kept to avoid forget-
ting the amount of work already performed on the local request. Obviously,
when the timer associated with T end expires, the transition fires. The timer
associated with the transition will be reset at a new initial value when the
transition becomes enabled again after firing.
As we observed before, there may be situations in which the enabling mem-
ory and age memory policies must coexist within a timed PN model. An
example can be provided again by the multiprocessor system of Fig. 3.11
where the time-out mechanism is used to allow processor 2 to quickly ac-
cess the common resource. If the interruption of the access of processor 1
can be implemented without losing the useful work already performed by
processor 1 before the interruption, an age memory policy must be used
for transition T end 1 . In this way, the activity performed by processor 1 on
the common resource before the preemption by processor 2 can be resumed
upon completion of the access of processor 2 without losing the work already
carried on before the interruption.
3.5
Multiple Enabling
Special attention must be paid to the timing semantics in the case of timed
transitions with enabling degree larger than one. Consider transition T 1 in
Fig. 3.13, which is enabled whenever one or more tokens are simultaneously
in places p 1 and p 2 . Different semantics are possible when several tokens are
 
 
Search WWH ::




Custom Search