Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

YouTube

A Multithreaded, Transaction-Based Locking Strategy for Containers

CppNow via YouTube

Overview

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

Reviews

Start your review of A Multithreaded, Transaction-Based Locking Strategy for Containers

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.