barcodefontsoft.com

MEMORY in .NET Creation pdf417 2d barcode in .NET MEMORY

MEMORY generate, create none none in none projects Case Code referenced word is none none not in the cache, then a free location is created in the cache and the referenced word is brought into the cache from the main memory. The word is then accessed in the cache. Although this process takes longer than accessing main memory directly, the overall performance can be improved if a high proportion of memory accesses are satis ed by the cache.

Modern memory systems may have several levels of cache, referred to as Level 1 (L1), Level 2 (L2), and even, in some cases, Level 3 (L3). In most instances the L1 cache is implemented right on the CPU chip. Both the Intel Pentium and the IBM-Motorola PowerPC G3 processors have 32 Kbytes of L1 cache on the CPU chip.

A cache memory is faster than main memory for a number of reasons. Faster electronics can be used, which also results in a greater expense in terms of money, size, and power requirements. Since the cache is small, this increase in cost is relatively small.

A cache memory has fewer locations than a main memory, and as a result it has a shallow decoding tree, which reduces the access time. The cache is placed both physically closer and logically closer to the CPU than the main memory, and this placement avoids communication delays over a shared bus. A typical situation is shown in Figure 7-12.

A simple computer without a cache. CPU 400 MHz Cache CPU 400 MHz Main Memory 10 MHz Main Memory 10 MHz Bus 66 MHz Without cache Figure 7-12 Placement of cache in a computer system. Bus 66 MHz With cache memory is shown in none for none the left side of the gure. This cache-less computer contains a CPU that has a clock speed of 400 MHz, but communicates over a 66 MHz bus to a main memory that supports a lower clock speed of 10 MHz. A few bus cycles are normally needed to synchronize the CPU with the bus, and thus the difference in speed between main memory and the CPU can be as large as a factor of ten or more.

A cache memory can be positioned closer to the CPU as shown in the right side of Figure 7-12, so that the CPU sees fast accesses over a 400 MHz direct path to the cache.. MEMORY 7.6.1 ASSOCIATIVE MAPPED CACHE A number of hardwar e schemes have been developed for translating main memory addresses to cache memory addresses. The user does not need to know about the address translation, which has the advantage that cache memory enhancements can be introduced into a computer without a corresponding need for modifying application software. The choice of cache mapping scheme affects cost and performance, and there is no single best method that is appropriate for all situations.

In this section, an associative mapping scheme is studied. Figure 7-13 shows an associative mapValid Dirty Tag 27 Slot 0 Slot 1 Slot 2 . .

. Slot 214 1 Cache Memory Block 0 Block 1 . .

. Block 128 Block 129 . .

. Block 227 1 Main Memory. Figure 7-13 An associative mapping scheme for a cache memory. 32 words per block ping scheme for a 2 none none 32 word memory space that is divided into 227 blocks of 25 = 32 words per block. The main memory is not physically partitioned in this way, but this is the view of main memory that the cache sees. Cache blocks, or cache lines, as they are also known, typically range in size from 8 to 64 bytes.

Data is moved in and out of the cache a line at a time using memory interleaving (discussed earlier). The cache for this example consists of 214 slots into which main memory blocks are placed. There are more main memory blocks than there are cache slots, and any one of the 227 main memory blocks can be mapped into each cache slot (with only one block placed in a slot at a time).

To keep track of which one of the 227 possible blocks is in each slot, a 27-bit tag eld is added to each slot which holds an identi er in the range from 0 to 227 1. The tag eld is the most signif-.
Copyright © barcodefontsoft.com . All rights reserved.