操作系统英文版课后习题答案整理

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

从实施课程改革以来,我反复学习有关的教育教学理论,深刻领会新课标精神,认真反思自身教学实际,研究学生,探究教法1.1Whatarethethreemainpurposesofanoperatingsystem?(1)Interfacebetweenthehardwareanduser;(2)managetheresourceofhardwareandsoftware;(3)abstractionofresource;1.2Listthefourstepsthatarenecessarytorunaprogramonacompletelydedicatedmachine.PreprocessingProcessingLinkingExecuting.1.6Definetheessentialpropertiesofthefollowingtypesofoperatingsystems:a.Batchb.Interactivec.Timesharingd.Realtimee.Networkf.Distributed从实施课程改革以来,我反复学习有关的教育教学理论,深刻领会新课标精神,认真反思自身教学实际,研究学生,探究教法1.7Wehavestressedtheneedforanoperatingsystemtomakeefficientuseofthecomputinghardware.Whenisitappropriatefortheoperatingsystemtoforsakethisprincipleandto“waste”resources?Whyissuchasystemnotreallywasteful?2.2Howdoesthedistinctionbetweenmonitormodeandusermodefunctionasarudimentaryformofprotection(security)system?2.3Whatarethedifferencesbetweenatrapandaninterrupt?Whatistheuseofeachfunction?2.5Whichofthefollowinginstructionsshouldbeprivileged?a.Setvalueoftimer.b.Readtheclock.c.Clearmemory.d.Turnoffinterrupts.e.Switchfromusertomonitormode.OSExerciseBookClassNo.Name从实施课程改革以来,我反复学习有关的教育教学理论,深刻领会新课标精神,认真反思自身教学实际,研究学生,探究教法32.8Protectingtheoperatingsystemiscrucialtoensuringthatthecomputersystemoperatescorrectly.Provisionofthisprotectionisthereasonbehinddual-modeoperation,memoryprotection,andthetimer.Toallowmaximumflexibility,however,wewouldalsoliketoplaceminimalconstraintsontheuser.Thefollowingisalistofoperationsthatarenormallyprotected.Whatistheminimalsetofinstructionsthatmustbeprotected?a.Changetousermode.b.Changetomonitormode.c.Readfrommonitormemory.d.Writeintomonitormemory.e.Fetchaninstructionfrommonitormemory.f.Turnontimerinterrupt.g.Turnofftimerinterrupt.3.6Listfiveservicesprovidedbyanoperatingsystem.Explainhoweachprovidesconveniencetotheusers.Explainalsoinwhichcasesitwouldbeimpossibleforuser-levelprogramstoprovidetheseservices.从实施课程改革以来,我反复学习有关的教育教学理论,深刻领会新课标精神,认真反思自身教学实际,研究学生,探究教法3.7Whatisthepurposeofsystemcalls?3.10Whatisthepurposeofsystemprograms?4.1MS-DOSprovidednomeansofconcurrentprocessing.Discussthreemajorcomplicationsthatconcurrentprocessingaddstoanoperatingsystem.OSExerciseBookClassNo.Name从实施课程改革以来,我反复学习有关的教育教学理论,深刻领会新课标精神,认真反思自身教学实际,研究学生,探究教法54.6Thecorrectproducer–consumeralgorithminSection4.4allowsonlyn-1bufferstobefullatanyonetime.Modifythealgorithmtoallowallbufferstobeutilizedfully.5.1Providetwoprogrammingexamplesofmultithreadinggivingimproveperformanceoverasingle-threadedsolution.5.3Whataretwodifferencesbetweenuser-levelthreadsandkernel-levelthreads?Underwhatcircumstancesisonetypebetterthantheother?6.3Considerthefollowingsetofprocesses,withthelengthoftheCPU-bursttimegiveninmilliseconds:ProcessBurstTimePriorityP1103P211P323P414P552TheprocessesareassumedtohavearrivedintheorderP1,P2,P3,P4,P5,allattime0.从实施课程改革以来,我反复学习有关的教育教学理论,深刻领会新课标精神,认真反思自身教学实际,研究学生,探究教法a.DrawfourGanttchartsillustratingtheexecutionoftheseprocessesusingFCFS,SJF,anonpreemptivepriority(asmallerprioritynumberimpliesahigherpriority),andRR(quantum=1)scheduling.b.Whatistheturnaroundtimeofeachprocessforeachoftheschedulingalgorithmsinparta?c.Whatisthewaitingtimeofeachprocessforeachoftheschedulingalgorithmsinparta?d.Whichoftheschedulesinpartaresultsintheminimalaveragewaitingtime(overallprocesses)?Answer:6.4Supposethatthefollowingprocessesarriveforexecutionatthetimesindicated.Eachprocesswillrunthelistedamountoftime.Inansweringthequestions,usenonpreemptiveschedulingandbasealldecisionsontheinformationyouhaveatthetimethedecisionOSExerciseBookClassNo.Name从实施课程改革以来,我反复学习有关的教育教学理论,深刻领会新课标精神,认真反思自身教学实际,研究学生,探究教法7mustbemade.a.WhatistheaverageturnaroundtimefortheseprocesseswiththeFCFSschedulingalgorithm?b.WhatistheaverageturnaroundtimefortheseprocesseswiththeSJFschedulingalgorithm?c.TheSJFalgorithmissupposedtoimproveperformance,butnoticethatwechosetorunprocessP1attime0becausewedidnotknowthattwoshorterprocesseswouldarrivesoon.ComputewhattheaverageturnaroundtimewillbeiftheCPUisleftidleforthefirst1unitandthenSJFschedulingisused.RememberthatprocessesP1andP2arewaitingduringthisidletime,sotheirwaitingtimemayincrease.Thisalgorithmcouldbeknownasfuture-knowledgescheduling.6.10Explainthedifferencesinthedegreetowhichthefollowingschedulingalgorithmsdiscriminateinfavorofshortprocesses:a.FCFSb.RRc.Multilevelfeedbackqueues7.7Showthat,ifthewaitandsignaloperationsarenotexecutedatomically,thenmutualexclusionmaybeviolated.从实施课程改革以来,我反复学习有关的教育教学理论,深刻领会新课标精神,认真反思自身教学实际,研究学生,探究教法7.8TheSleeping-BarberProblem.Abarbershopconsistsofawaitingroomwithnchairsandthebarberroomcontainingthebarberchair.Iftherearenocustomerstobeserved,thebarbergoestosleep.Ifacustomerentersthebarbershopandallchairsareoccupied,thenthecustomerleavestheshop.Ifthebarberisbusybutchairsareavailable,thenthecustomersitsinoneofthefreechairs.Ifthebarberisasleep,thecustomerwakesupthebarber.Writeaprogramtocoordinatethebarberandthecustomers.8.2Isitpossibletohaveadeadlockinvolvingonlyonesingleprocess?Explainyouranswer.8.4ConsiderthetrafficdeadlockdepictedinFigure8.11.a.Showthatthefournecessaryconditionsfor

1 / 14
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功