Saturday 21 October 2017

Thread stack

Image result for thread stack


Every process have 4 segments(Text, Data, Heap and Stack). Multiple threads share the Text, Data and Heap segments.But Stack is local to each thread.
Thread State
Each thread exists in a particular execution state at any given time which are below:
  • Running - thread is using CPU
  • Blocked - thread is waiting for input
  • Ready - thread is ready to run (not Blocked or Running)
  • Exited - thread has exited but not been destroyed
Thread Scheduler Queues
Operating system thread scheduler maintains thread kernel objects in different queues based on the state of a thread:
  • Ready queue
  • Waiting
  • Exited queue

No comments:

Post a Comment