Question: This question investigates cache use in different types of cache. Consider a system of 32Kbytes of byte-addressable main memory partitioned into blocks of 128bytes each.
This question investigates cache use in different types of cache. Consider a system of 32Kbytes of byte-addressable main memory partitioned into blocks of 128bytes each. The system has cache of size 1Kbytes. The main memory blocks are being accessed in the order shown in the tables (the numbers are in decimal). Assuming the cache is empty at the start.
Complete the following information:
| Information | Value | Reason |
| Block size: | 128 = 27 bytes | Given by the question |
| Number of cache blocks: | ||
| Memory address length |
Scenario 1: The system uses directly mapped cache.
How is the memory address to be interpreted?
| Address field | Value | Reason |
| Word field length: | ? bits | Block size = ? |
| Block field length: | ? bits | Number of blocks = ? |
| Tag field length: | ? bits | Tag field length = Memory address length word field length block field length = ? |
Show whether each memory block access is a hit or a miss. Then compute the hit ratio.
| Memory block | Address Tag field | Address Block field | Address Word field | Maps to cache block | Hit/Miss |
| 1 | |||||
| 5 | |||||
| 7 | |||||
| 15 | |||||
| 9 | |||||
| 2 | |||||
| 1 | |||||
| 2 | |||||
| 7 | |||||
| 9 | |||||
| Total | ?/10 | ||||
Scenario 2: The system uses fully associative cache and first-in-first-out replacement policy.
How is the memory address to be interpreted?
| Address field | Value | Reason |
| Word field length: | ||
| Tag field length: |
Show whether each memory block access is a hit or a miss. Then compute the hit ratio.
| Memory block | Address Tag field | Address Word field | Maps to cache block | Hit/Miss |
| 1 | ||||
| 5 | ||||
| 7 | ||||
| 15 | ||||
| 9 | ||||
| 2 | ||||
| 1 | ||||
| 2 | ||||
| 7 | ||||
| 9 | ||||
| Total | ?/10 | |||
The system uses 2-way set associative cache and first-in-first-out replacement policy.
How is the memory address to be interpreted?
| Address field | Value | Reason |
| Word field length: | ||
| Set field length: | ||
| Tag field length: |
Show whether each memory block access is a hit or a miss. Then compute the hit ratio.
| Memory block | Address Tag field | Address Set field | Address Word field | Maps to cache | Hit/Miss | |
| set | block | |||||
| 1 | ||||||
| 5 | ||||||
| 7 | ||||||
| 15 | ||||||
| 9 | ||||||
| 2 | ||||||
| 1 | ||||||
| 2 | ||||||
| 7 | ||||||
| 9 | ||||||
| Total | ?/10 | |||||
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
