Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Concurrency (computer science)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{short description|Ability to execute a task in a non-serial manner}} {{Redirect|Concurrent computer|the company|Concurrent Computer Corporation}} {{for multi|a more practical discussion|Concurrent computing|other uses|Concurrency (disambiguation)}} Concurrency refers to the ability of a system to execute multiple tasks through simultaneous execution or time-sharing (context switching), sharing resources and managing interactions. Concurrency improves responsiveness, throughput, and scalability in modern computing, including: <ref name=":0">{{Cite book |title=Operating System Concepts |date=29 July 2008 |publisher=Wiley |isbn=978-0470128725}}</ref><ref name=":1">{{Cite book |title=Computer Organization and Design: The Hardware/Software Interface |series=The Morgan Kaufmann Series in Computer Architecture and Design |date=2012 |publisher=Morgan Kaufmann |isbn=978-0123747501}}</ref><ref name=":2">{{Cite book |title=Distributed Systems: Concepts and Design |date=2012 |publisher=Pearson |isbn=978-0132143011}}</ref><ref name=":3">{{Cite book |title=Parallel Computing: Theory and Practice |isbn=978-0070512948 |last1=Quinn |first1=Michael Jay |date=1994 |publisher=McGraw-Hill }}</ref><ref name=":4">{{Cite book |title=Parallel and Distributed Computing Handbook |isbn=978-0070730205 |last1=Zomaya |first1=Albert Y. |date=1996 |publisher=McGraw Hill Professional }}</ref> * [[Operating system|Operating systems]] and [[Embedded system|embedded systems]] * [[Distributed computing|Distributed systems]], [[parallel computing]], and [[high-performance computing]] * [[Database|Database systems]], [[Web application|web applications]], and [[cloud computing]] == Related concepts == Concurrency is a broader concept that encompasses several related ideas, including: <ref name=":0" /><ref name=":1" /><ref name=":2" /><ref name=":3" /><ref name=":4" /> * [[Parallel computing|Parallelism]] (simultaneous execution on multiple processing units). Parallelism executes tasks independently on multiple CPU cores. Concurrency allows for multiple ''threads of control'' at the program level, which can use parallelism or time-slicing to perform these tasks. Programs may exhibit parallelism only, concurrency only, both parallelism and concurrency, neither. <ref>{{Cite book |title=Parallel and Concurrent Programming in Haskell |publisher=O'Reilly Media |year=2013 |isbn=9781449335922}}</ref> * [[Multithreading (computer architecture)|Multi-threading]] and [[Multiprocessing|multi-processing]] (shared system resources) * [[Synchronization]] (coordinating access to shared resources) * Coordination (managing interactions between concurrent tasks) * [[Concurrency control|Concurrency Control]] (ensuring data consistency and integrity) * [[Inter-process communication|Inter-process Communication]] (IPC, facilitating information exchange) == 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 [[Indeterminacy in concurrent computation|indeterminate]]. Concurrent use of shared [[Resource (computer science)|resources]] can be a source of indeterminacy leading to issues such as [[Deadlock (computer science)|deadlock]]s, and [[resource starvation]].<ref name="cleaveland1996">{{cite journal|last=Cleaveland|first=Rance|author-link=Rance Cleaveland|author2=Scott Smolka|title=Strategic Directions in Concurrency Research|journal=ACM Computing Surveys|volume=28|issue=4|date=December 1996|pages=607|doi=10.1145/242223.242252|s2cid=13264261 |doi-access=free}}</ref> Design of concurrent systems often entails finding reliable techniques for coordinating their execution, data exchange, [[memory allocation]], and execution scheduling to minimize [[latency (engineering)|response time]] and maximise [[throughput]].<ref>{{cite book | first1=Colin | last1=Campbell | first2=Ralph | last2=Johnson | first3=Ade | last3=Miller | first4=Stephen | last4=Toub | title=Parallel Programming with Microsoft .NET | url=http://msdn.microsoft.com/en-us/library/ff963542.aspx |date=August 2010 | publisher=Microsoft Press | isbn=978-0-7356-5159-3 }}</ref> == Theory ==<!-- This section is linked from [[List of academic disciplines]] --> Concurrency theory has been an active field of research in [[theoretical computer science]]. One of the first proposals was [[Carl Adam Petri]]'s seminal work on [[Petri net]]s 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:<ref>{{cite book|last=Filman|first=Robert|author2=Daniel Friedman|title=Coordinated Computing - Tools and Techniques for Distributed Software|year=1984|publisher=McGraw-Hill|isbn=978-0-07-022439-1|url=https://archive.org/details/coordinatedcompu0000film|url-access=registration}}</ref> * The [[parallel random-access machine]]<ref>{{cite book | first=Jörg | last=Keller |author2=Christoph Keßler |author3=Jesper Träff | title=Practical PRAM Programming | publisher=John Wiley and Sons | year=2001}}</ref> * The [[actor model]] * Computational bridging models such as the [[bulk synchronous parallel]] (BSP) model * [[Petri net]]s * [[Process calculi]] ** [[Calculus of communicating systems]] (CCS) ** [[Communicating sequential processes]] (CSP) model ** [[π-calculus]] * [[Tuple space]]s, e.g., [[Linda (coordination language)|Linda]] * [[SCOOP (software)|Simple Concurrent Object-Oriented Programming]] (SCOOP) * [[Reo Coordination Language]] * [[Trace monoid]]s 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,<ref>{{cite journal|last=Lee|first=Edward|author2=Alberto Sangiovanni-Vincentelli| title= A Framework for Comparing Models of Computation|journal=[[IEEE Transactions on CAD]]|volume=17|issue=12|pages=1217–1229|date=December 1998|doi=10.1109/43.736561|url=http://ptolemy.eecs.berkeley.edu/publications/papers/98/framework/ieeeVersion.pdf}}</ref> while Nielsen, Sassone, and Winskel have demonstrated that [[category theory]] can be used to provide a similar unified understanding of different models.<ref>{{cite conference|author = Mogens Nielsen |author2=Vladimiro Sassone |author3=Glynn Winskel| title = Relationships Between Models of Concurrency |book-title = REX School/Symposium|year = 1993|url = http://citeseer.ist.psu.edu/article/nielsen94relationships.html}}</ref> 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]].<ref>Frederick Knabe. A Distributed Protocol for Channel-Based Communication with Choice PARLE 1992.</ref>) The mathematical denotation denoted by a closed system {{mono|S}} is constructed increasingly better approximations from an initial behavior called {{mono|⊥<sub>S</sub>}} using a behavior approximating function {{mono|'''progression'''<sub>S</sub>}} to construct a denotation (meaning ) for {{mono|S}} as follows:<ref name="clinger1981">{{Cite journal|author=William Clinger|author-link=William Clinger (computer scientist)|title=Foundations of Actor Semantics|publisher=MIT|version=Mathematics Doctoral Dissertation|date=June 1981|hdl=1721.1/6935}}</ref> ::{{mono|'''Denote'''<sub>S</sub> ≡ ⊔<sub>i∈ω</sub> '''progression'''<sub>S</sub><sup>i</sup>(⊥<sub>S</sub>)}} In this way, {{mono|S}} can be mathematically characterized in terms of all its possible behaviors. === Logics === Various types of [[temporal logic]]<ref name="stirling">{{cite book|first=Colin|last=Roscoe|title=Modal and Temporal Properties of Processes|publisher=Springer|year=2001|isbn=978-0-387-98717-0}}</ref> can be used to help reason about concurrent systems. Some of these logics, such as [[linear temporal logic]] 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]], [[Hennessy–Milner logic]], and [[Leslie Lamport|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.<ref name="cleaveland1996"/> == Practice == {{Unreferenced section|date=April 2007}} [[Concurrent programming]] encompasses programming languages and algorithms used to implement concurrent systems. Concurrent programming is usually considered{{by whom?|date=August 2023}} to be more general than [[parallel programming]] because it can involve arbitrary and dynamic patterns of communication and interaction, whereas parallel systems generally{{says who?|date=August 2023}} 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]]s and [[Database management system]]s are generally designed{{by whom?|date=August 2023}} to operate indefinitely, including automatic recovery from failure, and not terminate unexpectedly (see [[Concurrency control]]). Some{{such as?|date=August 2023}} 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{{says who?|date=August 2023}} require the inclusion of some{{such as?|date=August 2023}} kind of [[Arbiter (electronics)|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]] which has major implications for practice including correctness and performance. For example, arbitration introduces [[unbounded nondeterminism]] 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]]es and [[deterministic concurrency]]. In these models, threads of control explicitly [[Yield (multithreading)|yield]] their timeslices, either to the system or to another process. == See also == * [[Dining philosophers problem]] * [[Chu space]] * [[Client–server]] network nodes * [[Clojure]] * [[Cluster computing|Cluster]] nodes * [[Concurrency control]] * [[Concurrent computing]] * [[Concurrent object-oriented programming]] * [[Concurrency pattern]] * [[Construction and Analysis of Distributed Processes]] (CADP) * [[D (programming language)]] * [[distributed computing|Distributed system]] * [[Elixir (programming language)]] * [[Erlang (programming language)]] * [[Go (programming language)]] * [[Gordon Pask]] * [[International Conference on Concurrency Theory]] (CONCUR) * [[OpenMP]] * [[Parallel computing]] * [[Partitioned global address space]] * [[Pony (programming language)]] * [[Process (computing)|Processes]] * [[Ptolemy Project]] * [[Rust (programming language)]] * [[Sheaf (mathematics)]] * [[Thread (computing)|Threads]] * [[X10 (programming language)]] * [[Structured concurrency]] == References == {{Reflist}} == Further reading == * {{cite book | last = Lynch | first = Nancy A. | title = Distributed Algorithms | url = https://archive.org/details/distributedalgor0000lync | url-access = registration | publisher = Morgan Kaufmann | year = 1996 | isbn = 978-1-55860-348-6 }} * {{cite book | last1 = Tanenbaum | first1 = Andrew S. | last2 = Van Steen | first2 = Maarten | title = Distributed Systems: Principles and Paradigms | publisher = Prentice Hall | year = 2002 | isbn = 978-0-13-088893-8 }} * {{cite book | last = Kurki-Suonio | first = Reino | title = A Practical Theory of Reactive Systems | publisher = Springer | year = 2005 | isbn = 978-3-540-23342-8 }} * {{cite book | last = Garg | first = Vijay K. | title = Elements of Distributed Computing | publisher = Wiley-IEEE Press | year = 2002 | isbn = 978-0-471-03600-5 }} * {{cite book | last = Magee | first = Jeff |author2=Kramer, Jeff | title = Concurrency: State Models and Java Programming | publisher = Wiley | year = 2006 | isbn = 978-0-470-09355-9 }} * Distefano, S., & Bruneo, D. (2015). ''Quantitative assessments of distributed systems: Methodologies and techniques'' (1st ed.). Somerset: John Wiley & Sons Inc.{{ISBN|9781119131144}} * 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 {{ISBN|9781461468592}} * Wolter, K. (2012;2014;). ''Resilience assessment and evaluation of computing systems'' (1. Aufl.;1; ed.). London;Berlin;: Springer. {{ISBN|9783642290329}} == External links == *[http://processalgebra.blogspot.com/ Process Algebra Diary - Prof. Luca Aceto's blog on Concurrency Theory] *[https://web.archive.org/web/20060128114620/http://vl.fmnet.info/concurrent/ Concurrent Systems] at [http://vlib.org/ The WWW Virtual Library] *[http://shairosenfeld.com/concurrency.html Concurrency patterns presentation] given at [http://scaleconf.org scaleconf] {{Concurrent computing}} [[Category:Concurrency (computer science)| ]]
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Pages transcluded onto the current version of this page
(
help
)
:
Template:By whom?
(
edit
)
Template:Cite book
(
edit
)
Template:Cite conference
(
edit
)
Template:Cite journal
(
edit
)
Template:Concurrent computing
(
edit
)
Template:For multi
(
edit
)
Template:ISBN
(
edit
)
Template:Mono
(
edit
)
Template:Redirect
(
edit
)
Template:Reflist
(
edit
)
Template:Says who?
(
edit
)
Template:Short description
(
edit
)
Template:Such as?
(
edit
)
Template:Unreferenced section
(
edit
)