What would be the process state in a multi threaded process, in which threads are in different states (running, waiting, blocked etc)

  • 3
    $\begingroup$ Wouldn't it be a mapping from the threads to their individual states? $\endgroup$ – Dave Clarke Nov 8 '12 at 11:50

In short, the lifecycle of thread does not interfere with the lifecycle of a process.

Processes and threads have different execution cycles; threads will execute and die while their process will continue to run until it gets a exit, truncate or die call due to normal execution (or in case of deadlock handling).

  • If a process contains only one thread, then if the thread is running, the process is in its running state. Otherwise, it can go into ready, wait, or die.
  • If a process contains multiple threads, it will execute until all jobs are completed. If a thread goes inactive it will not end a process; a process may enter ready state or be in running state.
  • $\begingroup$ i may have not explained properly but i hope you get what i want to say.... $\endgroup$ – swapyonubuntu Nov 8 '12 at 19:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.