25
CS269: HW/SW Engineering of Embedded Systems, Winter02
Schedulers
•Scheduler specifies an algorithm for some constraints.
scheduler S1{
  port SMsched port0, port1;
  ...
  void doScheduling(void){
       // priority scheduling
  }
}
P2
M
P1
M1
M2
S1
•The algorithms are used during simulation.
•Typically, later in the design phase, thread() is added to a scheduler,
–to specify protocols to communicate with the controlled processes,
–to call doScheduling() as a sub-routine.
•     At that point, the scheduler becomes a process.
•Schedulers may be hierarchical.