nachos.threads
Class RoundRobinScheduler
java.lang.Object
|
+--nachos.threads.Scheduler
|
+--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.
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
RoundRobinScheduler
public RoundRobinScheduler()
- Allocate a new round-robin scheduler.
newThreadQueue
public ThreadQueue newThreadQueue(boolean transferPriority)
- Allocate a new FIFO thread queue.
- Overrides:
- newThreadQueue in class Scheduler
- Parameters:
transferPriority - ignored. Round robin schedulers have
no priority.- Returns:
- a new FIFO thread queue.