现代操作系统(第三版)答案

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

MODERN

OPERATING

SYSTEMS

THIRD EDITION PROBLEM SOLUTIONS

ANDREW S.TANENBAUM

Vrije Universiteit

Amsterdam,The Netherlands

PRENTICE HALL

UPPER SADDLE RIVER,NJ07458

Copyright Pearson Education,Inc.2008

SOLUTIONS TO CHAPTER1PROBLEMS

1.Multiprogramming is the rapid switching of the CPU between multiple proc-

esses in memory.It is commonly used to keep the CPU busy while one or more processes are doing I/O.

2.Input spooling is the technique of reading in jobs,for example,from cards,

onto the disk,so that when the currently executing processes arefinished, there will be work waiting for the CPU.Output spooling consists offirst copying printablefiles to disk before printing them,rather than printing di-rectly as the output is generated.Input spooling on a personal computer is not very likely,but output spooling is.

3.The prime reason for multiprogramming is to give the CPU something to do

while waiting for I/O to complete.If there is no DMA,the CPU is fully occu-pied doing I/O,so there is nothing to be gained(at least in terms of CPU utili-zation)by multiprogramming.No matter how much I/O a program does,the CPU will be100%busy.This of course assumes the major delay is the wait while data are copied.A CPU could do other work if the I/O were slow for other reasons(arriving on a serial line,for instance).

4.It is still alive.For example,Intel makes Pentium I,II,and III,and4CPUs

with a variety of different properties including speed and power consumption.

All of these machines are architecturally compatible.They differ only in price and performance,which is the essence of the family idea.

5.A25×80character monochrome text screen requires a2000-byte buffer.The

1024×768pixel24-bit color bitmap requires2,359,296bytes.In1980these two options would have cost$10and$11,520,respectively.For current prices,check on how much RAM currently costs,probably less than$1/MB.

6.Consider fairness and real time.Fairness requires that each process be allo-

cated its resources in a fair way,with no process getting more than its fair share.On the other hand,real time requires that resources be allocated based on the times when different processes must complete their execution.A real-time process may get a disproportionate share of the resources.

7.Choices(a),(c),and(d)should be restricted to kernel mode.

8.It may take20,25or30msec to complete the execution of these programs

depending on how the operating system schedules them.If P0and P1are scheduled on the same CPU and P2is scheduled on the other CPU,it will take20mses.If P0and P2are scheduled on the same CPU and P1is scheduled on the other CPU,it will take25msec.If P1and P2are scheduled on the same CPU and P0is scheduled on the other CPU,it will take30msec.

If all three are on the same CPU,it will take35msec.

相关文档
最新文档