//with no preemption
class ShortestJobFirst{

} 

//with preemption
class ShortestJobFirstPre{

}

//with preemption via configurable time slice TSLICE=100MS
class RoundRobin{

}

/*
 	with random priority levels 0-4 assigned to processes at 
 	the onset (low numbers indicate high priority); processes 
 	with the same priority are processed via the FCFS algorithm; 
 	higher-priority processes entering the ready queue may 
 	preempt a running process; aging causes lower-priority 
 	processes to increase their priority by 1 every elapsed 
 	1200 milliseconds
 */
class PreemptivePriority{

}

class Timer{
	int n;
	public Timer (int n){
		this.n=n;
	}

}

public class ProcessSimulation implements Runnable{

	public static void main(String[] args) {
			System.out.println("Test: First Print");
	}

	public void run(){
			System.out.println("Test: First Print in run()");		
	}

}
@@ -596,21 +596,47 @@
 %0A%0Aclass 
-Timer
+ElapsedTime implements Runnable
 %7B%0A%09int n
@@ -637,24 +637,25 @@
 %09int n;%0A
+%0A
 %09public 
 Timer (i
@@ -650,33 +650,166 @@
 lic 
-Timer (int n)%7B%0A%09%09this.n=n
+ElapsedTime()%7B%0A%09%09this.n=0;%0A%09%7D%0A%0A%09public void run()%7B%0A%09%09while(true)%7B%0A%09%09%09this.n += 1;%0A%09%09%7D%0A%09%7D%0A%0A%09public void time()%7B%0A%09%09System.out.println(%22Elapsed Time: %22 + this.n)
 ;%0A%09%7D
@@ -909,16 +909,53 @@
 rgs) %7B%0A%09
+%09ElapsedTime t1 = new ElapsedTime();%0A
 %09%09System
@@ -989,16 +989,494 @@
 rint
+ln
 %22);%0A
+%09%09Thread th1 = new Thread(t1);%0A%09%09th1.start();%0A%09%09t1.time();%0A%09%09t1.time();%0A%09%09t1.time();%0A%09%09t1.time();%0A%09%09t1.time();%0A%09%09int i=0;%0A%09%09while(i!=30000000) ++i;%0A%09%09System.out.println(%22past while%22);%0A%09%09t1.time();%0A%09%09t1.time();%0A%09%09t1.time();%0A%0A%09%09try%7B%0A%09%09    while ( Thread.activeCount() %3E 1 )%0A%09%09    %7B%0A%09%09      if ( th1.isAlive() )%0A%09%09      %7B%0A%09%09        th1.join();     // BLOCKS%0A%09%09      %7D%0A%09%09      System.out.println( %22t1 thread terminated%22 );%0A%09%09    %7D%0A%09%09%7D%0A%09%09catch ( InterruptedException ex )%0A%09%09%7B%0A%09%09%7D%0A
 %09%7D%0A%0A
+%0A
 %09pub
@@ -1491,17 +1491,16 @@
  run()%7B%0A
-%09
 %09%09System

structure of program created