ArticleslgStudy

computer science

Task Control Block

Task Control Block is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Task Control Block rather than just read about it. In short: The Task Control Block (TCB) is a data structure which contains the state of a task in, e.g., OS/360 and successors on IBM System/360 architecture and successors. 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 TCB contains, among other data, non-dispatchability flags and the general and floating point registers for a task that is not currently assigned to a CP…

Key takeaways

  • Task Control Block belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Task Control Block to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Task Control Block from memory before moving on to harder problems.

Reference excerpt

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

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 TCB 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 blocks (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 Block An IRB is used to handle an asynchronous exit. Program Request Block A PRB represents a module invoked with an ATTACH macro, a LINK macro or a synchronous exit. System Interruption Request Block An SIRB is used to run I/O error recovery code. Supervisor Request Blocks 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:

Is not running on another CPU Does not have any non-dispatchability flags set Has a top RB with a zero wait count. The system maintains a pair 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 OS/360 and successors Thread control block

Notes

References

Worked examples

Example 1 — a first encounter with Task Control Block

Start with the simplest possible case. Write down what Task Control Block claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Task Control Block before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Task Control Block ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Task Control Block

In research
Task Control Block appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Task Control Block in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Task Control Block is common in secondary-school and first-year university syllabi. It links to neighbouring topics Process (computing), so understanding it makes those chapters shorter.
In everyday life
Look for Task Control Block outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Task Control Block” →

How to study Task Control Block in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Task Control Block means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Task Control Block out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Task Control Block in simple terms?

The Task Control Block (TCB) is a data structure which contains the state of a task in, e.g., OS/360 and successors on IBM System/360 architecture and successors. 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 TCB contains, among other data…

Why does Task Control Block matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Task Control Block?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Task Control Block.

Tags

  • Process (computing)

Keep exploring