CSC/ECE 506 Spring 2010/chapter 10: Difference between revisions
Line 15: | Line 15: | ||
== '''Relaxed Consistency Models''' == | == '''Relaxed Consistency Models''' == | ||
Explain about intuition behind RC, the different RC models we have seen in the text and eager consistency(tentative). | Explain about intuition behind RC, the different RC models we have seen in the text(v v briefly) and eager consistency(tentative). | ||
== '''Consistency in Real Machines''' == | == '''Consistency in Real Machines''' == |
Revision as of 05:02, 13 April 2010
Introduction
This material gives a brief explanation about the intuition behind using relaxed memory consistency models that we have studied in class. It also explains about the consistency models in real multiprocessor systems like Digital Alpha, Sparc V9 RMO, IBM Power PC, Intel Pentium, and processors from Sun Microsystems.
Memory Consistency Models - Sequential consistency
To write correct and efficient shared memory programs, programmers need a precise notion of shared memory semantics. To ensure correct execution a programmer expects that the data value read should be the same as the latest value written to it in the system. However in many commercial shared memory systems,the processor may observe an older value, causing unexpected behavior.The Memory consistency model of a shared memory multiprocessor formaly specifies how the memory system will appera to the programmer.Essentially, a memory consistency model restricts the values that a read can return. Intuitively, a read should return the value of the "last" write to the same memory location. In uniprocessors, "last" is precisely defined by the sequential order specified by the program called program order. This is not the case in multiprocessors.A write and read of a variable, Data, are not related by program order because they reside on two different processors.
The uniprocessors model, however can be extented to apply to multiprocessors in a natural way. The resulting model is called Sequential consistency. In brief, sequential consistency requires that all memory operations
- appear to execute one at a time,
- all memory operations of a single processor appear to execute in the order described by that processor's program.
This model ensures that the reads of a variable, Data, will return the new values written to it by a processor. Sequential consistency provides a simple, intuitive programming model. Because of its strict consistency requirements,sequential consistency, many of the architecture and compiler optimizations used in uniprocessors are not safely applicable to sequentially consistent multiprocessors.[ For more deatils on sequential consistency model and its advantages/disadvantages refer to solihin textbook pg 284 through 292]. For this reason, many Relaxed consistency models have been proposed, most of which are supported by commercial architectures.
Relaxed Consistency Models
Explain about intuition behind RC, the different RC models we have seen in the text(v v briefly) and eager consistency(tentative).