August
1997 QUESTION 3 Total Marks: 20 Marks |
Click here to access other
questions
SUGGESTED SOLUTIONS |
3. | An important feature in designing a system is the construction of its memory hierarchy. | ||
(a) Describe the relationship between access time, cost per bit and capacity which holds across the spectrum of memory technologies. | [4] | ||
shorter access time, | [1] | ||
greater cost per bit; | [1] | ||
greater capacity, | [1] | ||
smaller cost per bit | [1] | ||
(b) Memory can be classified into internal and external memory. Give three types of external memory. | [3] | ||
one mark for each of the following: magnetic disk, | [1] | ||
magnetic tape, | [1] | ||
optical disk (award one mark if the students manage to think of other forms of external memory e.g. PC and memory). | [1] | ||
(c) Cache memory is used between the CPU registers and the main memory. What is its purpose? What phenomenon of memory access does it depend on? Explain what is meant by this. | [4] | ||
To give memory access speeds approaching those of fastest available memory, | [1] | ||
by holding in fast memory a copy of some portion of main memory. | [1] | ||
Depends on phenomenon of locality of reference, | [1] | ||
that is, when a block of data is fetched into the cache to satisfy a single memory reference, it is likely that future references will be to other words in the same block. | [1] | ||
(d) When a new block is brought into the cache, one of the existing blocks must be replaced. Briefly describe three replacement algorithms which may be used to choose the block to be replaced. | [6] | ||
Any three of the following; | |||
for name, | [1] | ||
for suitable explanation: | [1] | ||
least recently-used (LRU) replace the block which has been in the cache longest without being referenced | |||
first-in-first-out replace the block which has been in the cache the longest | |||
least-frequently-used (LFU) replace that block in the set which has experienced the fewest references | |||
random choose a block randomly. | |||
(e) What is the purpose of virtual memory? | [3] | ||
Virtual memory allows main memory to act as a cache for secondary storage. | [1] | ||
It permits the total memory needed by all the programs to be larger than the physical memory, by holding in main memory only those blocks needed by the currently running program. | [1] | ||
Also, it allows single programs to exceed the size of the primary memory; sections of the program being brought into memory when needed. | [1] |