Question:

Deallocation of stack of thread and register contexts will take place.

Show Hint

Deallocation of resources occurs when a thread finishes its execution, which involves freeing up memory and other resources associated with the thread. This typically happens at the thread’s termination.
Updated On: Dec 29, 2024
  • at the termination of thread
  • at the time of thread blocking
  • at the time of thread spawning
  • at the time of unblocking the thread
Hide Solution
collegedunia
Verified By Collegedunia

The Correct Option is A

Solution and Explanation

The stack of the thread and its register context are deallocated when the thread terminates. Deallocation is the process of freeing the resources that were allocated to the thread during its execution. When a thread completes its execution, its resources, such as memory and registers, are released. Hence, this process takes place at the termination of the thread. Deallocation does not take place at the time of blocking, spawning, or unblocking the thread, because in those situations, the thread is either temporarily halted or waiting to be executed. Thus, the correct answer is: (1) at the termination of thread.
Was this answer helpful?
0
0