Question: Which method is right please look at both: 1) Cache block size = 16 bytes set is 2-way set associative Cache size is 64Kbytes Number

Which method is right please look at both:

1)

Cache block size = 16 bytes

set is 2-way set associative

Cache size is 64Kbytes

Number of cache lines N= 64*2^10 /16 = 4K

number of sets= N/p-way= 4K/2= 2k for which 11 bits are required.

main memory have 4Mbyte of size which requires 22 bits of address

tag Set Offset Word Offset
7 11

4

2)

main memory sixe = 4Mbytes

cache sixe = 64Kbytes

block size = 16bytes

line sets = 2 means 2 way set associative

Lines = cache size / block size = 64 Kbytes / 16 bytes

cache lines = 4096

sets = Lines / set-size

= 4 K / 2

= 2048

Number of blocks in main memory = 4Mbytes / 16 bytes

= 256 K

= 256 * 1024

= 2^8 * 2^10

= 2^18

We need 4-bits to address the 16 bytes bytes of each block

The 2048 lines of cache require 11-bits to be addressed

The remaining bits = 18 - (4 + 11) = 3 make up the TAG.

Give reasons why please

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!