Charades
|
Concrete base class for distributed schedulers. More...
#include <scheduler.h>
Public Member Functions | |
void | groups_created () |
Called after all group chares are created. More... | |
void | iteration_done () |
Local methods for iteration control flow. More... | |
void | next_iteration () |
Helper method for starting the next scheduler iteration. More... | |
void | start_balancing () |
Methods for load balancing synchronization. More... | |
void | balancing_complete () |
After load balancing completes we can do the next scheduler iteration. | |
virtual void | gvt_resume () |
Methods called by the GVT Manager signifying the scheduler may resume. More... | |
virtual void | gvt_done (Time gvt, bool lb) |
Called when GVT is complete. More... | |
void | consume (RemoteEvent *e) |
Methods informing the GVT Manager about incoming/outgoing events. | |
void | produce (RemoteEvent *e) |
Protected Attributes | |
GVTManager * | gvt_manager |
Direct pointer to our local GVT Manager. | |
TriggerPtr | gvt_trigger |
Determines when to compute GVT. | |
TriggerPtr | print_trigger |
Determines when to print progress. | |
Concrete base class for distributed schedulers.
Unlike a sequential scheduler distributed schedulers need to worry about GVTs, and load balancing. Because of this, execution is broken up into iterations. Each iteration is a call to execute() and we need to ensure that no more than one execute() message is ever in flight.
void DistributedScheduler::groups_created | ( | ) |
Called after all group chares are created.
Called by QD, which now also includes GVT Manager creation.
|
virtual |
Called when GVT is complete.
After a GVT completes there are a number of things to check: The stat_trigger determines if we should log stats The lb_trigger determines if we should load balance before the next iteration The computed GVT determines if we are past the end time and the sim is over If none of the above are true, then just start the next iteration.
|
virtual |
Methods called by the GVT Manager signifying the scheduler may resume.
By default, don't allow LP execution to overlap with GVT computation.
Called when LPs can unblock
void DistributedScheduler::iteration_done | ( | ) |
Local methods for iteration control flow.
Helper method that should be called at the end of every scheduler iteration.
It checks the GVT trigger to see if we need to compute a GVT, and continues the scheduler otherwise.
void DistributedScheduler::next_iteration | ( | ) |
Helper method for starting the next scheduler iteration.
It ensures that an iteration will not start if an iteration is already running or if we are going to do load balancing this iteration after the current iteration.
void DistributedScheduler::start_balancing | ( | ) |
Methods for load balancing synchronization.
Tell every local LP to start load balancing.