next up previous top
Next: Variant
Up: Property
Previous: Trigger

TriggerDef

Description

The TriggerDef property is used to further specify a SchedProcess component definition. It provides the system designer with the means for associating a SchedProcess component with a mechanism by which the schedulable process receives control from the real-time operating system environment at run-time. Additionally, the property associates a rate at which this mechanism transfers control to the schedulable process (i.e., how often control is transferred per unit of time).

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.

Property Lists

The TriggerDef property can legally be specified in the property list in the following
UniCon language element:

Value Syntax

The syntax for a TriggerDef property consists of two fields, separated by a semicolon, enclosed in parentheses. The first field is a single <identifier> or "string". The second field is either a single <floating point number>, or the word
asynchronous.

Required Rule

Optional

There is no default value for the TriggerDef property.

Merge Rule

REPLACE

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.

Semantic Checks

The following semantic checks are performed on the value of the TriggerDef property:

  1. The second field of the value of a TriggerDef property must be a <floating point number> or the word asynchronous.

  2. If the second field contains a <floating point number>, then the value of that number must be greater than 0.

  3. A "client" SchedProcess component may only specify periodic triggers with the TriggerDef property. A periodic trigger is one that represents a positive period in milliseconds. This is specified by a positive <floating point number> in the second field of a TriggerDef property. A client schedulable process may not define an asynchronous trigger. A client SchedProcess is defined to be one in which at least one RPCCall player, and no RPCDef players, is defined in the interface.

  4. A client SchedProcess component must define at least one trigger with a
    TriggerDef property in its <interface> property list.

  5. A "server" SchedProcess component may only specify aperiodic triggers with the TriggerDef property. An aperiodic trigger is one in which there is no period. The process receives control asynchronously in response to remote procedure calls from other processes. This is specified by the keyword asynchronous in the second field of a TriggerDef property. A server SchedProcess is defined to be one in which at least one RPCDef player, and any number of RPCCall players, are defined in the interface.

  6. At least one trigger defined in a TriggerDef property in a client SchedProcess component must be the value of a Trigger property in the property list of an RTLoad player in that component.

Example

The following are examples of specifications of TriggerDef properties. They are embedded in the <interface> of a definition of a SchedProcess component.:

  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

next up previous top
Next: Variant
Up: Property
Previous: Trigger

Comments? Mail the current maintainer of this page.

Author: Gregory Zelesnik

Last Modified: May 12, 1996