August 2000
CS202 : COMPUTER ARCHITECTURE AND DATA COMMUNICATIONS

QUESTION 3

Total Marks: 15 Marks

Click here to access other questions

SUGGESTED SOLUTIONS
Solutions and allocated marks are indicated in green.
Return to
Question 3

(a) In memory caching, what is the main goal in choosing a replacement policy? [2]
To maximise the 'hit-ratio' and minimise the 'miss-ratio'.[1] I.e.
Choose a policy that will ensure better retrieval of data as
opposed to accessing a lower level of memory. [1]
Award marks for valid alternative explanations.


(b) With regards to the unit of transfer, how much is transferred from Cache to Processor and from Main-memory to Cache? [2]
FROM CACHE CPU = A WORD [1]
FROM MAIN CACHE = A BLOCK OF WORDS [1]


(c) In use of Cache memory, there are different replacement polices by which to remove blocks of data from cache and load in new blocks from main memory. One is the FIFO policy. Identify the other three popular policies, briefly explaining all four policies. [4]
(All with explanations; explanation must be given for mark to be
gained. IF the candidate just lists these without explanation, award [1] in
total. If they list them and merely define the acronyms, award [2] in
total.)
FIFO
LRU
LFU
RANDOM


(d) Assume a paging system in which the cache has a capacity of three pages. The execution of a program requires reference to five distinct pages. The page address stream formed by the program is 2, 3, 2, 1, 5, 2, 4, 5, 3, 2. Show the actions taken by the cache given a FIFO replacement policy and state where a CACHE hit has occurred. [7]

TIME
1
2
3
4
5
6
7
8
9
10
ADDRESS STREAM
2
3
2
1
5
2
4
5
3
2
 
HIT
HIT
HIT
FIFO actions
2
2
2
2
5
5
5
5
3
3
 
3
3
3
3
2
2
2
2
2
 
1
1
1
4
4
4
4

Award full marks for a perfect answer; deduct one mark for each defect.