In: Computer Science
When a kernel thread dies, what OS data structures are updated?
Answer: When a kernel thread dies, Thread Control Block (TCB) is updated.
Thread Control Block (TCB) is a data structure that keeps track of all the thread-specific information in the operating system.
Process Control Block(PCB) keep track of the processes.
Each PCB points to a list of TCBs, Since a process can have one or more threads (it has to have at least one thread).
Each kernel level thread has Thread Table (TCB) as well as the Process Table (PCB).
Entries in TCB :
Thus change in state of kernel thread will modify TCB.
PCB maintains information about process. It points to TCB. Chnage in state of thread will not change PCB until process state is changed because of "killed thread"