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 1) For the hexadecimal main memory addresses F6125Chex, when it is loaded to cache memory using direct mapping, where will it be
stored? Show the following information: Tag, Line number and word offset (show in binary, no conversion to hex is needed)
Part 2) If the next instruction is the content stored at 160004 hex in main memory and in cache memory, line number 0001 hex
has a tag 00 hex. Will we have a cache hit event or cache miss, why? (hint: check the line number and tag of 160004, if matches with the cache line and tag,
then cache hit; if catch line does not match, then cannot determine. Otherwise, cache miss)
Part 3) For the hexadecimal main memory addresses FFF666, show the following information: Tag, set and word values for a four-way set- associative cache
(show in binary, no conversion to hex is needed)
First some notes :
Part 1)
0xF6125C :
Part 2)
0x160004
So, 0x160004 corresponds to cache-line 0x0001 with tag 0x16.
Currently, cache-line 0x0001 has tag 0x00 stored, so this is a collision case, and hence we have a cache-miss.
C)
In this case,
(As a side-note, here in 4-way set-associative cache, each set can store a maximum of 4 tags).
So, for 0xFFF666,
Assume the cache can hold 64 kB. Data are transferred between main memory and the cache...
Example 4.2 For all three cases, the example includes the following elements: The cache can hold 64 Kbytes. Data are transferred between main memory and the cache in blocks of 4 bytes each. This means that the cache is organized as 16K = 214 lines of 4 bytes each. The main memory consists of 16 Mbytes, with each byte directly addressable by a 24-bit address (24 = 16M). Thus, for mapping purposes, we can consider main memory to consist of...
A computer system has a 64 KB main memory and a 4 KB (data area only) cache. There are 8 bytes/cache line. Determine (1) the number of comparators needed and (2) the size of the tag field, for each of the following mapping schemes: a. Fully associative A computer system has a 64 KB main memory and a 4 KB (data area only) cache. There are 8 bytes/cache line. Determine (1) the number of comparators needed and (2) the size...
A 2-way set associative cache consists of four sets 0, 1, 2, 3. The main memory is word addressable (i.e. treat the memory as an array of words indexed by the address). It contains 2048 blocks 0 through 2047, and each block has eight words. (a) How many bits are needed to address the main memory? (b) Show how a main memory address will be translated into a tag, a set number, and an offset within a block. Illustrate this...
Problem 6. Suppose we have a computer with 32 megabytes of main memory, 256 bytes of cache, and a block size of 16 bytes. For each configuration below, determine the memory address format, indicating the number of bits needed for each appropriate field (i.e. tag, block, set, offset). Show any relevant calculations. Direct cache mapping and memory is byte-addressable a) Direct cache mapping and memory is word-addressable with a word size of 16 bits b) c) 2-way set associative cache...
Please refer the following memory system : Main memory : 64 MB Cache memory: 64 KB Block size of 1 KB 1. Direct Mapping Offset bits? Number of lines in cache? Line number bits? Tag size? 2. Fully Associative Mapping Offset bits? Tag size? 3. 2-way set-associative mapping Offset bits? Number of lines in cache? Set number bits? Tag size? 4. 4-way set-associative mapping Offset bits? Number of lines in cache? Set number bits? Tag size?
A computer system has a 64 KB main memory and a 4 KB (data area only) cache. There are 8 bytes=cache line. Determine (1) the number of comparators needed and (2) the size of the tag field, for the following mapping scheme: Direct.
This question investigates cache use in different types of cache. Consider a system of 8Kbytes of byte-addressable main memory partitioned into blocks of 32bytes each. The system has cache of size 512bytes. 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. Scenario 1: The system uses directly mapped cache. How is the memory address to be interpreted? Address field Value Reason Word...
3. (12 points) Consider a cache has lines of 16 bytes and a total size of 16 kB. The main memory is 16MB and a word takes 4 bytes. For the hexadecimal main memory addresses FFF666, show the following information in hexadecimal format a. Tag and word values for associative cache b. Tag, set and word values for a two-way set-associative cache 3. (12 points) Consider a cache has lines of 16 bytes and a total size of 16 kB....
For a direct-mapped cache memory, the following data is given. Main memory Cache memory Size = 64KB Size = 128B Block size = 8Bytes Block size = 4Bytes Calculate the following: Number of blocks created in main memory. Number of blocks created in cache memory. The distribution of the address fields in the system. Q5. For a direct-mapped cache memory, the following data is given. Main memory Cache memory Size...
Consider a processor that has a 20-bit address and a 1K Byte Cache. The cache and main memory are divided into blocks where each block is 256 Bytes. If direct mapping is used, what is the tag size of each block in cache and how many tag comparisons are made for a one-cache access? Repeat part (1) for fully associative mapping. Repeat part (1) for 2 way set-associative cache. For the direct map find out which of the following accesses...