Presentation is loading. Please wait.

Presentation is loading. Please wait.

Discrete Event System Modeling and Simulation in Metropolis Guang Yang 12/10/2004.

Similar presentations


Presentation on theme: "Discrete Event System Modeling and Simulation in Metropolis Guang Yang 12/10/2004."— Presentation transcript:

1 Discrete Event System Modeling and Simulation in Metropolis Guang Yang 12/10/2004

2 Outline Separation of Capability and Cost Quantity Manager and Quantity Annotation Discrete Event Systems in Metropolis Discrete Event Systems Simulation Challenges Conclusion and Future Work

3 Capability v.s. Cost One of the pairs of concerns whose orthogonalization increases model reusability Capability: a sequence of events Cost: captured by various quantities Instruction Set Pentium4Atholon ……

4 Capability v.s. Cost in TSM Capability: Cost: (v1,  ) (v2,  ) … (vn,  ) Interface function: write_fifo(w){ (v1,  ) (v2,  ) … (vn,  ) } m-event : tag =  (v1, 0) (v2,  ) … (vn, 10) Interface function: write_fifo(w){ (v1, 0) (v2,  ) … (vn, 10) }  10 time units costs correspond to tags

5 Quantity Annotation & Quantity Manager Quantity Annotation (v1,  ) (v1, 0) Time Quantity Manager requestannotate resolve Quantity Manager Data type Functions Axioms

6 Discrete Event Systems in Metropolis Tag is the key Process 1 (v11, 0) (v12,  ) … (v1n, 10) Process 2 (v21,  ) (v22, 4) … (v2n, 8) Process 3 (v31, 2) (v32, 5) … (v3n,  ) Time Quantity Manager

7 Discrete Event Systems Simulation Formally, N processes p1, p2, …, pN N m-event sequences me 1, me 2, …, me N Annotated tag for the i’th m-event in me j,T[me j (i)] The most recent but prior to the i’th annotated m-event in me j The next annotated m-event in me j after the i’th m-event

8 DES Simulation (cont) is the segment of m-events that could be interleaved with other m-events from other processes In order for and to be arbitrarily interleaved, the following condition must be satisfied The end point e.g. can join the interleaving if it falls into the other segment

9 DES Simulation (cont) Simulation proceeds round by round. At each round, each process issues one m- event or event. Based on time tags information and other constraints (e.g. mutual exclusion, simultaneity), disable some of (m-)events and let the rest run.

10 DES Simulation (cont) An example Process 1 (v11, 0) (v12,  ) … (v1n, 10) Process 2 (v21,  ) (v22, 4) … (v2n, 8) Process 3 (v31, 2) (v32, 5) … (v3n,  ) Time Quantity Manager

11 Challenges No history information  No rollback No future information  Cannot avoid rollback if do blind interleaving

12 Solution Postpone interleaving until there is enough information Whenever there is a m-event, let it run. Resolve time quantity only if all processes come to events or m-events get stuck

13 Example Process 1 (v11, 0) (v12,  ) … (v1n, 10) Process 2 (v21,  ) (v22, 4) … (v2n, 8) Process 3 (v31, 2) (v32, 5) … (v3n,  ) Time Quantity Manager

14 Solution Postpone interleaving until there is enough information Whenever there is a m-event, let it run. Resolve time quantity only if all processes come to events or events get stuck Works but not so efficient Waste on constraint resolution Increase the number of simulation rounds

15 Get hints from designers Identify regularities in the tags Periodical tasks Tasks with latency/rate constraints … Introduce built-in logic of constraints (LOC) to be able to predict future period(event, p) maxrate/minrate(event1, event2, r) maxlatency/minlatency(event1, event2, r)

16 Quantity Annotation & Quantity Manager Quantity Annotation (v1,  ) (v1, 0) Time Quantity Manager requestannotate resolve Quantity Manager Data type Functions Axioms Built-in LOC

17 Experiments P0 write(w) (10) P1 write(w) (10) C read() (15) M Time Quantity Manager

18 Simulation Statistics Postpone interleaving Number of Scheduling Rounds Done by Simulation Manager: 2120 Average Number of RUN Processes Scheduled per Scheduling Round: 1.25283 Total Simulation Time: 280000 us Built-in loc Number of Scheduling Rounds Done by Simulation Manager: 1168 Average Number of RUN Processes Scheduled per Scheduling Round: 1.49914 Total Simulation Time: 190000 us

19 Conclusion and Future Work Formally analyze the simulation strategy Identify problems in terms of simulation efficiency Discuss the possible solutions Future work: Are there better solutions to the efficiency problem? How to co-simulate Metropolis DES with external CT/Hybrid system simulators?

20 Thank you!!! Questions?


Download ppt "Discrete Event System Modeling and Simulation in Metropolis Guang Yang 12/10/2004."

Similar presentations


Ads by Google