1 / 10

Parallel and Distributed Simulation

Parallel and Distributed Simulation. Distance Between Processes. Outline. Simple Synchronous Algorithm Algorithm Deficiency: reduced concurrency Distance between LPs Improved concurrency. LBTS. event. LA 3. LP 3. N i = time of next event in LP i LA i = lookahead of LP i

darby
Télécharger la présentation

Parallel and Distributed Simulation

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Parallel and Distributed Simulation Distance Between Processes

  2. Outline • Simple Synchronous Algorithm • Algorithm • Deficiency: reduced concurrency • Distance between LPs • Improved concurrency

  3. LBTS event LA3 LP3 Ni = time of next event in LPi LAi = lookahead of LPi Ti = current time of LPi N3 T3 LA2 LP2 N2 Process this iteration T2 Cannot process yet LA1 LP1 T1 N1 Simulation Time A Simple Synchronous Algorithm WHILE (unprocessed events remain) receive messages generated in previous iteration LBTS = min (Ni + LAi) /* time of next unprocessed event + lookahead */ process events in with time stamp ≤ LBTS flush barrier /* barrier + eliminate all transient messages */ end

  4. Identifying Safe Events An event E in logical process LPi is safe if the time stamp of E ≤ LBTSi where LBTSi is a lower bound on the time stamp of any event LPi might receive in the future. Safe events can be processed without fear of violating the local causality constraint. If all processes are blocked and there are no transient messages in the system, LBTS = min (Ni + LAi) for each process where Ni and LAi are the time of the next unprocessed event and lookahead, respectively, for LPi • Overly conservative estimate for LBTS • Does not exploit “locality” in physical systems (things far away can’t affect you for some time into the future)

  5. ORD 4:00 2:00 LAX JFK 6:00 0:30 10:45 SAN 10:00 Example • Lookahead = minimum flight time to another airport • Can the two events be processed concurrently? • Yes because the event @ 10:00 cannot affect the event @ 10:45 • Simple synchronous algorithm: • LBTS = 10:30 (10:00 + 0:30) • Cannot process event @ 10:45 this iteration • Algorithm does not consider LP topology

  6. Distance Between LPs • Associate a lookahead with each link: LAB is the lookahead on the link from LPA to LPB • Any message sent on the link from LPA to LPB must have a time stamp of TA + LAB where TA is the current simulation time of LPA • A path from LPA to LPZ is defined as a sequence of LPs: LPA, LPB, …, LPY, LPZ • The lookahead of a path is the sum of the lookaheads of the links along the path • DAB, the minimum distance from LPA to LPB is the minimum lookahead over all paths from LPA to LPB • The distance from LPA to LPB is the minimum amount of simulated time that must elapse for an event in LPA to affect LPB

  7. Distance Matrix: D [i,j] = minimum distance from LPi to LPj 11 3 LPA 4 4 3 5 LPB 3 5 6 4 LPC 1 3 4 2 LPD 3 1 2 4 LPA LPB LPA LPB LPC LPD 4 1 1 3 4 min (1+2, 3+1) 2 LPC LPD 2 13 15 Distance Between Processes The distance from LPA to LPB is the minimum amount of simulated time that must elapse for an event in LPA to affect LPB • An event in LPY with time stamp TY depends on an event in LPX with time stamp TX if TX + D[X,Y] < TY • Above, the time stamp 15 event depends on the time stamp 11 event, the time stamp 13 event does not.

  8. Distance Matrix: D [i,j] = minimum distance from LPi to LPj 11 3 LPA 4 4 3 5 LPB 3 5 6 4 LPC 1 3 4 2 LPD 3 1 2 4 LPA LPB LPA LPB LPC LPD 4 1 1 3 4 min (1+2, 3+1) 2 LPC LPD 2 13 15 Computing LBTS LBTSi=min(Nj+Dji) (all j) where Ni = time of next event in LPi (assuming all LPs blocked, no transient messages) LBTSA = 15 [min (11+4, 13+5)] LBTSB = 14 [min (11+3, 13+4)] LBTSC = 12 [min (11+1, 13+2)] LBTSD = 14 [min (11+3, 13+4)] Need to know time of next event of every other LP Distance matrix must be recomputed if lookahead changes

  9. ORD 4:00 2:00 LAX JFK 6:00 0:30 10:45 SAN 10:00 Example • Using distance information: • DSAN,JFK = 6:30 • LBTSJFK = 16:30 (10:00 + 6:30) • Event @ 10:45 can be processed this iteration • Concurrent processing of events at times 10:00 and 10:45

  10. Summary • Distance between LPs • Exploit locality in physical systems to improve concurrency in the simulation execution • Increased complexity, overhead • Lookahead and topology changes introduce additional complexities

More Related