在計算機概論課本上看到的兩題練習題,不過是英文的,所以我也用英文回答。
我對這些東西不是很了解,怕翻成中文以後會翻錯,所以直接貼原文上來,保險一點。
題目(一):;A multiprogramming operating system uses paging.
The available memory is 60 MB divided into 15 frames, each of 4 MB.
Program A needs 13 MB. Program B needs 12 MB. Program C needs 27 MB.
Q1: How many frames are used by program A, B and C?
My answer -> Program A use 4 frames, program B use 3 frames,
and program C use 7 frames.
Q2: How many frames are unused?
My answer -> 15-(4+3+7) = 1. So 1 frame is unused.
Q3: What is the total memory wasted?
My answer -> 60 - (13+12+27) = 8. So 8 MB of memory is wasted.
Q4: What percentage of memory is wasted?
My answer -> 8/60 = 13.3% (approximately). So 13.3% of memory is wasted.