Menu
Home Explore People Places Arts History Plants & Animals Science Life & Culture Technology
On this page
Task Control Block
Instance of a process control block within IBM OS/360 and successor systems

The Task Control Block (TCB) contains the state of a task in, e.g., OS/360 and successors on IBM System/360 architecture and successors.

We don't have any images related to Task Control Block yet.
We don't have any YouTube videos related to Task Control Block yet.
We don't have any PDF documents related to Task Control Block yet.
We don't have any Books related to Task Control Block yet.
We don't have any archived web articles related to Task Control Block yet.

The TCB in OS/360 and successors

In OS/360, OS/VS1, SVS, MVS/370, MVS/XA, MVS/ESA, OS/390 and z/OS, the TCB234: 311–321  contains, among other data, non-dispatchability flags and the general and floating point registers for a task that is not currently assigned to a CPU.

A TCB provides an anchor for a linked list of other, related request blocks5: 269–301  (RBs); the top-linked RB for a TCB contains the Program status word (PSW) when the task is not assigned to a CPU.

When the control program's dispatcher selects a TCB to be dispatched, the dispatcher loads registers from the TCB and loads the PSW from the top RB of the TCB, thereby dispatching the unit of work.

Request Blocks

OS/360 has the following types of request blocks

Interruption Request Block6: 281–284  An IRB is used to handle an asynchronous exit.7 Program Request Block8: 285–287  A PRB represents a module invoked with an ATTACH macro, a LINK macro or a synchronous exit.9 System Interruption Request Block10: 289–291  An SIRB is used to run I/O error recovery code. Supervisor Request Blocks11: 293–301  An SVRB represents the execution of a Type 2, Type 3 or Type 4 SVC routine

An RB contains several fields, among them an old PSW, old general registers, a PSW and a wait count.

Dispatching

The Dispatcher is a routine in the nucleus that selects the work to be dispatched. It selects the highest priority task that:

  1. Is not running on another CPU
  2. Does not have any non-dispatchability flags set
  3. Has a top RB with a zero wait count.

The system maintains a pair12 of TCB pointers known as TCB old and TCB new. A TCB new pointer of zero causes the dispatcher to search for an eligible task.

When the dispatcher finds an eligible task, it sets the old and new TCB pointers. loads the registers from the TCB and loads the PSW from the top RB.

If the dispatcher fails to find eligible work, it enters an enabled wait.

History

With the introduction of MVS/370 and successor systems, a whole new environment was introduced: the Service Request Block (SRB), which generally has a higher priority than any Task Control Block, and, indeed, which itself has two distinct priorities: a Global SRB (priority over all local address space SRBs and TCBs) and a Local SRB (priority over only the local address space TCBs); and MVS's dispatcher must manage all of these with absolute consistency across as many as two processors (MVS/370) and as many as sixteen processors (successor systems).

See also

Notes

References

  1. Roughly analogous to a thread in UNIX-like operating systems. /wiki/Thread_(computing)

  2. IBM System/360 Operating System - Fixed-Task Supervisor - Program Number 360S-CI-505 (PDF). Program Logic (Third ed.). February 1967. Y28-6612-2. http://www.bitsavers.org/pdf/ibm/360/os/plm_1966-67/Y28-6612-2_Fixed-Task_Supervisor_PLM_Sep67.pdf

  3. IBM System/360 Operating System - MVT Supervisor (PDF). Program Logic (Eighth ed.). May 1973. GY28-6659-7. Retrieved March 14, 2022. http://bitsavers.org/pdf/ibm/360/os/R21.7_Apr73/plm/GY28-6659-7_MVT_Supervisor_PLM_Rel_21.7_May73.pdf

  4. IBM System/360 Operating System: System Control Blocks - OS Release 21.7 (PDF). Systems Reference Library (Tenth ed.). IBM. April 1973. GC28-6628-9. Retrieved June 12, 2022. http://bitsavers.org/pdf/ibm/360/os/R21.7_Apr73/GC28-6628-9_OS_System_Ctl_Blks_R21.7_Apr73.pdf

  5. IBM System/360 Operating System: System Control Blocks - OS Release 21.7 (PDF). Systems Reference Library (Tenth ed.). IBM. April 1973. GC28-6628-9. Retrieved June 12, 2022. http://bitsavers.org/pdf/ibm/360/os/R21.7_Apr73/GC28-6628-9_OS_System_Ctl_Blks_R21.7_Apr73.pdf

  6. IBM System/360 Operating System: System Control Blocks - OS Release 21.7 (PDF). Systems Reference Library (Tenth ed.). IBM. April 1973. GC28-6628-9. Retrieved June 12, 2022. http://bitsavers.org/pdf/ibm/360/os/R21.7_Apr73/GC28-6628-9_OS_System_Ctl_Blks_R21.7_Apr73.pdf

  7. An asynchronous routine to handle an exception, timer event or other signal.

  8. IBM System/360 Operating System: System Control Blocks - OS Release 21.7 (PDF). Systems Reference Library (Tenth ed.). IBM. April 1973. GC28-6628-9. Retrieved June 12, 2022. http://bitsavers.org/pdf/ibm/360/os/R21.7_Apr73/GC28-6628-9_OS_System_Ctl_Blks_R21.7_Apr73.pdf

  9. Unprivileged callback routine. /wiki/Callback_(computer_programming)

  10. IBM System/360 Operating System: System Control Blocks - OS Release 21.7 (PDF). Systems Reference Library (Tenth ed.). IBM. April 1973. GC28-6628-9. Retrieved June 12, 2022. http://bitsavers.org/pdf/ibm/360/os/R21.7_Apr73/GC28-6628-9_OS_System_Ctl_Blks_R21.7_Apr73.pdf

  11. IBM System/360 Operating System: System Control Blocks - OS Release 21.7 (PDF). Systems Reference Library (Tenth ed.). IBM. April 1973. GC28-6628-9. Retrieved June 12, 2022. http://bitsavers.org/pdf/ibm/360/os/R21.7_Apr73/GC28-6628-9_OS_System_Ctl_Blks_R21.7_Apr73.pdf

  12. In 65MP there is a pair for each CPU; in MVS there are pointers for each address space. /wiki/65MP