CSC/ECE 506 Spring 2010/chapter 10: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
Line 10: Line 10:
*appear to execute one at a time,  
*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.
*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. However, it disallows many hardware and compiler optimizations[ 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
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, however does not allow many hardware and compiler optimizations[ 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.
are supported  by commercial architectures.

Revision as of 04:03, 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, however does not allow many hardware and compiler optimizations[ 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.