next up previous top
Next: SegmentSet
Up: Property
Previous: RPCTypesIn

SegmentDef

Description

The SegmentDef property is used to further specify a SchedProcess component definition. It provides the system designer with the means for describing how the source code implementation of a component is decomposed into segments that have associated execution times.

A segment is an abstraction. It describes a chunk of code in the source code implementation of the schedulable process. The chunk of code it describes may take any form that the designer chooses. For example, it may describe a function, a set of functions, a portion of a single function, or even a few statements within a given function. The designer typically defines segments based on structural and execution time properties of the code in order to facilitate certain types of analyses that can be done on sets of schedulable processes in a real-time environment (e.g., a rate monotonic analysis). Segments are defined in the interface property list of SchedProcess components via the SegmentDef property. The value part of the property defines the name of the segment and associates an execution time (in seconds) with it. Work done in a schedulable process is described by a sequence of one or more segments.

Segments usually represent blocks of code in a process between points where flow of control is transferred. For example, a client process initially receives control from the operating system environment. It performs work until control is transferred either back to the operating system or to some server process (via a remote procedure call). A system designer typcally defines the code that executes between these two points as one or more discrete segments. Each of these segments has an associated execution time which is captured in the second field of the SegmentDef property that defines the segment.

Segment names are used in the value part of the SegmentSet property. This property further specifies RTLoad players by indicating which chunks of code get executed as a result of placing the associated real-time load on a processor in the real-time environment at run-time.

Segment 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 execution times associated with segments in a Trace property are 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. The <floating point number> in the value of the SegmentDef property represents the execution time (in milliseconds) of the chunk of code.

Property Lists

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

Value Syntax

The syntax for a SegmentDef 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 a single <floating point number>.

Required Rule

Optional

There is no default value for the SegmentDef property.

Merge Rule

REPLACE

Subsequent duplicate specifications of the SegmentDef property in a single property list replace earlier specifications (i.e., the last specification is the one that the UniCon compiler uses). Two SegmentDef 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 SegmentDef property:

  1. The <floating point number> in the value part of the SegmentDef property must be greater than 0.

  2. A SchedProcess component must specify at least one SegmentDef property in the property list of the <interface> of the component.

  3. At least one segment defined in a SegmentDef property in a SchedProcess component must be referenced in a SegmentSet property in the property list of some RTLoad player in that component.

Example

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

  INTERFACE IS
    TYPE SchedProcess
    PROCESSOR ("cubistic.art.cs.cmu.edu")
    SEGMENTDEF (work_block1; 0.04)
    SEGMENTDEF (work_block2; 0.03)
    PLAYER services IS RTLoad
      SEGMENTSET (work_block1, work_block2)
    END services
    PLAYER timeget IS RPCDef
      SIGNATURE ("new_type *"; "void")
    END timeget
    PLAYER timeshow IS RPCDef
      SIGNATURE ("void"; "void")
    END timeshow
  END INTERFACE

next up previous top
Next: SegmentSet
Up: Property
Previous: RPCTypesIn

Comments? Mail the current maintainer of this page.

Author: Gregory Zelesnik

Last Modified: May 12, 1996