您好,欢迎访问三七文档
当前位置:首页 > IT计算机/网络 > 其它相关文档 > Chapter-5-Q&A
OperatingSystemsChapter5–Concurrency:MutualExclusionandSynchronizationPage1of6Chapter5–Concurrency:MutualExclusionandSynchronizationTrue/FalseQuestions:1.T/F–Distributedprocessingcanbedefinedasthemanagementofmultipleprocessesexecutingonmultiple,distributedcomputersystems.ANS:T2.T/F–Bothprocessinterleavingandprocessoverlappingareexamplesofconcurrentprocessesandbothpresentthesamebasicproblems.ANS:T3.T/F–Concurrencyissuesareaconcernonmultiprocessorsystems,butdonotimpactuniprocessorsystems.ANS:F(impactbothtypesofsystems)4.T/F–Starvationreferstothesituationwherecompetingprocessesaredeniedaccesstoaresourceduetoschedulingproblems.ANS:T5.T/F–Anyfacilityorcapabilitythatistoprovidesupportformutualexclusionmustmakecertainassumptionsaboutrelativeprocessspeedsandthenumberofprocessorsinthesystem.ANS:F(noassumptionsshouldbemaderegardingtheseparameters)6.T/F–Peterson’sAlgorithmforsolvingmutualexclusionisonlyvalidfortwoprocessesandcannotbegeneralizedtothecaseofnprocesses.ANS:F(caneasilybegeneralizedtonprocesses)7.T/F–Inauniprocessormachine,concurrentprocessescannotbeoverlapped;theycanonlybeinterleaved.ANS:T8.T/F–Weaksemaphoresguaranteefreedomfromstarvation,butstrongsemaphoresdonot.ANS:F(oppositeistrue)9.T/F–AfinitecircularbufferandaninfinitebufferaretwowaystoimplementadatastorageareafortheclassicProducer/ConsumerProblem.ANS:F(finitebuffer)10.T/F–Themajordifficultywithsemaphoresisthatwaitandsignaloperationsmaybescatteredthroughoutaprogramanditisdifficulttoseetheoveralleffectoftheseoperationsonthesemaphorestheyaffect.ANS:T11.T/F–Messagepassingprovidesbothsynchronizationandcommunication,whicharefundamentalrequirementsforinteractingprocesses.OperatingSystemsChapter5–Concurrency:MutualExclusionandSynchronizationPage2of6ANS:T12.T/F–Inamessagepassingsystem,onequeuingdisciplinealternativeistoallowthereceivertoinspectthemessagequeueandselectwhichmessagetoreceivenext.ANS:T13.T/F–Inthecommunicationsmechanismofamessagepassingsystem,onlythereceiverofthecommunicationcanbeblocking.ANS:F(bothsenderandreceivercanbeblockingornon-blocking)14.T/F–Inindirectaddressing,asappliedtomessagepassing,messagesaresenttoatemporaryshareddatastructuretypicallyknownasamailbox.ANS:T15.T/F–TheProducer/ConsumerproblemistypicallyconsideredaspecialcaseoftheReaders/Writesproblem,withonlyonereaderandonewriterANS:F(theproducerandconsumermustbothreadandwrite)MultipleChoiceQuestions:1.Concurrencyplaysamajorpartinwhichofthefollowingspecificcontexts:a.Multipleapplicationsb.Structuredapplicationsc.O/Sstructured.AlloftheaboveANS:D2.Examplesofsolutionstotheconcurrencyproblemthatdonotinvolvebusywaitingarethefollowing:a.Semaphoresandmonitorsb.Messagepassingandcachingc.Producersandconsumersd.NoneoftheaboveANS:D(allsoftwaresolutionsinvolvesomeformofbusywaiting)3.Abasicechoprocedure(thatechoesatypedcharactertothescreen)runningonamultiprocessorsystemcanproduceerroneousoutputif:a.Twoprocessesdeadlockwhileintheechocodeb.Accesstotheechoprocedureisunsynchronizedc.Accesstotheechoprocedureissynchronizedd.NoneoftheaboveANS:B4.Inordertoimplementmutualexclusiononacriticalresourceforcompetingprocesses,onlyoneprogramatatimeshouldbeallowed:a.Inthecriticalsectionoftheprogramb.ToperformmessagepassingOperatingSystemsChapter5–Concurrency:MutualExclusionandSynchronizationPage3of6c.ToExhibitcooperationd.NoneoftheaboveANS:A5.Thefollowingrequirementmustbemetbyanyfacilityorcapabilitythatistoprovidesupportformutualexclusion:a.Onlyoneprocessatatimecanbeallowedintoacriticalcodesectionb.Aprocessremainsinitscriticalcodesectionforafinitetimeonlyc.Noassumptionscanbemadeaboutrelativeprocessspeedsd.AlloftheaboveANS:D6.Processesthataredesignedtobeabletopassexecutioncontrolbackandforthbetweenthemselvesarereferredtoas:a.Threadsb.Coroutinesc.Busywaitingprocessesd.NoneoftheaboveANS:B7.Inauniprocessorsystem,mutualexclusioncanbeguaranteedby:a.Overlappingprocessesb.Interleavingprocessesc.Disablinginterruptsd.AlloftheaboveANS:C8.Asemaphorethatdoesnotspecifytheorderinwhichprocessesareremovedfromthequeueiscalleda:a.Weaksemaphoreb.Strongsemaphorec.Binarysemaphored.NoneoftheaboveANS:A9.Thefinitecircularbufferisusedtoimplementwhichofthefollowingbasicqueuingstrategies:a.FILOb.LIFOc.FIFOd.NoneoftheaboveANS:C10.Achiefcharacteristicofamonitoris:a.Amaximumoftwoprocessesmaybeexecutinginamonitoratatimeb.LocaldatavariablesofthemonitorareaccessiblebyanyprocedurerequestinguseofthemonitorOperatingSystemsChapter5–Concurrency:MutualExclusionandSynchronizationPage4of6c.Aprocessentersthemonitorbyinvokingoneofitsproceduresd.AlloftheaboveANS:C11.Insynchronizationinvolvingmessagepassing,thesenderofamessagecanbe:a.Eitherblockingornon-blockingb.Onlyblockingc.Onlynon-blockingd.AlloftheaboveANS:A12.Inasystememployingmessagepassing,whenamessageissenttoasharedtemporarydatastructure,thisgeneralapproachisknownas:a.Directaddressingb.Indirectaddressingc.Blockingd.NoneoftheaboveANS:B13.Inasystememployingmessagepassing,thetypicalmessageisdividedintotwoprimarysections:a.Headerandmailboxb.Bodyandmailboxc.DestinationIDandSourceIDd.NoneoftheaboveANS:D(he
本文标题:Chapter-5-Q&A
链接地址:https://www.777doc.com/doc-5872382 .html