In a real-time environment, client schedulable processes are periodic: they do not run forever, and they are periodically reactivated. When a client process is activated, it runs to completion and returns control to the environment. The mechanism by which control is transferred to a client process from the operating system at run-time is called a trigger in UniCon. On the other hand, server processes run continuously. Control is passed to a server process only via remote procedure calls from clients or other servers, meaning that they are aperiodic.
A trigger is an abstraction that describes any number of implementation mechanisms by which control is transferred from the environment. An example of a trigger in the run-time environment is an interrupt generated as a result of a clock timer associated with a process counting down to zero. Only client processes can define triggers, because they begin execution by receiving control from the environment. Server processes do not have triggers because they execute continuously and receive control only as a result of remote procedure calls. Since client processes execute to completion and return to the environment, they can be reactivated by the environment according to some rate (i.e., some number of times per unit of time). Therefore, triggers have associated rates of initiation. Triggers are defined in the interface property list of SchedProcess components via the TriggerDef property. The value part of the property defines the name of the trigger and associates with it the rate (in seconds) at which the trigger is initiated.
NOTE: The UniCon language does not prevent a server process from defining a trigger via a TriggerDef property; however the value of the second field in this case must be asynchronous since server processes run continuously, responding to RPC requests asynchronously.
Trigger names defined in TriggerDef properties are used in the value part of the Trigger property. This property further specifies RTLoad players by indicating which trigger in a SchedProcess component initiates the given real-time load on a processor.
Trigger names are also used in the value part of the Trace property. This property further specifies RTScheduler connector instantiations by describing traces of events that occur in the system of schedulable processes mediated by the connector. An event is a thread of control in a system of such processes. For example, a client process initially receives control from the operating system. This process performs some work, and it may return or it may make a remote procedure call to another process (a server process). If it makes a remote procedure call, the thread of control is transferred to the server process, which performs some work and returns (or makes another remote procedure call, and so on). Control is eventually returned back to the original client process, where work continues in a similar fashion until control is eventually returned back to the environment. This entire thread of control is called an event in UniCon, and can be described by a trace. A trace is a specification of the event. It specifies the trigger, the mechanism by which control is first given to a client schedulable process from the environment, and the sequence of segments that execute as a result of the trigger in the order in which they are executed.
The <floating point number> in the value of the TriggerDef property represents the period (in seconds) of the triggering mechanism. When a trigger is used in a Trace property, the UniCon compiler uses this period value to initialize the schedulable process in the real-time environment to run at the specified rate. The period associated with a trigger in a Trace property is also used in a rate monotonic analysis (RMA) of the schedulable processes mediated by an RTScheduler connector if the algorithm of choice is the rate monotonic algorithm.
There is no default value for the TriggerDef property.
Subsequent duplicate specifications of the TriggerDef property in a single property list replace earlier specifications (i.e., the last specification is the one that the UniCon compiler uses). Two TriggerDef properties are duplicates if the <identifier> or "string" in the first field of both are identical. The case of the letter in the check is significant, however the absence or presence of double-quotes is not.
INTERFACE IS TYPE SchedProcess PROCESSOR ("cubistic.art.cs.cmu.edu") TRIGGERDEF (external_interrupt1; 1.0) TRIGGERDEF (external_interrupt2; 0.5) SEGMENTDEF (work_block1; 0.02) SEGMENTDEF (work_block2; 0.03) SEGMENTDEF (work_block3; 0.05) PLAYER application1 IS RTLoad TRIGGER (external_interrupt1) SEGMENTSET (work_block1, work_block2, work_block3) END application1 PLAYER application2 IS RTLoad TRIGGER (external_interrupt2) SEGMENTSET (work_block1, work_block2, work_block3) END application2 PLAYER timeget IS RPCCall SIGNATURE ("new_type *"; "void") END timeget PLAYER timeshow IS RPCCall SIGNATURE ("void"; "void") END timeshow END INTERFACE
Author:
Last Modified: May 12, 1996