Memory Consistency Models | OS Interview | Skill-Lync Resources
Hard Operating Systems Synchronization

Explain memory consistency models: sequential, TSO, and relaxed.

Answer

Memory models define how memory operations appear to execute across processors. Sequential consistency: all processors see same order, matches program order - simple but slow. TSO (Total Store Order, x86): reads may pass older writes to different addresses - allows store buffers. Relaxed (ARM, POWER): extensive reordering allowed - needs explicit barriers. Compilers also reorder. Understanding models is crucial for lock-free programming. Languages provide memory_order semantics to control this.

Master These Concepts with IIT Certification
IIT Certified

Master These Concepts with IIT Certification

175+ hours of industry projects. Get placed at Bosch, Tata Motors, L&T and 500+ companies.

Relevant for Roles

Systems Developer Concurrency Expert Compiler Engineer