HOME

TheInfoList



OR:

In
computer science Computer science is the study of computation, automation, and information. Computer science spans theoretical disciplines (such as algorithms, theory of computation, information theory, and automation) to practical disciplines (includin ...
, concurrency is the ability of different parts or units of a program,
algorithm In mathematics and computer science, an algorithm () is a finite sequence of rigorous instructions, typically used to solve a class of specific problems or to perform a computation. Algorithms are used as specifications for performing ...
, or
problem Problem solving is the process of achieving a goal by overcoming obstacles, a frequent part of most activities. Problems in need of solutions range from simple personal tasks (e.g. how to turn on an appliance) to complex issues in business an ...
to be
executed Capital punishment, also known as the death penalty, is the State (polity), state-sanctioned practice of deliberately killing a person as a punishment for an actual or supposed crime, usually following an authorized, rule-governed process to ...
out-of-order or in
partial order In mathematics, especially order theory, a partially ordered set (also poset) formalizes and generalizes the intuitive concept of an ordering, sequencing, or arrangement of the elements of a set. A poset consists of a set together with a binary ...
, without affecting the outcome. This allows for parallel execution of the concurrent units, which can significantly improve overall speed of the execution in multi-processor and multi-core systems. In more technical terms, concurrency refers to the decomposability of a program, algorithm, or problem into order-independent or partially-ordered components or units of computation. According to Rob Pike, concurrency is the composition of independently executing computations, and concurrency is not parallelism: concurrency is about dealing with lots of things at once but parallelism is about doing lots of things at once. Concurrency is about structure, parallelism is about execution, concurrency provides a way to structure a solution to solve a problem that may (but not necessarily) be parallelizable. A number of mathematical models have been developed for general concurrent computation including Petri nets, process calculi, the parallel random-access machine model, the actor model and the Reo Coordination Language.


History

As Leslie Lamport (2015) notes, "While
concurrent program 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 sys ...
execution had been considered for years, the computer science of concurrency began with Edsger Dijkstra's seminal 1965 paper that introduced the mutual exclusion problem. ... The ensuing decades have seen a huge growth of interest in concurrency—particularly in distributed systems. Looking back at the origins of the field, what stands out is the fundamental role played by Edsger Dijkstra".


Issues

Because computations in a concurrent system can interact with each other while being executed, the number of possible execution paths in the system can be extremely large, and the resulting outcome can be
indeterminate Indeterminate may refer to: In mathematics * Indeterminate (variable), a symbol that is treated as a variable * Indeterminate system, a system of simultaneous equations that has more than one solution * Indeterminate equation, an equation that ha ...
. Concurrent use of shared resources can be a source of indeterminacy leading to issues such as deadlocks, and resource starvation. Design of concurrent systems often entails finding reliable techniques for coordinating their execution, data exchange, memory allocation, and execution scheduling to minimize
response time Response time may refer to: *The time lag between an electronic input and the output signal which depends upon the value of passive components used. *Responsiveness, how quickly an interactive system responds to user input *Response time (biology) ...
and maximise throughput.


Theory

Concurrency theory has been an active field of research in
theoretical computer science Theoretical computer science (TCS) is a subset of general computer science and mathematics that focuses on mathematical aspects of computer science such as the theory of computation, lambda calculus, and type theory. It is difficult to circumsc ...
. One of the first proposals was Carl Adam Petri's seminal work on Petri nets in the early 1960s. In the years since, a wide variety of formalisms have been developed for modeling and reasoning about concurrency.


Models

A number of formalisms for modeling and understanding concurrent systems have been developed, including: * The parallel random-access machine * The actor model * Computational bridging models such as the bulk synchronous parallel (BSP) model * Petri nets * Process calculi ** Calculus of communicating systems (CCS) ** Communicating sequential processes (CSP) model ** π-calculus * Tuple spaces, e.g., Linda * Simple Concurrent Object-Oriented Programming (SCOOP) * Reo Coordination Language * Trace monoids Some of these models of concurrency are primarily intended to support reasoning and specification, while others can be used through the entire development cycle, including design, implementation, proof, testing and simulation of concurrent systems. Some of these are based on message passing, while others have different mechanisms for concurrency. The proliferation of different models of concurrency has motivated some researchers to develop ways to unify these different theoretical models. For example, Lee and Sangiovanni-Vincentelli have demonstrated that a so-called "tagged-signal" model can be used to provide a common framework for defining the denotational semantics of a variety of different models of concurrency, while Nielsen, Sassone, and Winskel have demonstrated that category theory can be used to provide a similar unified understanding of different models. The Concurrency Representation Theorem in the actor model provides a fairly general way to represent concurrent systems that are closed in the sense that they do not receive communications from outside. (Other concurrency systems, e.g., process calculi can be modeled in the actor model using a two-phase commit protocol.Frederick Knabe. A Distributed Protocol for Channel-Based Communication with Choice PARLE 1992.) The mathematical denotation denoted by a closed system is constructed increasingly better approximations from an initial behavior called using a behavior approximating function to construct a denotation (meaning ) for as follows: :: In this way, can be mathematically characterized in terms of all its possible behaviors.


Logics

Various types of temporal logic can be used to help reason about concurrent systems. Some of these logics, such as
linear temporal logic In logic, linear temporal logic or linear-time temporal logic (LTL) is a modal temporal logic with modalities referring to time. In LTL, one can encode formulae about the future of paths, e.g., a condition will eventually be true, a condition will ...
and computation tree logic, allow assertions to be made about the sequences of states that a concurrent system can pass through. Others, such as
action computational tree logic Action may refer to: * Action (narrative), a literary mode * Action fiction, a type of genre fiction * Action game, a genre of video game Film * Action film, a genre of film * Action (1921 film), ''Action'' (1921 film), a film by John Ford * Ac ...
, Hennessy–Milner logic, and Lamport's temporal logic of actions, build their assertions from sequences of ''actions'' (changes in state). The principal application of these logics is in writing specifications for concurrent systems.


Practice

Concurrent programming encompasses programming languages and algorithms used to implement concurrent systems. Concurrent programming is usually considered to be more general than
parallel programming Parallel computing is a type of computation in which many calculations or processes are carried out simultaneously. Large problems can often be divided into smaller ones, which can then be solved at the same time. There are several different f ...
because it can involve arbitrary and dynamic patterns of communication and interaction, whereas parallel systems generally have a predefined and well-structured communications pattern. The base goals of concurrent programming include ''correctness'', ''performance'' and ''robustness''. Concurrent systems such as
Operating system An operating system (OS) is system software that manages computer hardware, software resources, and provides common daemon (computing), services for computer programs. Time-sharing operating systems scheduler (computing), schedule tasks for ef ...
s and Database management systems are generally designed to operate indefinitely, including automatic recovery from failure, and not terminate unexpectedly (see
Concurrency control In information technology and computer science, especially in the fields of computer programming, operating systems, multiprocessors, and databases, concurrency control ensures that correct results for concurrent operations are generated, while ...
). Some concurrent systems implement a form of transparent concurrency, in which concurrent computational entities may compete for and share a single resource, but the complexities of this competition and sharing are shielded from the programmer. Because they use shared resources, concurrent systems in general require the inclusion of some kind of arbiter somewhere in their implementation (often in the underlying hardware), to control access to those resources. The use of arbiters introduces the possibility of
indeterminacy in concurrent computation Indeterminacy in concurrent computation is concerned with the effects of indeterminacy in concurrent computation. Computation is an area in which indeterminacy is becoming increasingly important because of the massive increase in concurrency due ...
which has major implications for practice including correctness and performance. For example, arbitration introduces
unbounded nondeterminism In computer science, unbounded nondeterminism or unbounded indeterminacy is a property of concurrency by which the amount of delay in servicing a request can become unbounded as a result of arbitration of contention for shared resources ''while ...
which raises issues with model checking because it causes explosion in the state space and can even cause models to have an infinite number of states. Some concurrent programming models include
coprocess In computer science, a coprocess is a process that explicitly yields control to other processes or the operating system. In Unix, a coprocess is a process that sends its output solely to the exact single process from which it solely received input. ...
es and
deterministic concurrency Coroutines are computer program components that generalize subroutines for non-preemptive multitasking, by allowing execution to be suspended and resumed. Coroutines are well-suited for implementing familiar program components such as cooperative m ...
. In these models, threads of control explicitly yield their timeslices, either to the system or to another process.


See also

* Chu space * Client–server network nodes * Clojure *
Cluster may refer to: Science and technology Astronomy * Cluster (spacecraft), constellation of four European Space Agency spacecraft * Asteroid cluster, a small asteroid family * Cluster II (spacecraft), a European Space Agency mission to study th ...
nodes *
Concurrency control In information technology and computer science, especially in the fields of computer programming, operating systems, multiprocessors, and databases, concurrency control ensures that correct results for concurrent operations are generated, while ...
*
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 sys ...
*
Concurrent object-oriented programming Concurrent object-oriented programming is a programming paradigm which combines object-oriented programming (OOP) together with concurrency. While numerous programming languages, such as Java, combine OOP with concurrency mechanisms like threads, ...
* Concurrency pattern * Construction and Analysis of Distributed Processes (CADP) * D (programming language) * Distributed system * Elixir (programming language) *
Erlang (programming language) Erlang ( ) is a general-purpose, concurrent, functional programming language, and a garbage-collected runtime system. The term Erlang is used interchangeably with Erlang/OTP, or Open Telecom Platform (OTP), which consists of the Erlang ru ...
*
Go (programming language) Go is a statically typed, compiled programming language designed at Google by Robert Griesemer, Rob Pike, and Ken Thompson. It is syntactically similar to C, but with memory safety, garbage collection, structural typing, and CSP-style ...
* Gordon Pask * International Conference on Concurrency Theory (CONCUR) *
OpenMP OpenMP (Open Multi-Processing) is an application programming interface (API) that supports multi-platform shared-memory multiprocessing programming in C, C++, and Fortran, on many platforms, instruction-set architectures and operating sy ...
* Parallel computing * Partitioned global address space *
Processes 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 ...
* Ptolemy Project *
Rust (programming language) Rust is a multi-paradigm, general-purpose programming language. Rust emphasizes performance, type safety, and concurrency. Rust enforces memory safety—that is, that all references point to valid memory—without requiring the use of a ...
*
Sheaf (mathematics) In mathematics, a sheaf is a tool for systematically tracking data (such as sets, abelian groups, rings) attached to the open sets of a topological space and defined locally with regard to them. For example, for each open set, the data could ...
*
Threads Thread may refer to: Objects * Thread (yarn), a kind of thin yarn used for sewing ** Thread (unit of measurement), a cotton yarn measure * Screw thread, a helical ridge on a cylindrical fastener Arts and entertainment * ''Thread'' (film), 2016 ...
* X10 (programming language) * Structured concurrency


References


Further reading

* * * * * * Distefano, S., & Bruneo, D. (2015). ''Quantitative assessments of distributed systems: Methodologies and techniques'' (1st ed.). Somerset: John Wiley & Sons Inc. * Bhattacharyya, S. S. (2013;2014;). ''Handbook of signal processing systems'' (Second;2;2nd 2013; ed.). New York, NY: Springer.10.1007/978-1-4614-6859-2 * Wolter, K. (2012;2014;). ''Resilience assessment and evaluation of computing systems'' (1. Aufl.;1; ed.). London;Berlin;: Springer. {{ISBN, 9783642290329


External links


Process Algebra Diary - Prof. Luca Aceto's blog on Concurrency TheoryConcurrent Systems
a
The WWW Virtual Library
given a
scaleconf
Edsger W. Dijkstra