Question

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:

  1. Determine the address fields for index, tag and block offset in the memory address.
  2. How many sets are there in the cache?
  3. How many blocks in the main memory are mapped to the same set of blocks in cache?
  4. If associative (parallel) comparison is to be performed with all tags for identification, how many XOR gates are required?
  5. Determine the hit ratio in running each of the following program segments (each instruction occupies a word):
    1. m a sequence of 100 consecutive instructions starting from address x148 with each instruction executed once in order
    2. a loop of 32 consecutive instructions starting at location x148 and is iterated 20 times
    3. a loop of 64 consecutive instructions starting at location x148 and is iterated 20 times

Homework Answers

Answer #1

B.

Total # of block inside cache = Cache size / Block size

=128/32 = 4

Therefore total number of set = 4/2 = 2

A.

Since total of set inside cache = 2

Number of index bits = log 2 = 1 bit

Block offset = log (Block size) = log 32 = 5 bits

Memory bits= log 1024 = 10 bits

Tag bits = 10 - 1 - 5 = 4 bits

C.

Total # of block in main memory = 1024/32 = 32

Now since we have 2 set, number of block mapped to one set is 32/2 = 16

D. In fully associative mapping, number of tag bits = 5 since index bits = 0.

So # of XOR gate required = # of tag bits = 5

Please don't post so many questions at once. Only one question or 4 sub question at a time is what we have been asked to solve . If you have any questions comment down and 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
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...
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
1. Suppose we have a 32KB direct-mapped data cache with 32-byte blocks. a) Show how a...
1. Suppose we have a 32KB direct-mapped data cache with 32-byte blocks. a) Show how a 32-bit memory address is divided into tag, index and offset. Show clearly how many bits are in each field. b) How many total bits are there in this cache? 2. Suppose we have a 8KB direct-mapped data cache with 64-byte blocks. a) Show how a 32-bit memory address is divided into tag, index and offset. Show clearly how many bits are in each field....
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.)
1. The memory units that follow are specified by the number of words times the number...
1. The memory units that follow are specified by the number of words times the number of bits per word. How many address lines and input/output data lines are needed in each case? (a) 8K X 16 (b) 2G X 8 (c) 16M X 32 (d) 256K X 64 2. Give the number of bytes stored in each memory unit in question 1. 3. Word number 563 decimal in the memory shown in Fig. 7.3 (see Mano-Ch7.pdf) contains the binary...
Microprocessor 8086 material. Choose the correct answer. 1- For a (64K x 8) RAM, the number...
Microprocessor 8086 material. Choose the correct answer. 1- For a (64K x 8) RAM, the number of address lines is: * 17 19 16 15 20 14 18 2-Which of the following instructions requires (BYTE PTR)? * SHR [500H], 3h LDS SI, [1000H] LAHF PUSH [9AAH] ADD AX, [800H] 3-Where are the interrupt vectors located in the microprocessor’s memory? * in the first 64K byte in the first 1K byte in the first 256K byte in the first 1M byte...
What tools could AA leaders have used to increase their awareness of internal and external issues?...
What tools could AA leaders have used to increase their awareness of internal and external issues? ???ALASKA AIRLINES: NAVIGATING CHANGE In the autumn of 2007, Alaska Airlines executives adjourned at the end of a long and stressful day in the midst of a multi-day strategic planning session. Most headed outside to relax, unwind and enjoy a bonfire on the shore of Semiahmoo Spit, outside the meeting venue in Blaine, a seaport town in northwest Washington state. Meanwhile, several members of...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT