Content deleted Content added
m →External links: HTTP to HTTPS for SourceForge |
|||
(10 intermediate revisions by 8 users not shown) | |||
Line 2:
{{Refimprove|date=November 2009}}
In [[computer science]], a '''concurrent data structure''' (also called '''shared data structure''') is a data structure designed for access and modification by multiple computing [[Thread (computer science)|threads]] (or [[process (computing)|processes]] or nodes) on a computer, for example concurrent [[Message queue|queues]], concurrent [[Stack (abstract data type)|stacks]] etc. The concurrent data structure is typically considered to reside in an abstract storage environment known as shared memory, which may be physically implemented as either a tightly coupled or a distributed collection of storage modules. <ref>{{Cite book |title=A VLSI Architecture for Concurrent Data Structures |isbn=9781461319955 |last1=Dally |first1=J. W. |date=6 December 2012 |publisher=Springer }}</ref><ref>{{Cite book |title=23nd International Symposium on Distributed Computing, DISC |publisher=Springer Science & Business Media |year=2009}}</ref>
==Basic principles==
Line 31 ⟶ 11:
machine, in several ways.<ref name="sahni">
{{cite book
|
| title =
| chapter =
|chapter-url=http://www.cs.tau.ac.il/~shanir/concurrent-data-structures.pdf
|archive-url=https://web.archive.org/web/20110401070433/http://www.cs.tau.ac.il/~shanir/concurrent-data-structures.pdf
| editor = Dinesh Metha and [[Sartaj Sahni]]▼
|archive-date=2011-04-01
| publisher = Chapman and Hall/CRC Press
| year = 2007
| pages =
}}
</ref> Most notably, in a sequential environment
Line 72 ⟶ 54:
of their simultaneous data access and modification requests. To
support such agreement, concurrent data structures are implemented
using special primitive synchronization operations (see [[Synchronization (computer science)#
available on modern [[multiprocessing|multiprocessor machine]]s
that allow multiple threads to reach consensus. This consensus can be achieved in a blocking manner by using [[Spinlock|locks]], or without locks, in which case it is [[Non-blocking algorithm|non-blocking]]. There is a wide body
Line 96 ⟶ 78:
| title=More than you ever wanted to know about synchronization: Synchrobench, measuring the impact of the synchronization on concurrent algorithms
| author=Gramoli, V.
|
| pages=1–10
| year=2015
Line 124 ⟶ 106:
exacerbated by the additional memory traffic associated with
unsuccessful attempts to acquire the lock.
==.NET==
[[.NET]] have {{Mono|ConcurrentDictionary}},<ref>{{cite web |title=ConcurrentDictionary Class (System.Collections.Concurrent) |url=https://learn.microsoft.com/en-us/dotnet/api/system.collections.concurrent.concurrentdictionary-2?view=net-9.0 |website=learn.microsoft.com |access-date=26 November 2024 |language=en-us}}</ref> {{Mono|ConcurrentQueue}}<ref>{{cite web |title=ConcurrentQueue Class (System.Collections.Concurrent) |url=https://learn.microsoft.com/en-us/dotnet/api/system.collections.concurrent.concurrentqueue-1?view=net-9.0 |website=learn.microsoft.com |access-date=26 November 2024 |language=en-us}}</ref> and {{Mono|ConcurrentStack}}<ref>{{cite web |title=ConcurrentStack Class (System.Collections.Concurrent) |url=https://learn.microsoft.com/en-us/dotnet/api/system.collections.concurrent.concurrentstack-1?view=net-9.0 |website=learn.microsoft.com |access-date=26 November 2024 |language=en-us}}</ref> in the {{Mono|System.Collections.Concurrent}} namespace.
[[File:UML dotnet concurrent.svg|UML class diagram of System.Collections.Concurrent in .NET]]
==Rust==
[[Rust (programming language)|Rust]] instead wraps data structures in {{Mono|Arc}} and {{Mono|Mutex}}.<ref>{{cite web |title=Shared-State Concurrency - The Rust Programming Language |url=https://doc.rust-lang.org/book/ch16-03-shared-state.html |website=doc.rust-lang.org |access-date=26 November 2024}}</ref>
<syntaxhighlight lang="rust">
let counter = Arc::new(Mutex::new(0));
</syntaxhighlight>
==See also==
* [[Thread safety]]
* [[Java concurrency]] (JSR 166)
* [[Java ConcurrentMap]]
Line 140 ⟶ 135:
==External links==
* [https://web.archive.org/web/20160303215946/http://www.ibm.com/developerworks/aix/library/au-multithreaded_structures1/index.html Multithreaded data structures for parallel computing, Part 1] (Designing concurrent data structures) by Arpan Sen
* [https://web.archive.org/web/20160304000118/http://www.ibm.com/developerworks/aix/library/au-multithreaded_structures2/index.html Multithreaded data structures for parallel computing: Part 2] (Designing concurrent data structures without mutexes) by Arpan Sen
* [
* [https://sites.google.com/site/synchrobench/ Synchrobench] – C/C++ and Java libraries and benchmarks of lock-free, lock-based, TM-based and RCU/COW-based data structures.
{{Concurrent computing}}
{{DEFAULTSORT:Concurrent Data Structure}}
|