Overview
Save Big on Coursera Plus. 7,000+ courses at $160 off. Limited Time Only!
Explore a multithreaded, transaction-based locking strategy for containers in this conference talk from C++Now 2019. Dive into the challenges of sharing containers among multiple threads in C++ applications, particularly when dealing with frequent write operations. Learn about an algorithm implemented in C++17 that provides atomicity, consistency, and isolation for simultaneous reads and writes on a single container. Discover how this approach, based on strict timestamp ordering, minimizes spatial overhead while avoiding data races and deadlocks. Examine the algorithm's pros, cons, and limitations, and compare its performance to other techniques. Gain insights into topics such as update groups, sharding, mutexes, and atomic integers. Follow along as the speaker presents code examples, design choices, and test strategies for implementing this locking strategy in your own projects.
Syllabus
Introduction
Outline
Sharing a Container
MultiThreaded Containers
Update Groups
Motivation
Acid Database
Sharding
Mutexes
Strict timestamp ordering
Atomic integer
Transaction
Update Operations
Design Choices
Shared Containers
Code
LockableItem
Timestamp
Member Functions
Commit
Subtlety
Test Strategy
Taught by
CppNow