Scaling synchronization in multicore programs

Adam Morrison*

*Corresponding author for this work

Research output: Contribution to journalArticlepeer-review

8 Scopus citations

Abstract

Advanced synchronization methods that can push the performance of designs using shared mutable data to levels that are acceptable to many applications are discussed. Using locks to protect the queue serializes its operations: only one core at a time can update the queue, and the others must wait for their turns. One possibility to increase scalability is by replacing locks with lockfree synchronization, which directly manipulates the queue using atomic instructions. Alternative work-queue designs seek scalability by distributing the data structure, which allows for more parallelism but gives up some of the properties of the centralized shared queue. To eliminate many-thread synchronization altogether, one can turn to distributed queue. This design weakens the consistency guarantee of the queue. It also makes dynamic load balancing more difficult because it chooses which core will dequeue an item in advance. The delegation synchronization eliminates most lock acquisition and releases from the critical path, and it speeds up execution of the critical sections themselves. In a delegation lock, the core holding the lock acts as a server and executes the operations. Delegation also enables new optimizations that exploit the semantics of the data structure to speed up critical-section execution. Lock-free synchronization directly manipulates shared data using atomic instructions instead of locks. Most lock-free algorithms use the CAS (compare-and-swap) instruction (or equivalent) available on all multicore processors. Awareness of these methods can assist those designing software for multicore machines.

Original languageEnglish
Pages (from-to)44-51
Number of pages8
JournalCommunications of the ACM
Volume59
Issue number11
DOIs
StatePublished - Nov 2016

Fingerprint

Dive into the research topics of 'Scaling synchronization in multicore programs'. Together they form a unique fingerprint.

Cite this