操作系统第九版部分课后作业习题答案分析解析.docxVIP

  • 10
  • 0
  • 约1.7万字
  • 约 28页
  • 2023-12-21 发布于江苏
  • 举报

操作系统第九版部分课后作业习题答案分析解析.docx

第PAGE10页

CHAPTER 9 Virtual Memory

PracticeExercises

UnderwhatcircumstancesdopagefaultsoccurDescribetheactions

takenbytheoperatingsystemwhenapagefaultoccurs.Answer:

Apagefaultoccurswhenanaccesstoapagethathasnotbeen

broughtintomainmemorytakesplace.Theoperatingsystemveri es

thememoryaccess,abortingtheprogramifitisinvalid.

Ifitisvalid,a

freeframeislocatedandI/Oisrequestedtoreadtheneededpageinto

thefreeframe.UponcompletionofI/O,theprocesstableandpagetable

areupdatedandtheinstructionisrestarted.

Assumethatyouhaveareferencestringforaprocesswithm

frames(initiallyallempty).Thereferencestringhaslengthp;

ndistinctpagenumbersoccurinit.Answerthesequestionsforany

replacementalgorithms:

Whatisalowerboundonthenumberofpagefaults

WhatisanupperboundonthenumberofpagefaultsAnswer:

n

p

ConsiderthepagetableshowninFigure9.30forasystemwith12-bit

virtualandphysicaladdressesandwith256-bytepages.

Thelistoffree

pageframesisD,E,F(thatis,Disattheheadofthelist,Eissecond,

andFislast).

Convertthefollowingvirtualaddressestotheirequivalentphysical

addressesinhexadecimal.Allnumbersaregiveninhexadecimal.(A

dashforapageframeindicatesthatthepageisnotinmemory.)

9EF

111

2930Chapter9VirtualMemory

700

0FF

Answer:

9EF-0EF

111-211

700-D00

0FF-EFF

Considerthefollowingreplacementalgorithms.Rankthesealgorithmsonave-pointscalefrom“bad〞to“perfect〞accordingtotheir

faultrate.Separatethosealgorithmsthatsuffer

fromBelady’s

anomalyfromthosethatdonot.

LRUreplacement

FIFOreplacement

Optimalreplacement

Second-chancereplacementAnswer:

RankAlgorithmSufferfromBelady’sanomaly

Optimalno

LRUno

Second-chanceyes

FIFOyes

Discussthehardwaresupportrequiredtosupportdemandpaging.

Answer:

Foreverymemory-accessoperation,thepagetableneedstobeconsulte

文档评论(0)

1亿VIP精品文档

相关文档