A computer has 512 words RAM with a word size of 32 bits and a cache memory of 8 Blocks with block size of 64 bits – IGNOU MCA Assignment 2014 – 15

By | October 2, 2014

MASTER OF COMPUTER APPLICATIONS
Course Code : MCS-012
Course Title : Computer Organisation and Assembly Language Programming
Assignment Number : MCA (2)/012/Assign /2014-15
Maximum Marks : 100
Weightage : 25%

A computer has 512 words RAM with a word size of 32 bits and a cache memory of 8 Blocks with block size of 64 bits. Draw a diagram to show the address mapping of RAM and Cache, if

(i)                Direct cache mapping is used

(ii)             Associative cache mapping is used, and

(iii)           Two way set associative mapping scheme is used.

Main memory Size = 512 Words

Main Memory word size = 32 bits

Cache Memory Size = 8 Blocks

Cache Memory Block size = 64 bits

⇒1 Block of Cache = 2 Words of RAM

⇒ Total number of possible Blocks in Main Memory = 512/8 = 64 block

 

Mapping01

 

Associative Mapping:

The block can be anywhere in the cache.

Direct Mapping:

Size of Cache = 8 blocks

Location of Block 12 in Cache = 12 modulo 8 = 4

2 Way set associative mapping:

Number of blocks in a set = 2

Number of sets = Size of Cache in blocks / Number of blocks in a set

= 8 / 2 = 4

Block 12 will be located anywhere in (12 modulo 4) set, that is set 0.