What would be the process state in a multi threaded process, in which threads are in different states (running, waiting, blocked etc)
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.