pub struct GlobalQueueScheduler<K: Kernel> {
queue: PriorityQueueSet<K>,
}Expand description
Scheduler backend with a single global PriorityQueueSet shared by all
cores.
Preempted and terminating threads are placed at the head of their priority’s queue so they resume (or are reaped) before peers of equal priority; started, ticked, and woken threads go to the tail for round-robin fairness.
Fields§
§queue: PriorityQueueSet<K>Implementations§
Trait Implementations§
Source§impl<K: Kernel> SchedulerAlgorithmInterface<K> for GlobalQueueScheduler<K>
impl<K: Kernel> SchedulerAlgorithmInterface<K> for GlobalQueueScheduler<K>
Source§fn schedule_thread(
&mut self,
thread: ForeignBox<Thread<K>>,
reason: RescheduleReason,
)
fn schedule_thread( &mut self, thread: ForeignBox<Thread<K>>, reason: RescheduleReason, )
Takes ownership of
thread and makes it eligible to run. Read moreSource§fn pop_next_thread(&mut self) -> Option<ForeignBox<Thread<K>>>
fn pop_next_thread(&mut self) -> Option<ForeignBox<Thread<K>>>
Removes and returns the highest-priority ready thread, or
None if no
thread is ready.