VMware Interview Question: If there is one spin lock use... | Glassdoor

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?

Interview Answer

1 Answer


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, Sign In or Sign Up.