fbpx
Wikipedia

Concurrency (computer science)

In computer science, concurrency is the ability of different parts or units of a program, algorithm, or problem to be executed out-of-order or in partial order, 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.[1]

The "Dining Philosophers", a classic problem involving concurrency and shared resources

According to Rob Pike, concurrency is the composition of independently executing computations,[2] 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.[3]

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.

Issues edit

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. Concurrent use of shared resources can be a source of indeterminacy leading to issues such as deadlocks, and resource starvation.[4]

Design of concurrent systems often entails finding reliable techniques for coordinating their execution, data exchange, memory allocation, and execution scheduling to minimize response time and maximise throughput.[5]

Theory edit

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 nets in the early 1960s. In the years since, a wide variety of formalisms have been developed for modeling and reasoning about concurrency.

Models edit

A number of formalisms for modeling and understanding concurrent systems have been developed, including:[6]

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,[8] while Nielsen, Sassone, and Winskel have demonstrated that category theory can be used to provide a similar unified understanding of different models.[9]

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.[10]) The mathematical denotation denoted by a closed system S is constructed increasingly better approximations from an initial behavior called S using a behavior approximating function progressionS to construct a denotation (meaning ) for S as follows:[11]

DenoteS ≡ ⊔i∈ω progressionSi(⊥S)

In this way, S can be mathematically characterized in terms of all its possible behaviors.

Logics edit

Various types of temporal logic[12] 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 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.[4]

Practice edit

Concurrent programming encompasses programming languages and algorithms used to implement concurrent systems. Concurrent programming is usually considered[by whom?] to be more general than parallel programming because it can involve arbitrary and dynamic patterns of communication and interaction, whereas parallel systems generally[according to whom?] have a predefined and well-structured communications pattern. The base goals of concurrent programming include correctness, performance and robustness. Concurrent systems such as Operating systems and Database management systems are generally designed[by whom?] to operate indefinitely, including automatic recovery from failure, and not terminate unexpectedly (see Concurrency control). Some[example needed] 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[according to whom?] require the inclusion of some[example needed] 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 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 coprocesses and deterministic concurrency. In these models, threads of control explicitly yield their timeslices, either to the system or to another process.

See also edit

References edit

  1. ^ Lamport, Leslie (July 1978). "Time, Clocks, and the Ordering of Events in a Distributed System" (PDF). Communications of the ACM. 21 (7): 558–565. doi:10.1145/359545.359563. S2CID 215822405. Retrieved 4 February 2016.
  2. ^ "Go Concurrency Patterns". talks.golang.org. Retrieved 2021-04-08.
  3. ^ "Concurrency is not Parallelism". talks.golang.org. Retrieved 2021-04-08.
  4. ^ a b Cleaveland, Rance; Scott Smolka (December 1996). "Strategic Directions in Concurrency Research". ACM Computing Surveys. 28 (4): 607. doi:10.1145/242223.242252. S2CID 13264261.
  5. ^ Campbell, Colin; Johnson, Ralph; Miller, Ade; Toub, Stephen (August 2010). Parallel Programming with Microsoft .NET. Microsoft Press. ISBN 978-0-7356-5159-3.
  6. ^ Filman, Robert; Daniel Friedman (1984). Coordinated Computing - Tools and Techniques for Distributed Software. McGraw-Hill. ISBN 978-0-07-022439-1.
  7. ^ Keller, Jörg; Christoph Keßler; Jesper Träff (2001). Practical PRAM Programming. John Wiley and Sons.
  8. ^ Lee, Edward; Alberto Sangiovanni-Vincentelli (December 1998). "A Framework for Comparing Models of Computation" (PDF). IEEE Transactions on CAD. 17 (12): 1217–1229. doi:10.1109/43.736561.
  9. ^ Mogens Nielsen; Vladimiro Sassone; Glynn Winskel (1993). "Relationships Between Models of Concurrency". REX School/Symposium.
  10. ^ Frederick Knabe. A Distributed Protocol for Channel-Based Communication with Choice PARLE 1992.
  11. ^ William Clinger (June 1981). "Foundations of Actor Semantics". Mathematics Doctoral Dissertation. MIT. hdl:1721.1/6935. {{cite journal}}: Cite journal requires |journal= (help)
  12. ^ Roscoe, Colin (2001). Modal and Temporal Properties of Processes. Springer. ISBN 978-0-387-98717-0.

Further reading edit

  • Lynch, Nancy A. (1996). Distributed Algorithms. Morgan Kaufmann. ISBN 978-1-55860-348-6.
  • Tanenbaum, Andrew S.; Van Steen, Maarten (2002). Distributed Systems: Principles and Paradigms. Prentice Hall. ISBN 978-0-13-088893-8.
  • Kurki-Suonio, Reino (2005). A Practical Theory of Reactive Systems. Springer. ISBN 978-3-540-23342-8.
  • Garg, Vijay K. (2002). Elements of Distributed Computing. Wiley-IEEE Press. ISBN 978-0-471-03600-5.
  • Magee, Jeff; Kramer, Jeff (2006). Concurrency: State Models and Java Programming. Wiley. 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 edit

  • Process Algebra Diary - Prof. Luca Aceto's blog on Concurrency Theory
  • at The WWW Virtual Library
  • Concurrency patterns presentation given at scaleconf

concurrency, computer, science, concurrent, computer, redirects, here, company, concurrent, computer, corporation, more, practical, discussion, concurrent, computing, other, uses, concurrency, disambiguation, computer, science, concurrency, ability, different,. Concurrent computer redirects here For the company see Concurrent Computer Corporation For a more practical discussion see Concurrent computing For other uses see Concurrency disambiguation In computer science concurrency is the ability of different parts or units of a program algorithm or problem to be executed out of order or in partial order 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 1 The Dining Philosophers a classic problem involving concurrency and shared resources According to Rob Pike concurrency is the composition of independently executing computations 2 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 3 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 Contents 1 Issues 2 Theory 2 1 Models 2 2 Logics 3 Practice 4 See also 5 References 6 Further reading 7 External linksIssues editBecause 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 Concurrent use of shared resources can be a source of indeterminacy leading to issues such as deadlocks and resource starvation 4 Design of concurrent systems often entails finding reliable techniques for coordinating their execution data exchange memory allocation and execution scheduling to minimize response time and maximise throughput 5 Theory editConcurrency 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 nets in the early 1960s In the years since a wide variety of formalisms have been developed for modeling and reasoning about concurrency Models edit A number of formalisms for modeling and understanding concurrent systems have been developed including 6 The parallel random access machine 7 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 p 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 8 while Nielsen Sassone and Winskel have demonstrated that category theory can be used to provide a similar unified understanding of different models 9 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 10 The mathematical denotation denoted by a closed system S is constructed increasingly better approximations from an initial behavior called S using a behavior approximating function progressionS to construct a denotation meaning for S as follows 11 DenoteS i w progressionSi S dd In this way S can be mathematically characterized in terms of all its possible behaviors Logics edit Various types of temporal logic 12 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 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 4 Practice editThis section does not cite any sources Please help improve this section by adding citations to reliable sources Unsourced material may be challenged and removed April 2007 Learn how and when to remove this message Concurrent programming encompasses programming languages and algorithms used to implement concurrent systems Concurrent programming is usually considered by whom to be more general than parallel programming because it can involve arbitrary and dynamic patterns of communication and interaction whereas parallel systems generally according to whom have a predefined and well structured communications pattern The base goals of concurrent programming include correctness performance and robustness Concurrent systems such as Operating systems and Database management systems are generally designed by whom to operate indefinitely including automatic recovery from failure and not terminate unexpectedly see Concurrency control Some example needed 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 according to whom require the inclusion of some example needed 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 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 coprocesses and deterministic concurrency In these models threads of control explicitly yield their timeslices either to the system or to another process See also editChu space Client server network nodes Clojure Cluster nodes Concurrency control Concurrent computing Concurrent object oriented programming Concurrency pattern Construction and Analysis of Distributed Processes CADP D programming language 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 Processes Ptolemy Project Rust programming language Sheaf mathematics Threads X10 programming language Structured concurrencyReferences edit Lamport Leslie July 1978 Time Clocks and the Ordering of Events in a Distributed System PDF Communications of the ACM 21 7 558 565 doi 10 1145 359545 359563 S2CID 215822405 Retrieved 4 February 2016 Go Concurrency Patterns talks golang org Retrieved 2021 04 08 Concurrency is not Parallelism talks golang org Retrieved 2021 04 08 a b Cleaveland Rance Scott Smolka December 1996 Strategic Directions in Concurrency Research ACM Computing Surveys 28 4 607 doi 10 1145 242223 242252 S2CID 13264261 Campbell Colin Johnson Ralph Miller Ade Toub Stephen August 2010 Parallel Programming with Microsoft NET Microsoft Press ISBN 978 0 7356 5159 3 Filman Robert Daniel Friedman 1984 Coordinated Computing Tools and Techniques for Distributed Software McGraw Hill ISBN 978 0 07 022439 1 Keller Jorg Christoph Kessler Jesper Traff 2001 Practical PRAM Programming John Wiley and Sons Lee Edward Alberto Sangiovanni Vincentelli December 1998 A Framework for Comparing Models of Computation PDF IEEE Transactions on CAD 17 12 1217 1229 doi 10 1109 43 736561 Mogens Nielsen Vladimiro Sassone Glynn Winskel 1993 Relationships Between Models of Concurrency REX School Symposium Frederick Knabe A Distributed Protocol for Channel Based Communication with Choice PARLE 1992 William Clinger June 1981 Foundations of Actor Semantics Mathematics Doctoral Dissertation MIT hdl 1721 1 6935 a href Template Cite journal html title Template Cite journal cite journal a Cite journal requires journal help Roscoe Colin 2001 Modal and Temporal Properties of Processes Springer ISBN 978 0 387 98717 0 Further reading editLynch Nancy A 1996 Distributed Algorithms Morgan Kaufmann ISBN 978 1 55860 348 6 Tanenbaum Andrew S Van Steen Maarten 2002 Distributed Systems Principles and Paradigms Prentice Hall ISBN 978 0 13 088893 8 Kurki Suonio Reino 2005 A Practical Theory of Reactive Systems Springer ISBN 978 3 540 23342 8 Garg Vijay K 2002 Elements of Distributed Computing Wiley IEEE Press ISBN 978 0 471 03600 5 Magee Jeff Kramer Jeff 2006 Concurrency State Models and Java Programming Wiley ISBN 978 0 470 09355 9 Distefano S amp Bruneo D 2015 Quantitative assessments of distributed systems Methodologies and techniques 1st ed Somerset John Wiley amp 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 9783642290329External links editProcess Algebra Diary Prof Luca Aceto s blog on Concurrency Theory Concurrent Systems at The WWW Virtual Library Concurrency patterns presentation given at scaleconf Retrieved from https en wikipedia org w index php title Concurrency computer science amp oldid 1221605492, wikipedia, wiki, book, books, library,

article

, read, download, free, free download, mp3, video, mp4, 3gp, jpg, jpeg, gif, png, picture, music, song, movie, book, game, games.