計算機概論 - 虛擬記憶體計算 - 考試

Puput avatar
By Puput
at 2014-12-04T18:22

Table of Contents

在計算機概論課本上看到的兩題練習題,不過是英文的,所以我也用英文回答。
我對這些東西不是很了解,怕翻成中文以後會翻錯,所以直接貼原文上來,保險一點。

題目(一):;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.

------------------------------------------------------------------------------

題目(二): An operating system uses virtual memory but requires the whole
program to be in physical memory during execution (no paging or
segmentation). The size of physical memory is 100 MB.
The size of virtual memory is 1 GB.

Q5: How many programs of size 10 MB can be run concurrently by this
operating system?
My answer -> Since programs have to be in physical memory during execution,
then 100 MB/10 MB = 10 programs can be run concurrently by this
operating system.

Q6: How many of them can be in memory at any time?
My answer -> 100 MB / 10 MB = 10 programs can be in memory at any time.

Q7: How many of them must be on disk?
My answer -> 10 programs are in physical memory, and the size of virtual
memory is 1024 MB, which means 102 programs can be stored in
disk + physical memory. So 102-10 = 92 programs must be on disk.

需要大家幫忙糾正錯誤,謝謝。

--
Tags: 考試

All Comments

Joe avatar
By Joe
at 2014-12-06T08:10
故意不寫答案嗎? XD
Q2, Q3 我不會把沒用的那個 frame 當 waste, 因為
它之後有需要還是可以被用。所以應該是4MB, 浪費率4/
56
Regina avatar
By Regina
at 2014-12-08T23:34
Q5 我覺得題意不清,應該要看這OS 支不支援 thread
和 multi-core
Callum avatar
By Callum
at 2014-12-11T17:37
其實整個題目二陷阱很多,處理 switching 的程式要
不要占記憶體?當然要!那就不可能把100MB memory
塞滿你的程式。大學教科書這種要思辨的問題,還是去
專版問吧
Franklin avatar
By Franklin
at 2014-12-14T14:50
好的,實在太感謝你了。

土地政策的書籍好少?

Margaret avatar
By Margaret
at 2014-12-04T15:33
市面上有關土地政策的書籍好少 有人推薦一些地政的書籍嗎? 我手上只有高點的 其他家沒有在書店看過 麻煩大家推薦一下 謝謝 - ...

之前版友分享的管會筆記

Blanche avatar
By Blanche
at 2014-12-04T15:00
如題,管會筆記一直沒人能分享~ 不管是電子檔或是紙本都能接受 考試當前想要參考一下筆記 謝謝^^ -- 推 ferica: +1 若是有紙本可幫忙掃描12/04 21:14 若是提供紙本可先寄給f大幫忙掃描喔! --- -- Sent from my Accdroid - ...

103年地特增列公告了

Cara avatar
By Cara
at 2014-12-04T14:15
如題 103年地特增列已公告在考選部網站了,大家可以去查詢 我的類別沒增列,囧.... -- Sent from my Android - ...

月旦法學教室陳重陽老師例題一問

Yuri avatar
By Yuri
at 2014-12-04T14:07
這部分陳重陽老師已於個人FB上發佈更正啟示,原文如下: 更正啟示 本人於月旦法學教室第143期發表---誠實信用原則與拋棄權之行使---該文中註15更正如 下(當初與出版社聯繫版本有誤,會請他們於適當處再行堪正,抱歉): 乙受丙之特種贈與一千萬元應先歸扣於遺產中,所以丙之遺產應有一千二百萬元(一千萬 元加上 ...

102年 地特 稅務法規-重購退稅問題

Gary avatar
By Gary
at 2014-12-04T13:48
※ 引述《xxxpeter2000 (xxxpeter2000)》之銘言: [考題] 國考歷屆考題與考題觀念討論(書裡看到的選這個)請附上想法、出處 1.張三,一年前出售自用住宅房地一處,總價 3,000 萬元,出售時該筆土 地公告現值 600 萬元,已納土地增值稅 50 萬元; 房屋評定現值 30 ...