Class sim.scheduler
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class sim.scheduler

java.lang.Object
   |
   +----sim.scheduler

public class scheduler
extends Object
scheduler class

provides basic scheduling functions Note: all methods and data in this class are static


Variable Index

 o clock
global simulated time
 o current
reference to current process

Constructor Index

 o scheduler()

Method Index

 o activate(process)
like activate(p, 0);
 o activate(process, int)
if p is not running or scheduled, schedule it with delay time; otherwise, do nothing
 o fatal_error(String)
signal a fatal error and die
 o hold(int)
schedule for activation after 'delay' time units, and passivate
 o pass_baton(process)
pass_baton() to support coroutines
 o pass_baton(process, boolean)
pass baton to next process
 o passivate()
make current process non-active
 o reactivate(process)
like reactivate(p, 0);
 o reactivate(process, int)
if p is not running or scheduled, schedule it with delay t; if p is running or scheduled, reschedule it with delay t
 o run_simulation()
start simulation (event queue must be non-empty)

Variables

 o clock
  public static int clock
global simulated time
 o current
  public static process current
reference to current process

Constructors

 o scheduler
  public scheduler()

Methods

 o fatal_error
  public static void fatal_error(String s)
signal a fatal error and die
 o hold
  public static void hold(int delay)
schedule for activation after 'delay' time units, and passivate @param delay time for which to hold
 o passivate
  public static void passivate()
make current process non-active
 o activate
  public static void activate(process p)
like activate(p, 0);
 o activate
  public static void activate(process p,
                              int time)
if p is not running or scheduled, schedule it with delay time; otherwise, do nothing
Parameters:
p - process to be activated
time - time after which to schedule p
 o reactivate
  public static void reactivate(process p)
like reactivate(p, 0);
 o reactivate
  public static void reactivate(process p,
                                int t)
if p is not running or scheduled, schedule it with delay t; if p is running or scheduled, reschedule it with delay t
Parameters:
p - process to be activated
t - time after which to activate p
 o run_simulation
  public static void run_simulation()
start simulation (event queue must be non-empty)
 o pass_baton
  public static void pass_baton(process p)
pass_baton() to support coroutines @param p process to be resumed
 o pass_baton
  public static void pass_baton(process p,
                                boolean die)
pass baton to next process @param p process to be resumed @param die caller dies if true

All Packages  Class Hierarchy  This Package  Previous  Next  Index