1. Consider a computer system that has cache memory, main memory (RAM) and disk,
ID: 3915546 • Letter: 1
Question
1. Consider a computer system that has cache memory, main memory (RAM) and disk, and the operating system uses virtual memory. It takes 1 nsec to access a word from the cache, 5 nsec to access a word from the RAM, and 2 ms to access a word from the disk. If the cache hit rate is 85% and main memory hit rate (after a cache miss) is 90%, what is the average time to access a word?
2. Six batch jobs A through F, arrive at a computer center at almost the same time. They have estimated running times of 5, 2, 7, 4, 3, and 8 minutes. Their (externally determined) priorities are, 2, 6, 5, 4, 3, and 1 respectively, with 6 being the highest priority. For each of the following scheduling algorithms, determine the mean process turn- around time. Ignore process switching overhead.
a. Round robin (with time slice of 3 minute).
b. Priority scheduling.
c. First-come, first served (run in order A, B, C, D, E, F).
d. Shortest job first.
Explanation / Answer
1. Average access time= (Cache access time* cache hit rate)+(cache miss rate * main memory hit rate* memory access time)+(cache miss rate* memory miss rate* disk access time)
=(1*0.85)+(5*0.135)+(2000*0.015)
= 0.85+0.675+30=31.525ns
2.
A. Round robin with time slice of 3 :
Turn around time(TAT) = completion time - arrival time
Arrival time = 0 for all jobs as they arrive at same time
for A: 27
For B: 5
For C: 22
For D:23
For E: 14
For F: 29
B. Priority scheduling:
TAT:
For A:21, for B:2, for C:9,D:13,for E:16, F:29
C. FCFS
TAT:
For A: 5, B:7, C:14, D:18, E:21, F:29
D. Shortest job first:
TAT:
For A:14, B:2, C:21, D:9, E:5, F:29
Time of completion 3 5 8 11 14 17 19 22 23 26 27 29 Job A B C D E F A C D F A FRelated Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.