gtpm6m0lMain Supervisor Reference

Dispatching Work

The system task dispatcher, which is also known as the CPU loop, dispatches all activity for a particular I-stream. Each I-stream in a CPC has its own set of CPU loop lists. The system task dispatcher (CPU LOOP) CSECT CCCLHR contains the CPU loop support code. The equate macro, CLHEQ, defines working storage constants necessary for CPU loop list management.

The CPU loop services four dispatch control lists and a number of unique program switches. Processing work items consists of serially scanning the loop and (1) removing a task from one of the lists or (2) finding one of the switches set to indicate that some event that requires processing (such as a clock update request or a keypoint update) has occurred.

Priority scheduling of jobs is not present in the TPF system. In the TPF system, interrupt routines do not call the dispatcher to check for dispatching priorities when interrupt processing is completed. Interrupt routines always return to the interrupted program, placing the system's priority on work in progress rather than on new work.

The dispatcher is activated when a task either completes or enters WAIT state. The CPU loop lists are processed in the following order:

  1. Cross list
  2. Ready list
  3. Input list
  4. Deferred list.

In addition to the four main CPU loop lists, there are two secondary lists. These two lists, which are checked once every pass through all items on the input list, are:

The structure of these lists and the processing theory incorporated in their design is discussed in detail in TPF Concepts and Structures.

The dispatcher also controls system activity levels. During CPU loop execution, the dispatcher checks the available number of different types of storage blocks against threshold numbers for each block type. TPF sets these threshold limits at system generation time in terms of frames, common blocks, ECBs, I/O control blocks (IOCBs) and system work blocks (SWBs). You can change these values with the ZACLV command (see TPF Operations for more details). When the dispatcher checks, if the number of blocks is not in the threshold value, no work is dispatched until additional resources are available.