We have a 4 KB direct-mapped data cache with 4-byte blocks.
Consider this address trace:
0x48014554
0x48014548
0x48014754
0x48034760
0x48014554
0x48014560
0x48014760
0x48014554
For this cache, for each address in
the above trace, show the tag, index and offset in binary
(or hex).
Indicate whether each reference is a hit or a miss. What is the
miss rate?
1) 0x48014554 ----->01001000000000010100010101010100
tag=01001000000000010100
index=0101010101
offset=00----------------------------.MISS
2)0x48014548---->1001000000000010100010101001000
TAG=01001000000000010100
Index= 0101010010
offset=00--------------------------------------->MISS
3)0x48014754------------------->01001000000000010100011101010100
Tag=01001000000000010100
index=0111010101
offset=00--------------------------------->MISS
4)0x48034760 ------------------->01001000000000110100011101100000
TAG=01001000000000110100
index=0111011000
offset=00------------------------------->MISS
5)0x48014554--------------------->01001000000000010100010101010100
TAG=01001000000000010100
INDEX=0101010101
OFFSET=00------------------------------------>HIT
6)0x48014560 ------------------------>01001000000000010100010101100000
TAG=01001000000000010100
INDEX=0101011000
OFFSET=00--------------------------->MISS
7 ) 0x48014760 ----------------------------->01001000000000010100011101100000
TAG=01001000000000010100
INDEX=0111011000
OFFSET=00----------------------------------------------->HIT
8) 0x48014554----------------------------->01001000000000010100010101010100
TAG=01001000000000010100
INDEX=0101010101
OFFSET=00-------------------------------------->HIT
MISS RATE=no of misses/total =5/8=0.625---->62%
We have a 4 KB direct-mapped data cache with 4-byte blocks. Consider this address trace: 0x48014554 0x48014548 0x48014754 0x48034760 0x48014554 0x48014560 0x48014760 0x48014554 For this cache, for eac...
3. 12+2-4 points] We are comparing the two caches in Problem 1 and Problem 2. Suppose both caphes have a hit time of 2 cycles. The cache in Problem 1 has a miss penalty of 15 cycles. The one in Problem 2 has a miss penalty of 25 cycles. Calculate the total time taken (in cycles) for all accesses, for each cache. Which cache is better- the one in Problem 1 or Problem 2? 3. 12+2-4 points] We are comparing...
Please answer all parts correctly and show your work 3- for a direct mapped cache design with a 32 bit address, the following bits of address are used to access the cache Tag Index Offset 31-10 9-5 4-0 Starting from power on, the following byte addressed cache reference are recorded. Address 0 16 132 232 160 1024 30 140 3100180 2180 d. How many blocks are replaced e. What is the hit ratio f. List final state of the cache,...
a) Suppose we have a 64 KB, direct-mapped cache with 8-word blocks. Determine how many bits are required for the tag, index, and offset fields for a 32-bit memory address. b) If instead, we use a 64 KB, 4-way set-associative cache with 8-word blocks, how many bits will be required for the tag, index, and offset fields for a 32-bit address? c) What type of cache is shown in problem 2? How many bits are required for this cache’s tag,...
Assume the cache can hold 64 kB. Data are transferred between main memory and the cache in blocks of 4 bytes each. This means that the cache is organized as 16K=2^14 lines of 4 bytes each. The main memory consists of 16 MB, with each byte directly addressable by a 24-bit address (2^24 =16M). Thus, for mapping purposes, we can consider main memory to consist of 4M blocks of 4 bytes each. Please show illustrations too for all work. Part...
Question 33 10 pts For a direct mapped cache of 4 blocks with a cache block size of 1 byte, in which cache block will each memory location map to? The order of accesses if given by the operation number. Indicate if each access is a hit or a miss, and what the tag value is for each entry. Assume that the cache is initially empty, and the accesses are in order of appearance. REDRAW AND COMPLETE THE CACHE TABLE...
6. (30) Consider a 64B direct-mapped cache with 16B blocks and 4 sets for an 8-bit architecture (i.e., 256 bytes of memory): a. (5) Write a C function unsigned char getTag(unsigned char address) that returns the cache tag for the specified address using bitwise operators: b. (5) Write a C function unsigned char getSet(unsigned char address) that returns the cache set for the specified address using bitwise operators: c. (10) Considering the following sequence of memory addresses, which addresses will...
For a 16K-byte, direct-mapped cache, suppose the block size is 32 bytes, draw a cache diagram. Indicate the block size, number of blocks, and address field decomposition (block offset, index, and tag bit width) assuming a 32-bit memory address.
Targeted Course Learning Outcomes: CLO 2.1 Question 1: Using the “Direct Mapped Cache”, assume that 4-blocks, 1 word/block, direct mapped Initial state is empty as shown below. Index V Tag Data 00 N 01 N 10 N 11 N And the following addresses have been requested in the following sequences: Request 1: Word Addresses 4, 5 and 7 Request 2: Word Addresses 0, 1 and 3 Request 3: Word Addresses 1, 2 and 3 Request 4: Word Addresses 3, 4...
Suppose a computer using direct mapped cache has 232 byte of byte-addressable main memory, and a cache of 1024 blocks, where each cache block contains 32 bytes. a. How many blocks of main memory are there? b. What is the format of a memory address as seen by the cache, i.e., what are the sizes of the tag, block, and offset fields? c.To which cache block will the memory address 0x000063FA map?
Caches are important to providing a high-performance memory hierarchy to processors. Below is a list of memory address references, given as word addresses (in decimal, the byte-offset bits have been excluded from addresses). 1, 4, 8, 5, 20, 17, 4, 56, 9, 10, 43, 5, 6, 9, 17 For each of these references, identify the binary address, the tag, and the index given a direct-mapped cache with two-word blocks (two words per block) and a total size of 8 blocks....