This preview shows page 1. Sign up to view the full content.
Unformatted text preview: hows two example executions of this 5.13. UNDERSTANDING MEMORY PERFORMANCE 257 Load Unit
Address Data Address Data Store Unit
Address Data Matching Addresses Address Data Data Cache Figure 5.34: Detail of Load and Store Units. The store unit maintains a buffer of pending writes. The load unit must check its address with those in the store unit to detect a write/read dependency. function, when it is called for a two-element array a, with initial contents ½¼ and ½ , and with argument cnt equal to 3. These executions illustrate some subtleties of the load and store operations. In example A of Figure 5.33, argument src is a pointer to array element a, while dest is a pointer to array element a. In this case, each load by the pointer reference *src will yield the value ½¼. Hence, after two iterations, the array elements will remain ﬁxed at ½¼ and , respectively. The result of the read from src is not affected by the write to dest. Measuring this example, but over a larger number of iterations, giv...
View Full Document
- Spring '10
- The American