Professional Documents
Culture Documents
Memory Management
Name
Institutional Affiliation
Date of Submission
MEMORY MANAGEMENT 2
Memory Management-Problems
A computer system has a 64KB main memory and 1 KB space for the cache memory,
and transfer between cache and main memory is 16 * 8 Blocks, uses 2 space blocks in each set,
and uses LRU when deciding to change blocks, uses Read Through for read, Write allocate for
a) In access to main memory address which sub-spaces are divided and how much
Solution
b) In this system main memory, each element has 8bit has 2 arrays, the start of these
address is arr1 = $0000, arr2 = $0200, and a mips program will read and compare these two
arrays and writes the big one into array starts with address arr3 = $0410, initially assume that the
cache memory is empty in which set and which blocks will the arrays will be placed, while the
program is run which moment the transfer between cache and main memory will be occurred.?
Solution
Main memory=64KB
Cache memory=empty
Demonstration
Below Diagrams b and c showing the transfer between cache and main memory
MEMORY MANAGEMENT 4
Answer: in this regard, arrays will be placed in the set 1 and in block 1 and block 65
b) When this program ends, calculate the hit ratio, when you know the cache access
time is 10ns and between main memory and cache memory blocks transfer time
is 100ns according to above data, calculate the average memory access time?
Solution
Average memory access time =Hit time + Miss rate x Miss penalty
Hit time = 10 ns
d) To reduce the average memory access time in which main memory address we
To reduce the average access time, the array has to be placed in the main memory that
has a cache mechanism in the processor which is checked to see if a copy of a particular memory
location is available in the cache before initiating the actual memory access. If the cache holds a
copy of the memory location, the slow access to main memory can be skipped. In this case
therefore, the array should be placed in Level 2 or Cache memory which has the fastest memory
e) In which main memory addresses, we should place the arrays to make the worst
To make the worst average memory access time, we should place the arrays in the Level
4 or Secondary Memory address, this is an external memory which is not as fast as main
memory.