欢迎来到天天文库
浏览记录
ID:34449718
大小:232.85 KB
页数:57页
时间:2019-03-06
《分布式系统设计.06》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、DistributedSystemsPrinciplesandParadigmsMaartenvanSteenVUAmsterdam,Dept.ComputerScienceRoomR4.20,steen@cs.vu.nlChapter06:SynchronizationVersion:November16,2009ContentsChapter01:Introduction02:Architectures03:Processes04:Communication05:Naming06:Synchronization07:Consiste
2、ncy&Replication08:FaultTolerance09:Security10:DistributedObject-BasedSystems11:DistributedFileSystems12:DistributedWeb-BasedSystems13:DistributedCoordination-BasedSystems2/39DistributedAlgorithms6.1ClockSynchronizationClockSynchronizationPhysicalclocksLogicalclocksVector
3、clocks3/39DistributedAlgorithms6.1ClockSynchronizationPhysicalclocksProblemSometimeswesimplyneedtheexacttime,notjustanordering.SolutionUniversalCoordinatedTime(UTC):Basedonthenumberoftransitionspersecondofthecesium133atom(prettyaccurate).Atpresent,therealtimeistakenasthe
4、averageofsome50cesium-clocksaroundtheworld.Introducesaleapsecondfromtimetotimetocompensatethatdaysaregettinglonger.NoteUTCisbroadcastthroughshortwaveradioandsatellite.Satellitescangiveanaccuracyofabout0:5ms.4/39DistributedAlgorithms6.1ClockSynchronizationPhysicalclocksP
5、roblemSupposewehaveadistributedsystemwithaUTC-receiversomewhereinit)westillhavetodistributeitstimetoeachmachine.BasicprincipleEverymachinehasatimerthatgeneratesaninterruptHtimespersecond.Thereisaclockinmachinepthatticksoneachtimerinterrupt.DenotethevalueofthatclockbyCp(t
6、),wheretisUTCtime.Ideally,wehavethatforeachmachinep,Cp(t)=t,or,inotherwords,dC=dt=1.5/39DistributedAlgorithms6.1ClockSynchronizationPhysicalclocksdC>1dtdCClocktime,C=1dtdC<1FastclockdtPerfectclockSlowclockUTC,tInpractice:1 rdC1+r.dtGoalNeverlettwoclocksinanysystemdiffe
7、rbymorethandtimeunits)synchronizeatleasteveryd=(2r)seconds.6/39DistributedAlgorithms6.1ClockSynchronizationGlobalpositioningsystemBasicideaYoucangetanaccurateaccountoftimeasaside-effectofGPS.HeightPointtobe ignored(14,14)r=16(-6,6)xr=107/39DistributedAlgorithms6.1ClockSy
8、nchronizationGlobalpositioningsystemProblemAssumingthattheclocksofthesatellitesareaccurateandsynchroniz
此文档下载收益归作者所有