|This article needs additional citations for verification. (June 2008) (Learn how and when to remove this template message)|
In computing, a process is an instance of a computer program that is being executed. A process always exists in exactly one process state. A process that is blocked is one that is waiting for some event, such as a resource becoming available or the completion of an I/O operation.
- the CPU
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 used to prevent this concurrent use. When the other task is blocked, it is unable to execute until the first task has finished using the shared resource.
Programming languages and scheduling algorithms are designed to minimize the over-all effect blocking. A process that blocks may prevent local work-tasks from progressing. In this case "blocking" often is seen as not wanted. However, such work-tasks may instead have been assigned to independent processes, where halting one has no or little effect on the others, since scheduling will continue. An example is "blocking on a channel" where passively waiting for the other part (no polling or spin loop) is part of the semantics of channels. Correctly engineered any of these may be used to implement reactive systems.
Deadlock means that processes pathologically wait for each other in a circle. As such it is not directly associated with blocking.
Once the event occurs for which the process is waiting ("is blocked on"), the process is advanced from blocked state to an imminent one, such as runnable.
- Non-blocking algorithm
- Non-blocking synchronization
- Concurrent computing
- Race condition
- Scheduling (computing)
- Data dependency
- Stallings, William (2004). Operating Systems: Internals and Design Principles (5th ed.). Prentice Hall.
|This operating-system-related article is a stub. You can help Wikipedia by expanding it.|