Thread control block
Thread Control Block (TCB) is a data structure in an operating system kernel that contains thread-specific information needed to manage the thread. The TCB is "the manifestation of a thread in an operating system."
Each thread has a thread control block. An operating system keeps track of the thread control blocks in kernel memory.
An example of information contained within a TCB is:
- Thread Identifier: Unique id (tid) is assigned to every new thread
- Stack pointer: Points to thread's stack in the process
- Program counter: Points to the current program instruction of the thread
- State of the thread (running, ready, waiting, start, done)
- Thread's register values
- Pointer to the Process control block (PCB) of the process that the thread lives on
The Thread Control Block acts as a library of information about the threads in a system. Specific information is stored in the thread control block highlighting important information about each process.
Sources and credits
This article is adapted from the Wikipedia article “Thread control block”, written by its contributors and licensed under CC BY-SA 4.0. Fathomly has changed the layout, removed citation markers, navigation and maintenance notices, and adjusted punctuation. This adapted version is shared under the same license. For references, see the original article.
Fathomly is not affiliated with or endorsed by the Wikimedia Foundation. Spotted a problem? Tell us.