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
-
clock
- global simulated time
-
current
- reference to current process
-
scheduler()
-
-
activate(process)
- like activate(p, 0);
-
activate(process, int)
- if p is not running or scheduled, schedule
it with delay time; otherwise, do nothing
-
fatal_error(String)
- signal a fatal error and die
-
hold(int)
- schedule for activation after 'delay' time units,
and passivate
-
pass_baton(process)
- pass_baton() to support coroutines
-
pass_baton(process, boolean)
- pass baton to next process
-
passivate()
-
make current process non-active
-
reactivate(process)
-
like reactivate(p, 0);
-
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
-
run_simulation()
- start simulation (event queue must be non-empty)
clock
public static int clock
- global simulated time
current
public static process current
- reference to current process
scheduler
public scheduler()
fatal_error
public static void fatal_error(String s)
- signal a fatal error and die
hold
public static void hold(int delay)
- schedule for activation after 'delay' time units,
and passivate
@param delay time for which to hold
passivate
public static void passivate()
- make current process non-active
activate
public static void activate(process p)
- like activate(p, 0);
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
reactivate
public static void reactivate(process p)
- like reactivate(p, 0);
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
run_simulation
public static void run_simulation()
- start simulation (event queue must be non-empty)
pass_baton
public static void pass_baton(process p)
- pass_baton() to support coroutines
@param p process to be resumed
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