lec28 - Sequential Consistency and Synchronized Programs ±...

Info iconThis preview shows pages 1–8. Sign up to view the full content.

View Full Document Right Arrow Icon
LECTURE - 28
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Lecture Outline ± Consistency models ± ± Scribe for today?
Background image of page 2
Sequential Consistency ± Sequential consistency: result of execution same as if: ² Accesses executed by a processor are in order ² Accesses among different processors are interleaved ± That is, there exists some interleaving which will lead to the same result on a uni- processor ² Or, a multi-processor with no caches, and no write-buffers, and only a single centralized memory
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Implementing Sequential Consistency ± Need to guarantee that a write/read completes before any other access (by the same processor) ± Write completes == all invalidations have reached ± This implies that write buffers cannot used (writes cannot be delayed in general)
Background image of page 4
Synchronized Programs ± Programs which protect access to shared locations through synchronization operations ± More formally: ² In every possible execution, for every shared data ² Write by a processor, and access (read/write) by another processor ² Are separated by a synchronization operation ± That is, the program is data-race-free ± Observation: most programs are synchronized
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 6
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 8
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Sequential Consistency and Synchronized Programs ± Sequential consistency guarantees uni-processor-like behaviour for any program ² True for synchronized programs too ± But sequential consistency is not necessary for uni-processor-like behaviour of synchronized programs ± Define looser consistency models ² Can be implemented more efficiently than sequential consistency Memory Access Orderings ± Four possibilities: ² R --> R, R --> W, W --> W, W --> R ± Sequential consistency guarantees all four orderings are preserved (in each processor) ± Define synchronization operation S ² Synchronization acquire: Sa, release: Sr ± We only need to preserve: ² W --> Sr, R --> Sr ² Sa --> W, Sa --> R ² S --> S Relaxed Consistency Models ± Total Store Order (TSO), or Processor Consistency: relax W-->R ± Partial Store Order: relax W-->W also ± Weak Ordering: relax R-->R, R-->W also ± Release consistency: relax Sr-->W, Sr-->R, W-->Sa, R-->Sa...
View Full Document

This note was uploaded on 07/14/2011 for the course CS 422 taught by Professor Hogakoi during the Spring '10 term at IIT Kanpur.

Page1 / 8

lec28 - Sequential Consistency and Synchronized Programs ±...

This preview shows document pages 1 - 8. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online