Interview Question

Member of Technical Staff Interview

If there is one spin lock used for N different thread and

  each thread has its local variable which is just incremented by 1. If these threads are running all together on N cpus will after say 10 seconds the count of all the local variable be same. different? why?
Answer

Interview Answer

1 Answer

0

As spinlock does not guarantee fairness the answer is the values may be different.

Interview Candidate on Oct 31, 2013

Add Answers or Comments

To comment on this question, Sign In with Facebook or Sign Up