Spinning On One Core
A single-core machine runs two threads with a 10 ms scheduling quantum. Thread A takes a spinlock, and 50 ns later the timer interrupt preempts it inside the critical section. Thread B is scheduled next and immediately tries to take the same spinlock.
The critical section is 200 ns of work in total. How much CPU time is burned before B gets the lock?
Sign in to answer questions and track your progress
Sign In