Question

In: Computer Science

When a kernel thread dies, what OS data structures are updated?

When a kernel thread dies, what OS data structures are updated?

Solutions

Expert Solution

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 :

  • 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
  • Thread State : Running, Ready, Waiting, Start, Done
  • Thread's register values
  • Pointer to the Process control block (PCB) of the process that the thread lives on

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"


Related Solutions

1. Why there needs to be user thread and kernel thread? 2. What are the advantages...
1. Why there needs to be user thread and kernel thread? 2. What are the advantages and disadvantages of writing an operating system in a highlevel language, such as C? 3. What is a critical section problem? Demonstrate that with an example. 4. With an example, show how critical section can led to dead locks. 5. Write two differences between a network OS and a distributed OS. 6. Identify the following environments as hard, firm or soft real time. Give...
Thread scheduling at the process level and at the kernel level. This topic requires more work...
Thread scheduling at the process level and at the kernel level. This topic requires more work on my part and I will give an updated draft. There may be more than one question here. Review the different allocation policies for kernel threads in relation to user threads – one to one, many to one, many to many, hybrid. These are sometimes referred to as an “M:N ratio” where M is the number of user threads and N is the number...
Name one advantage of associating user threads with kernel thread? Suggest an advantage and disadvantage of...
Name one advantage of associating user threads with kernel thread? Suggest an advantage and disadvantage of using mailboxes over shared memory for inter-process communication.
In Chapter 5, we discussed possible race conditions on various kernel data structures. Most scheduling algorithms...
In Chapter 5, we discussed possible race conditions on various kernel data structures. Most scheduling algorithms maintain a run queue, whichlistsprocesseseligibletorunonaprocessor.Onmulticoresystems, there are two general options: (1) each processing core has its own run queue, or (2) a single run queue is shared by all processing cores. What are the advantagesand disadvantages of each of these approaches?
Threads: Assume a multithreaded application using user level threads mapped to a single kernel level thread...
Threads: Assume a multithreaded application using user level threads mapped to a single kernel level thread in one process (Many to one model). Describe the details of what happens when a thread (i.e. thread 1) executes a blocking system call (5 points). Describe what happens when thread 1 yields control to another user level thread, namely thread 2, in the same process. (NOTE: include the following in your description: what state is saved?, where is it saved? What state is...
At what point is an intervivos trust considered to be funded? When the grantor: a. dies...
At what point is an intervivos trust considered to be funded? When the grantor: a. dies b. transfers to the trust the title of property to be held in the trust c. signs the trust document
Explain how the modular kernel design combines the benefits of both the layered and microkernel structures.
Explain how the modular kernel design combines the benefits of both the layered and microkernel structures.
DATA STRUCTURES   What is returned when calling this method with the singly list contains (1,5,5,7,8)   public...
DATA STRUCTURES   What is returned when calling this method with the singly list contains (1,5,5,7,8)   public static int m1(SinglyList  list1) {   if(list1.size()!=2) return list1.removeFirst()+m1(list1);      return s; }
what is the HR path a 9-10 solar mass star takes when it dies
what is the HR path a 9-10 solar mass star takes when it dies
What is the difference between a process and a thread? What prevents complete thread independence? Give...
What is the difference between a process and a thread? What prevents complete thread independence? Give one specific example of a dependency. What are the advantages/disadvantages of designing a concurrent program using threads versus events?
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT