Thread Affinity and Core Isolation - Quant Developer Interview Question
Difficulty: Medium
Category: concurrency
Asked at: Jump Trading, DRW, Tower Research, Optiver, HRT
Topics: c++, concurrency, low-latency, systems
Problem Description
Thread Affinity or (CPU Pinning) is a critical optimization technique used to bind execution threads to specific CPU cores, thereby maximizing cache locality and minimizing context switching overhead. By preventing the operating system scheduler from migrating threads, developers can achieve deterministic performance essential for high-frequency trading strategies. This task involves implementing POSIX-compliant thread management to enforce these core isolation requirements.
Task
Implement the
Practice this medium developer interview question on MyntBit - the LeetCode for quants with 200+ quant interview questions for Jane Street, Citadel, Two Sigma, and other top quantitative finance firms.