Difficulty: Medium
Category: Networking & Systems
Practice quant interview questions from top firms including Jane Street, Citadel, Two Sigma, DE Shaw, and other leading quantitative finance companies.
Topics: concurrency, spinlocks, mutex, low-latency, systems-design
You are designing a low-latency trading system. You need to choose between a spin lock and a mutex for protecting a critical section of code that updates shared market data. Context switch time on your system is approximately 500 nanoseconds. You estimate that the average time a thread needs to hold the lock is either 100 nanoseconds with a probability of 0.9, or 1 microsecond with a probability of 0.1. Under what circumstances would a spin lock be preferred over a mutex, assuming minimizing lat
Practice this medium trader 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.