/* Time Sharing Computer Using Discrete State Simulation Test Program 1 CS509 Assignment 2 Winter 1995 G. Lindstrom */ import sim.*; class test1 extends job { test1(String n) { super(n); } void body() { run(10); scheduler.hold(5); // do some I/O payroll.print(); // demonstrate job::print() taxes.print(); // demonstrate job::print() run(20); scheduler.hold(15); // do some I/O run(30); scheduler.hold(25); // do some I/O remove_job(); terminate(); } static CPU cpu; static job payroll; static job taxes; public static void main(String av[]) { cpu = new CPU("peruvian", 0); // no time-slicing payroll = new test1("payroll"); scheduler.activate(payroll); taxes = new test1("taxes"); scheduler.activate(taxes); scheduler.run_simulation(); cpu.remove_cpu(); } }