Common · Knowledge
Read-copy-update
Synchronization mechanism based on mutual exclusion
In computer science, read-copy-update (RCU) is a synchronization mechanism that avoids the use of lock primitives while multiple threads concurrently read and update elements that are linked through pointers and that belong to shared data structures (e.g., linked lists, trees, hash tables). Whenever a thread is inserting or deleting elements of data structures in shared memory, all readers are guaranteed to see and traverse either the older or the new structure, therefore avoiding inconsistencies (e.g., dereferencing null pointers).
From Wikipedia
In computer science, read-copy-update (RCU) is a synchronization mechanism that avoids the use of lock primitives while multiple threads concurrently read and update elements that are linked through pointers and that belong to shared data structures (e.g., linked lists, trees, hash tables). Whenever a thread is inserting or deleting elements of data structures in shared memory, all readers are guaranteed to see and traverse either the older or the new structure, therefore avoiding inconsistencies (e.g., dereferencing null pointers). It is used when performance of reads is crucial and is an example of space–time tradeoff, enabling fast operations at the cost of more space. This makes all readers proceed as if there were no synchronization involved, hence they will be fast, but also making updates more difficult.
Text: Wikipédia, CC BY-SA 4.0. ·
Related cards
-
R★
Readers–writer lock
Synchronization primitive in computing
-
S★★
Single source of truth
Information systems good practice for data normalization using one source for a particular data element
-
★★★
Linked list
Data structure which is a linear collection of data elements, called nodes, each pointing to the next node by means of a pointer
-
★★★★
Blockchain
Distributed data store for digital transactions
-
★★
Log-structured merge-tree
Data structure
-
★★★
Interleaved memory
Computer memory access architecture