In
computing
Computing is any goal-oriented activity requiring, benefiting from, or creating computing machinery. It includes the study and experimentation of algorithmic processes, and development of both hardware and software. Computing has scientific, e ...
, a
process
A process is a series or set of activities that interact to produce a result; it may occur once-only or be recurrent or periodic.
Things called a process include:
Business and management
*Business process, activities that produce a specific se ...
is an instance of a computer program that is being executed. A process always exists in exactly one
process state In a multitasking computer system, processes may occupy a variety of states. These distinct states may not be recognized as such by the operating system kernel. However, they are a useful abstraction for the understanding of processes.
Primar ...
. A process that is blocked is one that is waiting for some
event
Event may refer to:
Gatherings of people
* Ceremony, an event of ritual significance, performed on a special occasion
* Convention (meeting), a gathering of individuals engaged in some common interest
* Event management, the organization of e ...
, such as a
resource
Resource refers to all the materials available in our environment which are technologically accessible, economically feasible and culturally sustainable and help us to satisfy our needs and wants. Resources can broadly be classified upon their ...
becoming available or the completion of an
I/O operation.
In a
multitasking computer system, individual
tasks, or
threads of execution, must share the resources of the system.
Shared resource
In computing, a shared resource, or network share, is a computer resource made available from one host to other hosts on a computer network.
It is a device or piece of information on a computer that can be remotely accessed from another compu ...
s include: the CPU, network and network interfaces, memory and disk.
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
In computer science, mutual exclusion is a property of concurrency control, which is instituted for the purpose of preventing race conditions. It is the requirement that one thread of execution never enters a critical section while a concurrent ...
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 language
A programming language is a system of notation for writing computer programs. Most programming languages are text-based formal languages, but they may also be graphical. They are a kind of computer language.
The description of a programming ...
s and
scheduling algorithm
In computing, scheduling is the action of assigning ''resources'' to perform ''tasks''. The ''resources'' may be processors, network links or expansion cards. The ''tasks'' may be threads, processes or data flows.
The scheduling activity is c ...
s 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
Channel, channels, channeling, etc., may refer to:
Geography
* Channel (geography), in physical geography, a landform consisting of the outline (banks) of the path of a narrow body of water.
Australia
* Channel Country, region of outback Austral ...
" where passively waiting for the other part (no polling or spin loop) is part of the semantics of channels.
Go concurrency patterns by Rob Pike
/ref> Correctly engineered any of these may be used to implement reactive systems.
Deadlock
In concurrent computing, deadlock is any situation in which no member of some group of entities can proceed because each waits for another member, including itself, to take action, such as sending a message or, more commonly, releasing a lo ...
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.
See also
*Concurrent computing
Concurrent computing is a form of computing in which several computations are executed '' concurrently''—during overlapping time periods—instead of ''sequentially—''with one completing before the next starts.
This is a property of a syst ...
*Data dependency A data dependency in computer science is a situation in which a program statement (instruction) refers to the data of a preceding statement. In compiler theory, the technique used to discover data dependencies among statements (or instructions) is c ...
*Deadlock
In concurrent computing, deadlock is any situation in which no member of some group of entities can proceed because each waits for another member, including itself, to take action, such as sending a message or, more commonly, releasing a lo ...
*Non-blocking algorithm
In computer science, an algorithm is called non-blocking if failure or suspension of any thread cannot cause failure or suspension of another thread; for some operations, these algorithms provide a useful alternative to traditional blocking im ...
*Race condition
A race condition or race hazard is the condition of an electronics, software, or other system where the system's substantive behavior is dependent on the sequence or timing of other uncontrollable events. It becomes a bug when one or more of t ...
*Scheduling (computing)
In computing, scheduling is the action of assigning ''resources'' to perform ''tasks''. The ''resources'' may be processors, network links or expansion cards. The ''tasks'' may be threads, processes or data flows.
The scheduling activity is c ...
References
Computing terminology
Inter-process communication
Input/output
Scheduling (computing)
{{operating-system-stub