< previous page page_359 next page >

Page 359
0359-01.gif
Figure 6.9
Assignment of address space to m memory modules in an
interleaved memory system.
sive memory locations are assigned to distinct memory modules in the following manner: for m memory modules, labeled 0 through (m - 1), memory address x is assigned to module x mod m (Figure 6.9). A memory organization with a partitioning strategy of this kind is termed an interleaved memory system, and the number of memory modules is termed the degree of interleaving.
In general, the computation of x mod m involves a division operation, but when m is a power of two, it degenerates to a masking operation. In this case, the partitioning scheme is termed low-order interleaving, since the memory module to be referenced is determined by the low-order bits of the memory address. The address within the selected module is provided by the remaining higher-order bits of the memory address.
However, programs are often quite perverse in the manner in which they generate their references. Sequential reference patterns, when they do occur, are usually of short duration, and it is more common for successive references to hop back and forth in an apparently random manner; but matters can get worse yet! For instance, if the program is referencing equally spaced items of an array in a manner such that the difference in the addresses of successive references is a multiple of m, then every reference ends up being directed at the same memory module. This constitutes the worst possible degradation in memory bandwidth, for the achieved memory bandwidth will be that of a single module regardless of how large m is. The same thing happens, albeit to a lesser extent, if the program is stepping through an array with a step size that is not relatively prime with respect to m. Viewed in this light, a power of two would appear to be a poor choice for m, since it offers considerable opportunity for the step size not to be relatively prime. Selecting m to be prime would minimize the likelihood of experiencing such severe degradation, but would add the expense and complication of having to perform some operation to compute the module index. This is discussed more completely in chapter 7.
Memory addresses can also be mapped to individual memory modules by higher-order or quotient-class interleaving. The differences between high-and low-order interleaving are shown in Figure 6.10. In higher-order interleaving, the upper bits of the memory system address define a module and

 
< previous page page_359 next page >