Computer Science, asked by ritika9390, 4 months ago

A two-way set-associative cache has lines of 16 bytes and a total size of 8 Kbytes. The 64-Mbyte main memory is byte addressable. Show the format of main memory addresses.

Answers

Answered by gtaruni
16

Answer:

There are a total of 8 kbytes/16 bytes = 512 lines in the cache. Thus the cache consists of 256 sets of 2 lines each. Therefore 8 bits are needed to identify the set number. For the 64-Mbyte main memory, a 26-bit address is needed.

Answered by tripathiakshita48
0

Answer:

The size of the physical address space of a processor is 2p bytes. The word length is 2w bytes.

Explanation:

There are a total of 8 kbytes/16 bytes = 512 lines in the cache. Thus the cache consists of 256 sets of 2 lines each. Therefore 8 bits are needed to identify the set number. For the 64-Mbyte main memory, a 26-bit address is needed.

Number of sets = 64/4 = 16

The cache is divided into 16( =  2⁴) sets

Therefore, 4 bits are needed to identify the set number.

Main memory consists of 4K = 2¹² blocks.

Therefore, the  set + tag lengths must be 12 bits  

tag length = 12 - 4 = 8

Each block contains 128 words = 2⁷ words

Therefore, 7 bits are needed to specify the word field

So the main memory can be represented as

TAG - 8

SET -  4

WORD - 7

For more related question : https://brainly.in/question/7067526

#SPJ5

Similar questions