Processor Consistency [Goodman 1989]* Processor Consistency is a memory model in which the result of any execution is the same as if the operations of.

Slides:



Advertisements
Similar presentations
Chapter 5 Part I: Shared Memory Multiprocessors
Advertisements

1 Written By: Adi Omari (Revised and corrected in 2012 by others) Memory models CDP Tutorial 7.
SE-292 High Performance Computing
CSE 490/590, Spring 2011 CSE 490/590 Computer Architecture Snoopy Caches I Steve Ko Computer Sciences and Engineering University at Buffalo.
CS 162 Memory Consistency Models. Memory operations are reordered to improve performance Hardware (e.g., store buffer, reorder buffer) Compiler (e.g.,
Parallel Programming Motivation and terminology – from ACM/IEEE 2013 curricula.
Shared Memory – Consistency of Shared Variables The ideal picture of shared memory: CPU0CPU1CPU2CPU3 Shared Memory Read/ Write The actual architecture.
Consistency Models Based on Tanenbaum/van Steen’s “Distributed Systems”, Ch. 6, section 6.2.
1 Munin, Clouds and Treadmarks Distributed Shared Memory course Taken from a presentation of: Maya Maimon (University of Haifa, Israel).
Memory consistency models Presented by: Gabriel Tanase.
DISTRIBUTED CONSISTENCY MANAGEMENT IN A SINGLE ADDRESS SPACE DISTRIBUTED OPERATING SYSTEM Sombrero.
CS252/Patterson Lec /23/01 CS213 Parallel Processing Architecture Lecture 7: Multiprocessor Cache Coherency Problem.
1 Lecture 7: Consistency Models Topics: sequential consistency, requirements to implement sequential consistency, relaxed consistency models.
Lecture 13: Consistency Models
Computer Architecture II 1 Computer architecture II Lecture 9.
1 Lecture 15: Consistency Models Topics: sequential consistency, requirements to implement sequential consistency, relaxed consistency models.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved Chapter 7 Consistency.
Memory Consistency Models
1 Lecture 12: Relaxed Consistency Models Topics: sequential consistency recap, relaxing various SC constraints, performance comparison.
Shared Memory – Consistency of Shared Variables The ideal picture of shared memory: CPU0CPU1CPU2CPU3 Shared Memory Read/ Write The actual architecture.
Consistency. Consistency model: –A constraint on the system state observable by applications Examples: –Local/disk memory : –Database: What is consistency?
Shared Memory Consistency Models: A Tutorial By Sarita V Adve and Kourosh Gharachorloo Presenter: Meenaktchi Venkatachalam.
Shared Memory Consistency Models: A Tutorial By Sarita V Adve and Kourosh Gharachorloo Presenter: Sunita Marathe.
Lecture 37: Chapter 7: Multiprocessors Today’s topic –Introduction to multiprocessors –Parallelism in software –Memory organization –Cache coherence 1.
Memory Consistency Models Some material borrowed from Sarita Adve’s (UIUC) tutorial on memory consistency models.
Shared Memory – Consistency of Shared Variables The ideal picture of shared memory: CPU0CPU1CPU2CPU3 Shared Memory Read/ Write The actual architecture.
Consistency And Replication
The Architecture of Secure Systems Jim Alves-Foss Laboratory for Applied Logic Department of Computer Science University of Idaho By, Nagaashwini Katta.
Pipeline And Vector Processing. Parallel Processing The purpose of parallel processing is to speed up the computer processing capability and increase.
Reliable Communication in the Presence of Failures Based on the paper by: Kenneth Birman and Thomas A. Joseph Cesar Talledo COEN 317 Fall 05.
Profiling Memory Subsystem Performance in an Advanced POWER Virtualization Environment The prominent role of the memory hierarchy as one of the major bottlenecks.
Memory Consistency Models Alistair Rendell See “Shared Memory Consistency Models: A Tutorial”, S.V. Adve and K. Gharachorloo Chapter 8 pp of Wilkinson.
Shared Memory Consistency Models. SMP systems support shared memory abstraction: all processors see the whole memory and can perform memory operations.
Memory Consistency Models. Outline Review of multi-threaded program execution on uniprocessor Need for memory consistency models Sequential consistency.
Replication (1). Topics r Why Replication? r System Model r Consistency Models – How do we reason about the consistency of the “global state”? m Data-centric.
Memory Consistency Models 1. Uniform Consistency Models Only have read and write operations Sequential Consistency Pipelined-RAM Causal Consistency Coherence.
YEAR 2006 The University of Auckland | New Zealand PRESENTATION Computer Science 703 Advance Computer Architecture 2006 Semester 1 Preparation for Test.
DISTRIBUTED COMPUTING
Computing & Information Sciences Kansas State University Wednesday, 05 Nov 2008CIS 560: Database System Concepts Lecture 28 of 42 Wednesday, 05 November.
Memory Consistency Zhonghai Lu Outline Introduction What is a memory consistency model? Who should care? Memory consistency models Strict.
ECE 1747: Parallel Programming Basics of Parallel Architectures: Shared-Memory Machines.
CIS 720 Distributed Shared Memory. Shared Memory Shared memory programs are easier to write Multiprocessor systems Message passing systems: - no physically.
ICFEM 2002, Shanghai Reasoning about Hardware and Software Memory Models Abhik Roychoudhury School of Computing National University of Singapore.
(Superficial!) Review of Uniprocessor Architecture Parallel Architectures and Related concepts CS 433 Laxmikant Kale University of Illinois at Urbana-Champaign.
Distributed shared memory u motivation and the main idea u consistency models F strict and sequential F causal F PRAM and processor F weak and release.
Multiprocessor  Use large number of processor design for workstation or PC market  Has an efficient medium for communication among the processor memory.
1 Lecture 17: Multiprocessors Topics: multiprocessor intro and taxonomy, symmetric shared-memory multiprocessors (Sections )
Computer Architecture Lecture 28: Memory Consistency and Cache Coherence Prof. Onur Mutlu Carnegie Mellon University Spring 2015, 4/8/2015.
Fundamentals of Memory Consistency Smruti R. Sarangi Prereq: Slides for Chapter 11 (Multiprocessor Systems), Computer Organisation and Architecture, Smruti.
740: Computer Architecture Memory Consistency Prof. Onur Mutlu Carnegie Mellon University.
1 Written By: Adi Omari (Revised and corrected in 2012 by others) Memory Models CDP
Siva and Osman March 7, 2000 Cache Coherence Schemes for Multiprocessors Sivakumar M Osman Unsal.
Symmetric Multiprocessors: Synchronization and Sequential Consistency

COSC6385 Advanced Computer Architecture
CS5102 High Performance Computer Systems Memory Consistency
Lecture 21 Synchronization
Lecture 11: Consistency Models
Symmetric Multiprocessors: Synchronization and Sequential Consistency
Consistency Models.
Shared Memory Consistency Models: A Tutorial
Symmetric Multiprocessors: Synchronization and Sequential Consistency
DATA CENTRIC CONSISTENCY MODELS
Multiprocessor Highlights
Distributed Shared Memory
Lecture 10: Consistency Models
Programming with Shared Memory Specifying parallelism
Lecture 11: Relaxed Consistency Models
Lecture 11: Consistency Models
Outline Theoretical Foundations
Presentation transcript:

Processor Consistency [Goodman 1989]* Processor Consistency is a memory model in which the result of any execution is the same as if the operations of each individual processor appear in program order According to the definition, the order in which writes from two processes occur, as observed by themselves or a third processor need not be identical, but writes issuing from any processor may not be observed in any order other than that in which they are issued. In addition, there must be a unique view of writes to the same location. J. Goodman. Cache consistency and sequential consistency. Technical Report 61, IEEE Scalable Coherent Interface Working Group, Mar (*)

Understanding Processor Consistency Process 1 write x,1 write x,2 Process 2 read x,2 read x,1 Process 1 write x,1 write y,2 Process 2 read y,2 read x,0 Not PC: writes of proc. 1 are seen in different order. Not Coherent: no serialization for X. Not PC: writes of proc. 1 are seen in different order. Coherent.

Understanding Processor Consistency (cont.) PC (despite cyclic dependency). Coherent. Process 1 write x,1 Process 2 read x,1 write y,1 Process 3 read y,1 read x,0 Process 1 write x,1 write z,1 read y,0 Process 2 write y,1 write z,2 read x,0 Not PC. Cannot agree on order of writes to Z. Coherent.

Operational Specification of Memory Models Specifies ordering requirements for supporting a given memory model. Performing a Memory Request: –A read by P i is considered performed with respect to process P k at a point in time when the issuing of a write to the same address by P k can not affect the value returned by the read. –A write by P i is considered performed with respect to process P k at a point in time when an issued read to the same address by P k returns the value defined by this write. –An access is performed when it is performed with respect to all processes.

Operational Specification of Memory Models (cont.) Previous access is an access that appears before the given access in program order of the given process. Gharachorloo et al. gave an operational definition of Processor Consistency. However the memory model they defined, is not comparable with Goodman’s Processor Consistency.

Processor Consistency [Gharachorloo et al. 1990]* Note: reads following a write may bypass the write and perform first (even read of same memory location!). writes (same/different locations) by different processes may be seen by different processes to perform in different orders. Conditions for Processor Consistency: (A)Before a read is allowed to perform with respect to any other process, all previous read accesses must be performed, and (B) Before a write is allowed to perform with respect to any other process, all previous read and write accesses must be performed. K. Gharachorloo, D. Lenoski, J. Laudon, P. Gibbons, A. Gupta, and J.L. Hennessy. Memory consistency and event ordering in scalable shared-memory multiprocessors. In Proceedings of the 17th Annual International Symposium on Computer Architecture, pages IEEE, May (*)

Comparing Processor Consistencies Process 1 write x,1 write y,1 Process 2 read y,1 read z,0 Process 3 write z,1 write v,1 Process 4 read v,1 read x,0 According to PC2 no reordering can be made. Therefore, due to the cyclic dependency, no legal PC2 execution is possible ! Denote the Goodman’s PC by PC1 Denote the Gharachorloo et al. PC by PC2 PC1 and PC2 are not comparable. Lets see why. Consider the following example. It is PC1 but not PC2.

Comparing Processor Consistencies (cont.) Consider another example. It is PC2 but not PC1 It is PC2, because according to rule (B) reads can be moved to the beginning at both processes. It is not PC1 because there is no execution in which processes agree on their order of writes to Z. Process 1 write x,1 write z,1 read y,0 Process 2 write y,1 write z,2 read x,0

PRAM Consistency* They often confuse PC with PRAM consistency due to the subtle difference between them. Goodman’s PC (PC1) can be defined as a memory model that is PRAM consistent and in which writes to the same memory location are seen in the same sequential order by all processes. PRAM is a memory model in which writes performed by a single process are seen by all other processes in the order in which they were issued, but writes from different processes may be seen in different orders by different processes. R. J. Lipton and J. S. Sandberg. PRAM: A scalable shared memory. Technical Report , Department of Computer Science, Princeton University, September (*)

PRAM Consistency (cont.) According to the definitions PC1 is stronger then PRAM. The following example is PRAM but no PC1: Process 1 write x,1 read x,2 Process 2 write x,2 read x,1 It is PRAM because both processes see writes of each processors alone in the same order (because there is only one write per process). It is not PC1 because given the constraints imposed by read/write dependencies and program order, the processes can not agree on the order of writes to X.

Causal Consistency* Hard to implement in hardware. Needs graph of dependencies Causal Consistency: Writes that are potentially causally related must be seen by all processes in the same order. Concurrent writes may be seen in a different order on different machines. Weakens sequential consistency by making distinction between events that are potentially causally related and events that are not. M. Ahamad, G. Neiger, P. Kohli, J. Burns, and P. Hutto. Causal Memory: Definitions, Implementation, and Programming. Distributed Computing, 9(1), 93. (*)

Causal Consistency (cont.) Process 1 write x,1 Process 2 write y,1 Process 3 read y,1 read x,0 Process 4 read x,1 read y,0 Causally consistent NOT causally consistent Process 1 write x,1 Process 2 read x,1 write y,1 Process 3 read y,1 read x,0 Process 4 read x,1 read y,0