《Principles of Computer System Design》
Spin loops:Loops in which a thread is waiting for an event without giving up its processor.
Race conditions:(P215 chapter 5.2.2) examples: too lazy to describe, read the book.
Assume two threads writing asynchronously to the same memory. and at different pace.
With this condition, the two threads could cause race condition which leads to serious errors.
A data race occurs when two concurrent threads across a shared variable and when
-- at least one access is a write and
-- the threads use no explicit mechanism to prevent the accesses from being simultaneous.