pub struct RoundRobinScheduler { /* private fields */ }
Expand description
Lock-free round-robin scheduler.
This scheduler maintains per-CPU run queues using lock-free ring buffers. Threads are scheduled in round-robin fashion with priority-based time slicing. Load balancing occurs when CPUs become idle or overloaded.
Implementations§
Trait Implementations§
Source§impl Scheduler for RoundRobinScheduler
impl Scheduler for RoundRobinScheduler
Source§fn pick_next(&self, cpu_id: CpuId) -> Option<ReadyRef>
fn pick_next(&self, cpu_id: CpuId) -> Option<ReadyRef>
Pick the next thread to run on the given CPU. Read more
Source§fn on_tick(&self, current: &RunningRef) -> Option<ReadyRef>
fn on_tick(&self, current: &RunningRef) -> Option<ReadyRef>
Handle a scheduler tick for the currently running thread. Read more
Source§fn set_priority(&self, thread_id: ThreadId, priority: u8)
fn set_priority(&self, thread_id: ThreadId, priority: u8)
Set the priority of a thread. Read more
Source§fn on_yield(&self, current: RunningRef)
fn on_yield(&self, current: RunningRef)
Handle a thread yielding the CPU voluntarily. Read more
Source§fn on_block(&self, current: RunningRef)
fn on_block(&self, current: RunningRef)
Handle a thread blocking (going to sleep). Read more
impl Send for RoundRobinScheduler
impl Sync for RoundRobinScheduler
Auto Trait Implementations§
impl !Freeze for RoundRobinScheduler
impl RefUnwindSafe for RoundRobinScheduler
impl Unpin for RoundRobinScheduler
impl !UnwindSafe for RoundRobinScheduler
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more