分布式操作系统第二版答案.docx
《分布式操作系统第二版答案.docx》由会员分享,可在线阅读,更多相关《分布式操作系统第二版答案.docx(64页珍藏版)》请在冰豆网上搜索。
分布式操作系统第二版答案
SYSTEMS
PRINCIPLESANDPARADIGMS
SECONDEDITION
PROBLEMSOLUTIONS
ANDREWS.TANENBAUM
MAARTENVANSTEEN
VrijeUniversiteit
Amsterdam,TheNetherlands
PRENTICEHALL
UPPERSADDLERIVER,NJ07458
SOLUTIONSTOCHAPTER1PROBLEMS
1.Q:
Analternativede.nitionforadistributedsystemisthatofacollectionof
independentcomputersprovidingtheviewofbeingasinglesystem,thatis,it
iscompletelyhiddenfromusersthatthereevenmultiplecomputers.Givean
examplewherethisviewwouldcomeinveryhandy.
A:
Whatimmediatelycomestomindisparallelcomputing.Ifonecould
designprogramsthatrunwithoutanyseriousmodi.cationsondistributedsystems
thatappeartobethesameasnondistributedsystems,lifewouldbeso
mucheasier.Achievingasingle-systemviewisbynowconsideredvirtually
impossiblewhenperformanceisinplay.
2.Q:
Whatistheroleofmiddlewareinadistributedsystem?
A:
Toenhancethedistributiontransparencythatismissinginnetworkoperating
systems.Inotherwords,middlewareaimsatimprovingthesingle-system
viewthatadistributedsystemshouldhave.
3.Q:
Manynetworkedsystemsareorganizedintermsofabackof.ceanda
frontof.ce.Howdoesorganizationsmatchwiththecoherentviewwedemand
foradistributedsystem?
A:
Amistakeeasilymadeistoassumethatadistributedsystemasoperating
inanorganization,shouldbespreadacrosstheentireorganization.Inpractice,
weseedistributedsystemsbeinginstalledalongthewaythatanorganization
issplitup.Inthissense,wecouldhaveadistributedsystemsupportingbackof
.ceproceduresandprocesses,aswellasaseparatefront-of.cesystem.Of
course,thetwomaybecoupled,butthereisnoreasonforlettingthiscoupling
befullytransparent.
4.Q:
Explainwhatismeantby(distribution)transparency,andgiveexamplesof
differenttypesoftransparency.
A:
Distributiontransparencyisthephenomenonbywhichdistributionaspects
inasystemarehiddenfromusersandapplications.Examplesincludeaccess
transparency,locationtransparency,migrationtransparency,relocationtransparency,
replicationtransparency,concurrencytransparency,failuretransparency,
andpersistencetransparency.
5.Q:
Whyisitsometimessohardtohidetheoccurrenceandrecoveryfromfailures
inadistributedsystem?
A:
Itisgenerallyimpossibletodetectwhetheraserverisactuallydown,or
thatitissimplyslowinresponding.Consequently,asystemmayhaveto
reportthataserviceisnotavailable,although,infact,theserverisjustslow.
2PROBLEMSOLUTIONSFORCHAPTER1
6.Q:
Whyisitnotalwaysagoodideatoaimatimplementingthehighestdegree
oftransparencypossible?
A:
Aimingatthehighestdegreeoftransparencymayleadtoaconsiderable
lossofperformancethatusersarenotwillingtoaccept.
7.Q:
Whatisanopendistributedsystemandwhatbene.tsdoesopennessprovide?
A:
Anopendistributedsystemoffersservicesaccordingtoclearlyde.ned
rules.Anopensystemiscapableofeasilyinteroperatingwithotheropensystems
butalsoallowsapplicationstobeeasilyportedbetweendifferentimplementations
ofthesamesystem.
8.Q:
Describepreciselywhatismeantbyascalablesystem.
A:
Asystemisscalablewithrespecttoeitheritsnumberofcomponents,geographical
size,ornumberandsizeofadministrativedomains,ifitcangrowin
oneormoreofthesedimensionswithoutanunacceptablelossofperformance.
9.Q:
Scalabilitycanbeachievedbyapplyingdifferenttechniques.Whatare
thesetechniques?
A:
Scalingcanbeachievedthroughdistribution,replication,andcaching.
10.Q:
Explainwhatismeantbyavirtualorganizationandgiveahintonhow
suchorganizationscouldbeimplemented.
A:
Avirtualorganization(VO)de.nesagroupofusers/applicationsthathave
accesstoaspeci.edgroupofresources,whichmaybedistributedacrossmany
differentcomputers,ownedbymanydifferentorganizations.Ineffect,aVO
de.neswhohasaccesstowhat.Thisalsosuggeststhattheresourcesshould
keepanaccountofforeignusersalongwiththeiraccessrights.Thiscanoften
bedoneusingstandardaccesscontrolmechanisms(liketherwxbitsinUNIX),
althoughforeignusersmayneedtohaveaspecialaccount.Thelattercomplicates
mattersconsiderably.
11.Q:
Whenatransactionisaborted,wehavesaidthattheworldisrestoredtoits
previousstate,asthoughthetransactionhadneverhappened.Welied.Givean
examplewhereresettingtheworldisimpossible.
A:
AnysituationinwhichphysicalI/Ohasoccurredcannotbereset.For
example,iftheprocesshasprintedsomeoutput,theinkcannotberemoved
fromthepaper.Also,inasystemthatcontrolsanykindofindustrialprocess,it
isusuallyimpossibletoundoworkthathasbeendone.
12.Q:
Executingnestedtransactionsrequiressomeformofcoordination.Explain
whatacoordinatorshouldactuallydo.
A:
Acoordinatorneedsimplyensurethatifoneofthenestedtransactions
aborts,thatallothersubtransactionsabortaswell.Likewise,itshould
PROBLEMSOLUTIONSFORCHAPTER13
coordinatethatallofthemcommitwheneachofthemcan.Tothisend,a
nestedtransactionshouldwaittocommituntilitistoldtodosobythecoordinator.
13.Q:
Wearguedthatdistributiontransparancymaynotbeinplaceforpervasice
systems.Thisstatementisnottrueforalltypesoftransparencies.Givean
example.
A:
Thinkofmigrationtransparency.Inmnaypervasivesystems,components
aremobileandwillneedtore-establishconnectionswhenmovingfromone
accesspointtoanother.Preferably,suchhandoversshouldbecompletely
transparenttotheuser.Likewise,itcanbearguedthatmanyothertypesof
transparenciesshouldbesupportedaswell.However,whatshouldnotbehidden
isauserispossiblyaccessingresourcesthataredirectlycoupledtothe
user'scurrentenvironment.
14.Q:
Wealreadygavesomeexamplesofdistributedpervasivesystems:
home
systems,electronichealth-caresystems,andsensornetworks.Extendthislist
withmoreexamples.
A:
Therearequiteafewotherexamplesofpervasivesystems.Thinkoflargescale
wirelessmeshnetworksincitiesorneighborhoodsthatprovideservices
suchasInternetaccess,butalsoformthebasisforotherserviceslikeanews
system.Therearesystemsforhabitatmonitoring(asinwildliferesorts),electronic
jailsbywhichoffendersarecontinuouslymonitored,large-scaleintegrated
sportssystems,of.cesystemsdeployingactivebadgestoknowabout
thewhereaboutsoftheiremployees,andsoon.
15.Q:
Sketchadesignforahomesystemconsistingofaseparatemediaserver
thatwillallowfortheattachmentofawirelessclient.Thelatterisconnected
to(analog)audio/videoequipmentandtransformsthedigitalmediastreamsto
analogoutput.Theserverrunsonaseparatemachine,possiblyconnectedto
theInternet,buthasnokeyboardand/ormonitorconnected.
SOLUTIONSTOCHAPTER2PROBLEMS
1.Q:
Ifaclientandaserverareplacedfarapart,wemayseenetworklatency
dominatingoverallperformance.Howcanwetacklethisproblem?
A:
Itreallydependsonhowtheclientisorganized.Itmaybepossibleto
dividetheclient-sidecodeintosmallerpartsthatcanrunseparately.Inthat
case,whenonepartiswaitingfortheservertorespond,wecanschedule
anotherpart.Alternatively,wemaybeabletorearrangetheclientsothatitcan
dootherworkafterhavingsentarequesttotheserver.Thislastsolutioneffectively
replacesthesynchronousclient-servercommunicationwithasynchronous
one-waycommunication.
4PROBLEMSOLUTIONSFORCHAPTER2
2.Q:
Whatisathree-tieredclient-serverarchitecture?
A:
Athree-tieredclient-serverarchitectureconsistsofthreelogicallayers,
whereeachlayeris,inprinciple,implementedataseparatemachine.The
highestlayerconsistsofaclientuserinterface,themiddlelayercontainsthe
actualapplication,andthelowestlayerimplementsthedatathatarebeing
used.
3.Q:
Whatisthedifferencebetweenaverticaldistributionandahorizontaldistribution?
A:
Verticaldistributionreferstothedistributionofthedifferentlayersina
multitieredarchitecturesacrossmultiplemachines.Inprinciple,eachlayeris
implementedonadifferentmachine.Horizontaldistributiondealswiththe
distributionofasinglelayeracrossmultiplemachines,suchasdistributinga
singledatabase.
4.Q:
ConsiderachainofprocessesP1,P2,...,Pnimplementingamultitiered
client-serverarchitecture.ProcessPiisclientofprocessPi+1,andPiwill
returnareplytoPi-1onlyafterreceivingareplyfromPi+1.Whatarethemain
problemswiththisorganizationwhentakingalookattherequest-replyperformance
atprocessP1?
A:
Performancecanbeexpectedtobebadforlargen.Theproblemisthat
eachcommunicationbetweentwosuccessivelayersis,inprinciple,between
twodifferentmachines.Consequently,theperformancebetweenP1andP2
mayalsobedeterminedbyn-2request-replyinteractionsbetweentheother
layers.Anotherproblemisthatifonemachineinthechainperformsbadlyor
iseventemporarilyunreachable,thenthiswillimmediatelydegradetheperformance
atthehighestlevel.
5.Q:
Inastructuredoverlaynetwork,messagesareroutedaccordingtothe
topologyoftheoverlay.Whatisanimportantdisadvantageofthisapproach?
A:
Theproblemisthatwearedealingonlywithlogicalpaths.Itmayvery
wellbethecasethattwonodesAandBwhichareneighborsintheoverlay
networkarephysicallyplacedfarapart.Asaconsequence,thelogicallyshort
pathbetweenAandBmayrequireroutingamessagealongaverylongpath
intheunderlyingphysicalnetwork.
6