Blocking (scheduling)
From Wikipedia, the free encyclopedia
In a multitasking computer system, individual tasks, or threads of execution, must share the resources of the system. These resources might be:
- the CPU
- network
- memory
- disk
or any other shared resource.
When one task is using a resource, it is generally not possible, or desirable, for another task to access it. The techniques of mutual exclusion are often used to prevent one piece of software using a resource before another has finished with it.
When this occurs, the second task is said to be blocked, and is unable to execute until the first task has finished using the shared resource. Programming languages and scheduling algorithms are designed to minimize this blocking, and to prevent the case of deadlock, where two or more tasks are blocked, waiting for a resource that the other holds.