ALGORITHM 1.
Processing sequence of a PE
while simulation is running do |
Dequeue an event e from Thread Event Queue; |
% RB-messages are special messages used for roll-back, see section 3.2. |
if e.type != RB-message then |
if e.receiveTime < e.targetLP.LVT then |
e.targetLP rolls back to a time point prior to e.receiveTime according to algorithm 2; |
end |
e.targetLP advances Local Virtual Time to e.receiveTime and processes e; |
else |
Process e according to RB-message-processing algorithm 3; |
end |
Fetch an event from e.targetLP according to Multi-Level Queuing algorithm; |
end |