Multicore & Synchronization
Which describes sequential consistency?
- AEach core's operations run in a random order every time
- BAll cores' operations appear in some single order in which each core's operations occur in program order
- CAll operations run on a single core only
Show answer and explanation
Answer: B. All cores' operations appear in some single order in which each core's operations occur in program order
Under sequential consistency, the operations of all cores appear interleaved into one sequence, like shuffling cards, with each core's operations keeping their program order within it. It is the easiest model for programmers, but it severely limits hardware optimizations such as reordering through store buffers, so most real CPUs adopt looser models.
- A. Program order is preserved, not randomized.
- B. Correct. It is the most intuitive model.
- C. It assumes multiple cores.