gtpm6m0i | Main Supervisor Reference |
The entry control block (ECB) is the primary interface between real-time programs and the control program. Programs that require an ECB to operate are called ECB-controlled or E-type programs. An ECB is created for each new entry in the system and assigned an activation number, which is obtained from a system counter in OPZERO. This activation number determines which version of the E-type program the ECB will use. All references to system resources and register usage are maintained in the ECB. The ECB remains associated with the entry for which it was created until the entry is completely processed. After the entry is processed, the ECB is returned to the pool of available ECB storage blocks (see Managing Storage). ECB processing includes:
The ECB initialization routine, OPZERO, initializes an ECB for each new entry in the system. OPZERO is usually activated by the CXFRC macro or by the control program polling the various communication lines for incoming messages.
OPZERO does the following:
CSECT | Segment | ECB Initialization for |
---|---|---|
CCCCP1 | CLPE | 1052/3215 console entries |
CCCCP2 | CLSQ | High-speed line entries |
CCCCP3 | CLQC | Synchronous link control (SLC) entries |
CCCCP4 | CLOC | Entries from 3270 local devices |
CCCCP5 | CRMR | Binary synchronous communication (BSC) entries |
CCCSNA | CS10 | Systems Network Architecture (SNA) entries |
Control program segments use the control transfer, CXFRC, to create an ECB and transfer control to another program that is then free to use any control program macros. By using CXFRC, you can create an ECB immediately or defer creation. You can also create an ECB with an attached block.
The CXFRC macro obtains the current activation number from OPZERO and assigns it to the ECB that is being created.
When an active ECB needs to create a second ECB to perform independently, it can issue one of the following create macros:
These create macros, except for the CRETC macro, assign the second ECB the same activation number as the parent ECB. The CRETC macro obtains the current activation number from OPZERO and assigns it to the second ECB.
The create macros are serviced by the control transfer routine (CXFRC).
When E-type programs need to request the services of other E-type programs, they use Enter/Back macros. E-type programs, which can reside in file storage, virtual file access (VFA) buffers, or main storage in either the 24- or 31-bit core resident program areas or in a common block are brought into main storage upon request for execution. Enter/Back macros perform the following tasks:
Enter macros are used to transfer control as follows:
There are two distinct sets of macros that you can use to suspend processing of an entry. The first set of macros are the defer, delay, and event macros which you can use to immediately force an active entry to be suspended. These macros provide only limited control over a suspended entry.
The second set of macros are the load-balancing and time-slicing macros. These macros allow more control over when an entry gets suspended and when the entry resumes running. The load-balancing macros allow an entry to be suspended and unsuspended based on the availability of system resources. The time-slicing macro allows an entry to be suspended and unsuspended based on user-specified time intervals.
Macros are provided that permit the entry currently in control in an I-stream engine to request processing to be suspended. A suspended entry is placed on the input or deferred CPU loop list (dispatch control list) or in the event table. The following macros are used to suspend processing:
DEFRC and DLAYC macro requests are different from a WAITC request. WAITC is related to the completion of an I/O operation; if no I/O is pending, no delay occurs. DLAYC and DEFRC macro requests place the entry at the bottom of a list; their use is usually related to indicators to be set by other programs associated with the program that requests the suspension.
The EVNTC macro is used to name an event which is an item in the event table. The EVNWC macro is used to specify, through a field in the event table that is known to all parties, that a bit-setting event should occur before the entry regains control (after the EVNWC is specified). This removes the need for an ECB-controlled program to continue to place itself on the deferred list each time the event fails; the checking is driven by timers in the control program and the entry is placed on the ready list when the event occurs.
Two macros are provided to help to automatically control system activity. One macro can be used to suspend low-priority work during peak or busy periods. The other macro provides a way to force CPU-intensive applications to repeatedly give up control after running for a specified period of time. The macros are:
When you run one of these macros, the macro service routine sets up the appropriate ECB fields and return conditions. In most cases, control returns to the entry through the common macro exit routine. In other cases, the entry does not immediately get back control. The entry is placed on the suspend list instead, and the system task dispatcher (CPU loop) receives control.
While suspended, ECBs that issued the LODIC or TMSLC macros reside on a suspend list. The suspend list is checked once every pass through all items on the input list.
The EXIT routine does the processing necessary to remove an entry from the system. All of the exiting entry's resources are returned to the control program. These resources can include storage blocks, programs, data records, unit record devices and tapes. The EXIT routine checks fields in the ECB for the status of these resources, returns the resources, and ultimately releases the ECB. You can activate the EXIT routine explicitly with the EXITC macro, or system error programs can invoke it. (See Error Recovery).