4
Software Challenge: How to assure increased performance? Past: More transistors per chip and faster clock rate Same program would execute faster on new processor Emerging Trend and Future: Parallel hardware (multi-cores) Programs must be concurrent Applications must be reprogrammed to use parallelism The free lunch is over: A fundamental turn towards concurrency in software Herb Sutter

13
Memory Model Specifications in Practice Intel Architecture Manual (2008) Intel 64 memory ordering obeys following principles 1. Loads are not reordered with other loads 2. Stores are not reordered with other stores 3. Stores are not reordered with older loads 4. Loads may be reordered with older stores to different locations but not with older stores to same locations 4 more rules + Illustrative examples

15
Formalization of Relaxed  Program Order: x < p y if x and y are instructions belonging to the same thread and x appears before y  Execution over a set X of accesses is correct wrt Relaxed if there exists a total order < over X such that 1.If x < p y, and both x and y are accesses to the same address, and y is a store, then x < y must hold 2.For a load l and a store s visible to l, either s and l have same value, or there exists another store s’ visible to l with s < s’ A store s is visible to load l if they are to the same address and either s < l or s < p l (i.e. stores are locally visible)  Constraint-based specification that can be easily encoded in logical formulas