> My current understanding of the simulator's event queue, is that there > is currently only one main Event Queue in which all the corresponding > simobjects place their scheduled events into this single queue. This is correct.
> This is as opposed to having each SimObject have their own > SelfEventQueue that feeds into the Main Event Queue (something that > would lead towards parallelizing the simulator, not sure if this is > currently being worked on?) We don't want to give every SimObject their own event queue, rather we want to have an event queue per host thread (one thread per core probably) and assign SimObjects to certain event queues. If an object needs to post an event to multiple queues, then that object will have to be a bit more intelligent. I've taken the first baby steps to make this happen by creating the EventManager class and making all SimObjects use it to schedule events. There was someone that was going to work on completing this, but I don't know what happened to him. Other than that, nobody is actively working on it. > The comments describe the event queue as a linked list of linked lists > such that each "bin" (i am assuming by bin it refers to a linked list) > that is defined by when+priority (where when is the timestamp==cycle) > in which the scheduled event should be executed. True. > From my understanding, the way this is structured is such that > multiple scheduled events can have the same 'when' timestamp, > depending on the current cycle time + the latency derived by the > scheduling SimObject. True. > So from a storage perspective, i can see how several events might > coincidentally have the same 'when' and possibly the same defined > priority, but in terms of execution, how does the event queue decide > which to execute? Because theoretically only one event can be set for > execution per cycle (although many instructions for different events > may be in execution simultaneously due to Instruction Level > Parallelism?) We provide no guarantees as to when events at the same when/priority will be scheduled with respect to each other. In actuality, it's LIFO right now. An example of why you may get multiple events at the same time is if you're modeling two cores with the same clock frequency. > In the case, that the different events do not have the same 'when' > timestamp, that means then each bin essentially contains only one > element (event), and if this latter case is how it is actually set up, > then what is the need to have multiple linked lists where each > corresponds to a bin if there is only one element? It is true that there is often only one event in the second list, but it is also common for there to be dozens (multicore system for example). > I apologize in advance for the long, detailed, and possibly confusing > question, and would appreciate any help. No problem. Nate _______________________________________________ m5-users mailing list [email protected] http://m5sim.org/cgi-bin/mailman/listinfo/m5-users
