Seqlock: Optimistic Concurrency Control - Quant Developer Interview Question
Difficulty: Hard
Category: concurrency
Practice quant interview questions from top firms including Jane Street, Citadel, Two Sigma, DE Shaw, and other leading quantitative finance companies.
Topics: concurrency, lock-free, atomic, low-latency
Problem Description
A Seqlock (Sequence Lock) implements optimistic concurrency control using atomic sequence counters, allowing frequent readers to access data without blocking writers or acquiring heavy mutexes. This pattern ensures data consistency through versioning rather than mutual exclusion, making it ideal for scenarios where reads vastly outnumber writes.
Task
Implement the ConfigStore class to manage shared configuration data using the Seqlock pattern with std::atomic primitives. The class must support
Practice this hard developer interview question on MyntBit - the all-in-one quant learning platform with 200+ quant interview questions for Jane Street, Citadel, Two Sigma, and other top quantitative finance firms.