Class FIFOScheduler

java.lang.Object
  |
  +--FIFOScheduler
All Implemented Interfaces:
Scheduler

public class FIFOScheduler
extends java.lang.Object
implements Scheduler

A FIFOScheduler maintains a queue of ready processes in first-in-first-out order.


Constructor Summary
FIFOScheduler()
          new FIFOScheduler() returns a new first-in-first-out scheduler.
 
Method Summary
 void addProcess(PCB proc)
          sched.addProcess(proc) adds proc to sched's ready queue.
 PCB getSelectedProcess()
          sched.getSelectedProcess() removes and returns a process selected from sched's ready queue.
 void printProcesses()
          sched.printProcesses() prints the processes in sched's ready queue.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FIFOScheduler

public FIFOScheduler()
new FIFOScheduler() returns a new first-in-first-out scheduler.

Method Detail

getSelectedProcess

public PCB getSelectedProcess()
sched.getSelectedProcess() removes and returns a process selected from sched's ready queue.

Specified by:
getSelectedProcess in interface Scheduler

addProcess

public void addProcess(PCB proc)
sched.addProcess(proc) adds proc to sched's ready queue.

Specified by:
addProcess in interface Scheduler

printProcesses

public void printProcesses()
sched.printProcesses() prints the processes in sched's ready queue.

Specified by:
printProcesses in interface Scheduler