Does a thread that is blocked cause the process to become blocked? Why and How?

144 Views Asked by At

Does a thread that is blocked cause the process to become blocked? Why and How? Thanks to all experts for answering.

2

There are 2 best solutions below

0
Vtik On BEST ANSWER

A thread is a flow of execution through the process code, with its own program counter, system registers and stack. A thread is also called a light weight process. Threads provide a way to improve application performance through parallelism. Threads represent a software approach to improving performance of operating system by reducing the overhead thread is equivalent to a classical process.

Each thread belongs to exactly one process and no thread can exist outside a process. Each thread represents a separate flow of control.Threads have been successfully used in implementing network servers and web server. They also provide a suitable foundation for parallel execution of applications on shared memory multiprocessors.

So, as you may have guessed, No ! A thread cannot block a process.

0
David Schwartz On

A process cannot be blocked because the concept of "blocked" only applies to a thread of execution. The only meaningful sense in which you could say that a process was blocked is if the process only had one thread and that thread was blocked.