To determine how the mapping works ,we must know several things ,match the following:
|
How many bits are in the main memory address |
Answer Choose from: is determined by size of the block field; is determined by the Size of the offset field; is determined by the tag field; is determined by the set field; is determined by how many addresses exist in main memory. |
|
How many addresses are in a block? |
Answer Choose from: is determined by size of the block field; is determined by the Size of the offset field; is determined by the tag field; is determined by the set field; is determined by how many addresses exist in main memory. |
|
How many blocks are in cache |
Answer Choose from: is determined by size of the block field; is determined by the Size of the offset field; is determined by the tag field; is determined by the set field; is determined by how many addresses exist in main memory. |
First question:-
How many bits are in the main memory address ?
The right option is e). is determined by how many addresses exist in main memory.
suppose that the whole memory is made up of cells or addresses and there are 'n' cells. then total number of bits required to represent the main memory address is given by ceil(log2n).
Second question:-
How many addresses are in a block?
The right option is a). is determined by size of the block field
suppose the size of one block is 'n' bits and the size of address be 'p' bits. then the number of addresses that can be accommodated in a single block is given by floor(n/p).
Third Question:-
How many blocks are in cache ?
The right option is d). is determined by the set field
suppose that that sets are p-way(means in one set 'p' blocks are grouped to form a single line) and to represent a set field we need 'q' bits then total number of sets = 2q and total number of blocks in cache = p*2q
some information about other field:-
TAG field gives us physical address information. after all TAG in physical address get divided into set field and TAG in cache address.
OFFSET field gives us the address of particular byte or word in cache block. Let size of offset field be 'x' bits then the size of single block of cache = 2x
To determine how the mapping works ,we must know several things ,match the following: How many...