Timed Multitasking

The timed multitasking (TM) domain, created by Jie Liu, offers a model of computation based on priority-driven multitasking, as common in real-time operating systems (RTOSs), but with more deterministic behavior. In TM, actors (conceptually) execute as concurrent threads in reaction to inputs. The domain provides an event dispatcher, which maintains a prioritized event queue. The execution of an actor is triggered by the event dispatcher by invoking first its prefire() method. The actor may begin execution of a concurrent thread at this time. Some time later, the dispatcher will invoke the fire() and postfire() methods of the actor (unless prefire() returns false).

The amount of time that elapses between the invocation of prefire() and fire() depends on the declared executionTime and priority of the actor (or more specifically, of the port of the port receiving the triggering event). The domain assumes there is a single resource, the CPU, shared by the execution of all actors. At one particular time, only one of the actors can get the resource and execute. Execution of one actor may be preempted by another eligible actor with a higher priority input event. If an actor is not preempted, then the amount of time that elapses between prefire() and fire() equals the declared. executionTime. If it is preempted, then it equals the sum of the executionTime and the execution times of the actors that preempt it. The model of computation is more deterministic than the usual priority-driven multitasking because the actor produces outputs (in its fire() method) only after it has been assured access to the CPU for its declared executionTime. In this domain, the model time may be synchronized to real time or not.

References

  1. Jie Liu and Edward A. Lee, "Timed Multitasking for Real-Time Embedded Software," Invited paper in IEEE Control System Magazine, special issue on "Advances in Software Enabled Control", January 31, 2002.