The Gateway to Computer Science Excellence
+1 vote
Case1) cache block size is 4 Words and memory block size is 8 Words

Case2) cache block size is 8 Words and memory block size is 4 Words
in CO and Architecture by (59 points)
retagged by | 346 views

3 Answers

+2 votes
Block size to be considered is for the requesting memory.

Case 1: during a cache miss 4 words will be taken from memory

Case 2: during a cache miss 8 words will be taken from memory.

PS: I don't think "block size" is used for main memory. It is page size for memory and it is usually much bigger than cache block size.
by Veteran (434k points)
0 votes
in case 1 block transfer is not possible hence if the required word is not found in the cache , word should be brought from memory  . here  the more misses will occur relatively(case2)

in case 2 cache block size is more so cache can hold two blocks that are from main memory .block transfer is possible . less misses than case 1
by Active (1.3k points)
0 votes

In simple words "Blocks are units made up of words, so while tranferring from source to destination you should not split the block and transfer only a part of the block" 

That is as equal to saying that, if you are considering MM block bigger than CM block, then you should transfer the bigger sized block only (method of transfer may vary a/c to bus capacity) and it can be then occupied by several smaller Cache blocks. ( <-- Answers your first qstn )

For second qstn, just think that "Why do we make block transfers?" Because , we had some instruction/data reference which resulted in a miss. So, that single reference is searched from MM and the corresponding block should be transferred. So actual transfer of only 1 MM block into cache is sufficient but as it will result in irregular empty space so we must move 2 MM blocks into cache to that entire cache block is perfectly occupied.

P.S. Generally while designing, we take same block sizes at every level. But I have seen some problems where higher level had more block size than lower ones. (Your case 1). But I have not seen yet where higher order block size is lower that lower level block sizes. Because, I think, its generally not the case.

P.P.S. There is a very nice problem based on this concept. It was asked in Gate 2010. It was linked data type qstn. Check that out.

by Active (2.2k points)

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,833 questions
57,697 answers
107,402 users