Question

Assuming that a computer system has 64MBytes of main memory, 16Bytes of cache line and 64KBytes...

Assuming that a computer system has 64MBytes of main memory, 16Bytes of cache line and 64KBytes of cache size. A main memory address contains “A1E3”data in a particular memory cell. Transfer this data to the cache in direct mapping, associative mapping and 16-way set-associative mapping algorithms.

Homework Answers

Answer #1

Cache Line = 16B => Block Offset = log 16 = 4 bits.

Total # of block inside cache => 64KB /16 = 4K

Main memory = 64MB => 26 bits.

For Direct Mapping,

Index offset = log(#of blocks) = log 4k = 12 bits

Tag = 26 - 12 - 4 = 10 bits

Tag(10 bits) Index Offset (12 bits) Cache Offset (4 bits)

A1E3 => 000A1E3 => 0000000000 101000011110 0100

So Index offset => 101000011110 => 2590.

So A1E3 would be transferred to block # 2590 of cache.

Association Mapping: Here there is no restriction on the main memory block. It can be placed anywhere inside the cache.

Thus A1E3 can be placed in any one of 4k blocks.

16 way set associative:

Total # of set inside cache => 4K/16 = 256

So index offset = log 256 = 8

So tag bits = 26 - 8 - 4 = 14

Tag(14 bits) Index Offset (8) Block Offset (4)

A1E3 => 1010 0001 1110 0011

Here index bits = 00011110 => 30

So the memory block A1E3 belongs to set # 30 of cache.

If you have any questions comment down. Please don't simply downvote and leave. If you are satisfied with answer, please? upvote thanks....

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Suppose a computer using direct mapped cache has 224 bytes of byte-addressable main memory, and a...
Suppose a computer using direct mapped cache has 224 bytes of byte-addressable main memory, and a cache of 128 blocks, where each cache block contains 8 bytes. For four-way set associative cache, to which block of cache the address 0x1895BA maps? Group of answer choices Block 70 Block 16 Block 23 Not enough information
A 16 GB main memory has a 8 MB cache organized as a 8-way set associative...
A 16 GB main memory has a 8 MB cache organized as a 8-way set associative cache with 128 Byte cache blocks (line). How many cache blocks are there in the cache? How many sets are there in the cache? (Show your computation.) Show how the 36-bit address generated by the CPU would be divided to map into the cache. (Indicate the sizes of the tag, line, etc.)
Assume a byte-addressable memory has 64K bytes. Blocks are 8 bytes in length and the cache...
Assume a byte-addressable memory has 64K bytes. Blocks are 8 bytes in length and the cache consists of 4K bytes. Show the format for a main memory address assuming a 4-way set associative cache mapping scheme. Include the field names as well as their sizes. A direct-mapped cache consists of 8 blocks. Byte-addressable main memory contains 4K blocks of 8 bytes each. Access time for the cache is 22ns, and the time required to fill a cache slot from main...
A computer has a cache, main memory, and a disk used for virtual memory. If a...
A computer has a cache, main memory, and a disk used for virtual memory. If a word is in the cache, 30 ns are required to access it. If it is in main memory, but not in cache, 50 ns are needed to load it into the cache. And then the reference is started again. If the word is not in main memory, 15 milliseconds (1 millisecond = 106 ns) are required to fetch it from disk, followed by 50...
In a hypothetical system with 1024 bytes of main memory, 128 bytes of cache, blocks of...
In a hypothetical system with 1024 bytes of main memory, 128 bytes of cache, blocks of 32-byte size, with direct-map (S = 1) placement policy and LRU replacement policy, answer each of the following questions: Determine the address fields for index, tag and block offset in the memory address. How many sets are there in the cache? How many blocks in the main memory are mapped to the same set of blocks in cache? If associative (parallel) comparison is to...
In a hypothetical system with 1024 bytes of main memory, 128 bytes of cache, blocks of...
In a hypothetical system with 1024 bytes of main memory, 128 bytes of cache, blocks of 32-byte size, with direct-map (S = 2) placement policy and LRU replacement policy, answer each of the following questions: Determine the address fields for index, tag and block offset in the memory address. How many sets are there in the cache? How many blocks in the main memory are mapped to the same set of blocks in cache? If associative (parallel) comparison is to...
Consider a cache of 4 lines of 16 bytes each. Main memory is divided into blocks...
Consider a cache of 4 lines of 16 bytes each. Main memory is divided into blocks of 16 bytes each. That is, block 0 has bytes with addresses 0 through 15, and so on. Now consider a program that accesses memory in the following sequence of addresses: Once: 63 through 70. Loop two times: 15 through 32; 80 through 95. Suppose the cache is organized as two-​way set associative, with two sets of two lines each. Even-​numbered blocks are assigned...
In a general purpose computer system the CPU, the main memory and the cache may be...
In a general purpose computer system the CPU, the main memory and the cache may be interconnected via one or more shared system bus(es). However, the secondary storage units (eg. Hard disk) will only be connected to the system bus through an I/O controller. The following are three statements regarding the requirement for an I/O controller (i) The response times of I/O devices are very much slower than that of main memory and hence direct interfacing is impossible. (ii) It...
Suppose a 1024-byte cache has an access time of 0.1 microseconds and the main memory stores...
Suppose a 1024-byte cache has an access time of 0.1 microseconds and the main memory stores 1 Mbytes with an access time of 1 microsecond. A referenced memory block that is not in the cache must be loaded into the cache and the reference started again. Answer the following questions: i. What is the number of bits needed to address the main memory? ii. If the cache hit ratio is 95%, what is the average access time for a memory...
1.) Perform the following multiplication using Booth’s algorithm: (You will receive full credit only if you...
1.) Perform the following multiplication using Booth’s algorithm: (You will receive full credit only if you show all your work)      13 x -13 (a) 27/4 Using paper pencil approach and (b) simulate how a machine does this job 2.)Perform the following division as directed: (a) 27/4 using non-restoring division algorithm // we need 4 quotient bits. (b) Using Newton-Raphson algorithm find 1/d when d=0.84 // show the results of the first 3 iterations 3.) A real-time computer system has...