Blocking (computing)
   HOME

TheInfoList



OR:

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, ...
, 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. Prima ...
. A process that is blocked is one that is waiting for some event, 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 ca ...
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" 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 loc ...
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 *
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 loc ...
*
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 i ...
*
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 Sequential logic, dependent on the sequence or timing of other uncontrollable events. It becomes a software ...
*
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