Chapter: Multicore Application Programming For Windows, Linux, and Oracle Solaris - Hand-Coded Synchronization and Sharing

| Study Material, Lecturing Notes, Assignment, Reference, Wiki description explanation, brief detail |

Lockless Algorithms

• Dekker’s Algorithm • Producer-Consumer with a Circular Buffer • Scaling to Multiple Consumers or Producers • Scaling the Producer-Consumer to Multiple Threads • Modifying the Producer-Consumer Code to Use Atomics • The ABA Problem

Lockless Algorithms

 

The other approach to lockless algorithms is to code the algorithms so that they do not require locks. This can be complicated to achieve because it requires consideration of the state of the data and the transitions between data states to ensure that the system remains in legal states all the time.


·        Dekker’s Algorithm

·        Producer-Consumer with a Circular Buffer

·        Scaling to Multiple Consumers or Producers

·        Scaling the Producer-Consumer to Multiple Threads

·        Modifying the Producer-Consumer Code to Use Atomics

·        The ABA Problem


Study Material, Lecturing Notes, Assignment, Reference, Wiki description explanation, brief detail


Copyright © 2018-2020 BrainKart.com; All Rights Reserved. Developed by Therithal info, Chennai.