CSC/ECE 506 Spring 2012/10a dr: Difference between revisions
(→B) |
(→C) |
||
Line 14: | Line 14: | ||
If k | If k | ||
[[File:untitled1.png|thumb|right|upright|350px|The fixed sequential prefetching mechanism]] | |||
===D === | ===D === |
Revision as of 02:35, 3 April 2012
Prefetching and consistency models
Introduction
In
Prefetching
a
B
C
If k
D
PrefetchBit (per Cache Line) | Used to detect useful prefetches (needed when prefetching is tumed on.) |
ZeroBit (per cache line) | Used to detect when a prefetch would have been useful (needed when prefetching is turned off.) |
LookaheadCounter (per cache) | The current degree of prefetching (per cache) |
PrefetchCounter (per cache) | Counts the number of prefetches that have been I returned after each read miss |
UsefulCounter (per cache) | Counts the number of useful prefetches |
Consistency models <ref>http://titanium.cs.berkeley.edu/papers/kamil-su-yelick-sc05.pdf</ref> <ref>http://www.hpl.hp.com/techreports/Compaq-DEC/WRL-95-7.pdf</ref>
The interface for memory in a shared memory multiprocessor is called a memory consistency model. As the interface between the programmer and the system, the effect of the memory consistency model is pervasive in a shared memory system. The model affects programmability because programmers must use it to reason about the correctness of their programs. The model affects the performance of the system because it determines the types of optimizations that may be exploited by the hardware and the system software. Finally, due to a lack of consensus on a single model, portability can be affected when moving software across systems supporting different models.
A memory consistency model specification is required for every level at which an interface is defined between the programmer and the system. At the machine code interface, the memory model specification affects the designer of the machine hardware and the programmer who writes or reasons about machine code. At the high level language interface, the specification affects the programmers who use the high level language and the designers of both the software that converts high-level language code into machine code and the hardware that executes this code. Therefore, the programmability, performance, and portability concerns may be present at several different levels.
In summary, the memory model influences the writing of parallel programs from the programmer’s perspective, and virtually all aspects of designing a parallel system (including the processor, memory system, interconnection network, compiler, and programming languages) from a system designer’s perspective.
The memory consistency model in shared memory parallel programming controls the order in which memory operations performed by one thread may be observed by another. Consistency models are used in distributed systems like distributed shared memory systems or distributed data stores (such as a filesystems, databases, optimistic replication systems or Web caching). The system supports a given model, if operations on memory follow specific rules. The data consistency model specifies a contract between programmer and system, wherein the system guarantees that if the programmer follows the rules, memory will be consistent and the results of memory operations will be predictable.
Sequential Consistency Model (SC)
When
Relaxed Consistency Models
So
Conclusion
H
Using
I
Even
External links
1. Sequential hardware prefetching in shared-memory multiprocessors
2. Making Sequential Consistency Practical in Titanium
References
<references/>