DREAM::FixedPriorityScheduler Class Reference

Fixed priority-based Scheduler model. More...

#include <Scheduler.h>

Inheritance diagram for DREAM::FixedPriorityScheduler:

DREAM::Scheduler List of all members.

Public Member Functions

 FixedPriorityScheduler (const std::string &id, DREAM::System *system_ptr, uint CPUs=1)
 Constructor.
virtual ~FixedPriorityScheduler ()
 Destructor.
virtual uint CPUs () const
 Returns the number of CPUs managed by the FixedPriorityScheduler.
virtual bool highestpriority (const DREAM::Node *node_ptr) const
 Returns true if the Task is deployed on the highest priority Thread.
virtual bool lowestpriority (const DREAM::Node *node_ptr) const
 Returns true if the Task is deployed on the lowest priority Thread.
virtual bool nonpreemptive () const
 Returns true if the Scheduler is non-preemptive (has only 1 thread).
virtual void schedule (bool deterministic) throw (DREAM::Exception)
 Schedules a Node for execution.
virtual void simulate (bool verbose, bool deterministic=false)
 Starts deterministic simulation.

Detailed Description

Fixed priority-based Scheduler model.

This class is the implementation of the static priority-based Scheduler in the DRE Semantic Domain.

Definition at line 460 of file Scheduler.h.


Constructor & Destructor Documentation

DREAM::FixedPriorityScheduler::FixedPriorityScheduler ( const std::string &  id,
DREAM::System system_ptr,
uint  CPUs = 1 
)

Constructor.

Definition at line 615 of file Scheduler.cpp.

DREAM::FixedPriorityScheduler::~FixedPriorityScheduler (  )  [virtual]

Destructor.

Definition at line 620 of file Scheduler.cpp.


Member Function Documentation

uint DREAM::FixedPriorityScheduler::CPUs (  )  const [inline, virtual]

Returns the number of CPUs managed by the FixedPriorityScheduler.

Reimplemented from DREAM::Scheduler.

Definition at line 624 of file Scheduler.cpp.

References DREAM::Scheduler::CPUs_.

bool DREAM::FixedPriorityScheduler::highestpriority ( const DREAM::Node node_ptr  )  const [virtual]

Returns true if the Task is deployed on the highest priority Thread.

Reimplemented from DREAM::Scheduler.

Definition at line 629 of file Scheduler.cpp.

References DREAM::Node::priority().

bool DREAM::FixedPriorityScheduler::lowestpriority ( const DREAM::Node node_ptr  )  const [virtual]

Returns true if the Task is deployed on the lowest priority Thread.

Reimplemented from DREAM::Scheduler.

Definition at line 645 of file Scheduler.cpp.

References DREAM::Node::priority().

bool DREAM::FixedPriorityScheduler::nonpreemptive (  )  const [virtual]

Returns true if the Scheduler is non-preemptive (has only 1 thread).

Reimplemented from DREAM::Scheduler.

Definition at line 661 of file Scheduler.cpp.

void DREAM::FixedPriorityScheduler::schedule ( bool  deterministic  )  throw (DREAM::Exception) [virtual]

Schedules a Node for execution.

This function will choose the highest subpriority Node in the highest priority frame and schedule it for execution by calling Node::execute (). Multiple Tasks will be scheduled from multi-threaded Lanes on a multiprocessor platform.

Parameters:
deterministic specifies whether randomness is allowed.

Reimplemented from DREAM::Scheduler.

Definition at line 669 of file Scheduler.cpp.

References DREAM::Thread::availablethreads(), DREAM::AVLTree< key_type, item_type >::begin(), DREAM::Task::execute(), DREAM::NodeList::find(), DREAM::System::find_current(), DREAM::Thread::get_exec_map(), DREAM::Thread::get_recent_avltree(), DREAM::Node::id(), DREAM::AVLTree< key_type, item_type >::insert(), maxuint, Option::race_condition_, DREAM::random(), DREAM::Thread::recent(), DREAM::Thread::scheduler(), DREAM::AVLTree< key_type, item_type >::size(), DREAM::Task::subpriority(), DREAM::Node::subpriority(), DREAM::Scheduler::system(), DREAM::Thread::trace(), DREAM::Thread::usethread(), and Option::verbose1_.

void DREAM::FixedPriorityScheduler::simulate ( bool  verbose,
bool  deterministic = false 
) [virtual]

Starts deterministic simulation.

This simulation will simulate a deterministic trace of the system.

Reimplemented from DREAM::Scheduler.

Definition at line 817 of file Scheduler.cpp.

References Option::simulation_time_.


The documentation for this class was generated from the following files:
Generated on Fri Jul 27 18:30:04 2007 for DREAM by  doxygen 1.5.1