nachos.threads
Class RoundRobinScheduler

java.lang.Object
  extended by nachos.threads.Scheduler
      extended by nachos.threads.RoundRobinScheduler

public class RoundRobinScheduler
extends Scheduler

A round-robin scheduler tracks waiting threads in FIFO queues, implemented with linked lists. When a thread begins waiting for access, it is appended to the end of a list. The next thread to receive access is always the first thread in the list. This causes access to be given on a first-come first-serve basis.


Constructor Summary
RoundRobinScheduler()
          Allocate a new round-robin scheduler.
 
Method Summary
 ThreadQueue newThreadQueue(boolean transferPriority)
          Allocate a new FIFO thread queue.
 
Methods inherited from class nachos.threads.Scheduler
decreasePriority, getEffectivePriority, getEffectivePriority, getPriority, getPriority, increasePriority, setPriority, setPriority
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RoundRobinScheduler

public RoundRobinScheduler()
Allocate a new round-robin scheduler.

Method Detail

newThreadQueue

public ThreadQueue newThreadQueue(boolean transferPriority)
Allocate a new FIFO thread queue.

Specified by:
newThreadQueue in class Scheduler
Parameters:
transferPriority - ignored. Round robin schedulers have no priority.
Returns:
a new FIFO thread queue.