KB 32

Lab 3 Cache Performance
(1)Understand the basic concepts, organizational structure and working principles of Cache¡£ (2)Master the influence of Cache capacity, associativity and block size on Cache performance. (3)Master all kinds of methods to reduce the miss rate of Cache and the benefits of these methods to improve the performance of Cache.
The experimental platform adopts Cache simulator ¡ª MyCache
3.3 Contents
First of all, we should master the use of Cache simulator ¡ª MyCache
3. 3. 1 Effect of Cache Capacity on Miss Rate
(1)Start MyCache.
(2)Click the Reset button with the mouse to set the parameters to default values.
(3) Selectanaddressstreamfile.Method:Selectthe”AccessAddress” ¡ú”AddressStreamFile” option, and then click the “Browse” button to select from the “Address Stream” folder under the folder where the simulator is located.
(4)Choose different Cache capacities, including 2KB, 4KB, 8KB, 16KB, 32KB, 64KB, 128KB and 256KB. Execute the simulator separately (click the “Execute to the end” button to execute), and then record the miss rate in various situations in Table 3.1.
Table 3.1 Cache’s Miss Rate under different Capacity
Cache Capacities (KB)
CS Help, Email: tutorcs@163.com
Address Stream File Name:
(5)With Capacity as abscissa, draw the curve of miss rate varying with Cache capacity, and specify the address stream file name.
(6)Based on the simulation results, what conclusions can you draw?
3.3.2 Effect of Associativity Degree on Miss Rate
(1)Click the Reset button with the mouse to set the parameters to default values. Cache capacity at this time is 64KB
(2)Selectanaddressstreamfile.Method:Selectthe”AccessAddress” ¡ú”AddressStreamFile” option, and then click the “Browse” button to select from the “Address Stream” folder under the folder where the simulator is located.
(3)Choose different Cache Associativity, including direct mapping, 2-way, 4-way, 8-way, 16-way and 32-way. Execute the simulator separately (click the “Execute to the end” button to execute), and then record the miss rate in various situations in Table 3.2.
Table 3.2 Cache’s Miss Rate under different Associativity degree when the capacity is 64KB 32
Address Stream File Name:
(4)Set the capacity of Cache to 256KB, repeat the work of (3) and fill in the table 3.3.
Table 3.3 Cache’s Miss Rate under different Associativity degree when the capacity is 256KB
(5)With the degree of Associativity as abscissa, draw the curve of the miss rate varying with the degree of Cache Associativity in the case of 64KB and 256KB, and indicate the address stream file name.
(6)Based on the simulation results, what conclusions can you draw?
Associativity
Associativity

3. 3. 3 Effect of Cache Block Size on Miss Rate
(1)Click the Reset button with the mouse to set the parameters to default values. (2)Selectanaddressstreamfile.Method:Selectthe”AccessAddress” ¡ú”AddressStreamFile” option, and then click the “Browse” button to select from the “Address Stream” folder under the folder where the simulator is located.
(3)Choose different Cache Block sizes, including 16B, 32B, 64B, 128B and 256B. For Cache’s various capacities, including 2KB, 8KB, 32KB, 128KB and 512KB. Execute the simulator separately (click the “Execute to the end” button to execute), and then record the miss rate in various situations in Table 3.4.
Table 3.4 Cache’s Miss Rate under various Block sizes Cache Capacity(KB)
Block sizes (B)
Address Stream File Name:
(4)Analyze the influence of Cache Block size on Miss Rate.
3.4 Use of Simulator MyCache
(1)Start the simulator. Double-click MyCache.exe with the mouse to start.
(2)The system opens an operating interface. The left side of the interface is the area of setting simulation parameters, and the right side is the area of displaying simulation results, as shown in Figure 3.1.

Figure 3.1 Operating interface diagram of MyCache simulator
(3)The parameters that can be set include whether to unify or separate Cache, Cache’s capacity, block size, associativity, replacement algorithm, prefetch strategy, write strategy, and block strategy in case of miss. You can select directly from the list.
(4)Access addresses can be selected from address stream files or manually entered. If the former is the case, you can select the Address Stream file (.din file) from the Address Stream folder under the folder where the simulator is located by clicking the Browse button, and then execute it. The way of execution can be either step-by-step or one-time execution to the end. If you choose to enter manually, you can enter the block address in the Execution Control area, and then click the Access button. The system displays the access type, address, block number and in-block address on the right side of the interface.
(5)The simulation results include:
1 Total number of access, total number of misses, total percentage of misses.
2 The number of instructions read, the number of misses and the miss rate.
3 The number of read data operations, the number of misses and the miss rate.
4 The number of write data operations, the number of misses and the miss rate.
5 Manually enter information about a single access.
程序代写 CS代考 加QQ: 749389476
Lab 3 Cache Performance
Class: Student ID: Name:
浙大学霸代写 加微信 cstutorcs