如果您无法下载资料,请参考说明:
1、部分资料下载需要金币,请确保您的账户上有足够的金币
2、已购买过的文档,再次下载不重复扣费
3、资料包下载后请先用软件解压,在使用对应软件打开
EssentialDistributedSimulationEssentialdistributedsimulationShidingLinhttp://weibo.com/linshiding1.DiscreteeventsimulationTheevent-drivenprogrammingmodelusesaneventqueuetolineuptheeventsaccordingtosomeorderandcoordinatetheirexecution.Eachtimetheheadeventisremovedfromthequeueandthehandleriscalled,duringwhichtimesomeneweventsmaybegeneratedandinsertedintothequeue.Theexecutionofthisrun-timeexpandingqueueconstitutesthelogicofevent-drivenprogramming.Discreteeventsimulationisoneoftheapplicationsofevent-drivenprogramming,whichusesthelogicaltimetoordertheeventsinqueueandupdatescurrentlogicaltimebythetimestampofheadevent.Itassumesthattheexecutionofeventscostnologicaltimeandbypassthetimeperiodinwhichnoeventisrooted,thereforethelogicaltimegrowsinadiscreteway.Figure1revealstheprogressofasimulationfromlogicaltimeT0toT1.T=T0T=T1<T0,H0><T1,H1><T2,H2><T2,H2>ExecH0()ExecH1()EventQueueEventQueueEvent<T3,H3>eventsNew<T3,H3><T1,H1>………<Ty,Hy><Ty,Hy>…<Tn,Hn><Tn,Hn><Timestamp,Handler>Figure1.Logicaltimeprogressionindiscreteeventsimulation.2.BasicideasofdistributedsimulationLet’sfirstexaminetheresourceconsumptionofaneventsimulation.Spatially,itshouldstoreapplicationstatesandtheeventqueue.Temporally,itincludestheexecutionofeventhandlersandthemaintenanceofeventqueue(remove,insert).Theapplicationstatesandtheexecutionofeventhandlersareproportionaltothecomplexityofsimulatedapplicationandsometimesitcanhardlybeachievedbyasinglemachinewhoseresourceislimited,thusraisingtherequirementforadistributedversionofeventsimulationsystemwhichcanrecruitmultiplemachines.Basically,distributedsimulationextendsthesimulationbydistributingapplicationstatesovermultiplemachines,thusbreakingthroughthememoryandCPUbarrierofasinglemachine.Theexecutionofaneventhandlerisactuallyoperatedontheapplicationstate,i.e.theeventhandlershouldbe1EssentialDistributedSimulationexecutedinthemachinewhichstoresthe(partsof)applicationstatetowhichtheeventisassociated,sothatnaturally