pub struct MLFQSched<'a, A: 'static + Alarm<'static>> {
pub processes: [List<'a, MLFQProcessNode<'a>>; 3],
/* private fields */
}
Fields§
§processes: [List<'a, MLFQProcessNode<'a>>; 3]
Implementations§
Source§impl<'a, A: 'static + Alarm<'static>> MLFQSched<'a, A>
impl<'a, A: 'static + Alarm<'static>> MLFQSched<'a, A>
Sourcepub const PRIORITY_REFRESH_PERIOD_MS: u32 = 5_000u32
pub const PRIORITY_REFRESH_PERIOD_MS: u32 = 5_000u32
How often to restore all processes to max priority
pub const NUM_QUEUES: usize = 3usize
pub fn new(alarm: &'static A) -> Self
Trait Implementations§
Source§impl<A: 'static + Alarm<'static>, C: Chip> Scheduler<C> for MLFQSched<'_, A>
impl<A: 'static + Alarm<'static>, C: Chip> Scheduler<C> for MLFQSched<'_, A>
Source§fn next(&self) -> SchedulingDecision
fn next(&self) -> SchedulingDecision
Decide which process to run next. Read more
Source§fn result(&self, result: StoppedExecutingReason, execution_time_us: Option<u32>)
fn result(&self, result: StoppedExecutingReason, execution_time_us: Option<u32>)
Inform the scheduler of why the last process stopped executing, and how
long it executed for. Notably,
execution_time_us
will be None
if the the scheduler requested this process be run cooperatively.Source§unsafe fn continue_process(&self, _: ProcessId, _: &C) -> bool
unsafe fn continue_process(&self, _: ProcessId, _: &C) -> bool
Ask the scheduler whether to continue trying to execute a process. Read more
Source§unsafe fn execute_kernel_work(&self, chip: &C)
unsafe fn execute_kernel_work(&self, chip: &C)
Tell the scheduler to execute kernel work such as interrupt bottom
halves and dynamic deferred calls. Most schedulers will use this default
implementation, but schedulers which at times wish to defer interrupt
handling will reimplement it. Read more
Source§unsafe fn do_kernel_work_now(&self, chip: &C) -> bool
unsafe fn do_kernel_work_now(&self, chip: &C) -> bool
Ask the scheduler whether to take a break from executing userspace
processes to handle kernel tasks. Most schedulers will use this default
implementation, which always prioritizes kernel work, but schedulers
that wish to defer interrupt handling may reimplement it.
Auto Trait Implementations§
impl<'a, A> !Freeze for MLFQSched<'a, A>
impl<'a, A> !RefUnwindSafe for MLFQSched<'a, A>
impl<'a, A> !Send for MLFQSched<'a, A>
impl<'a, A> !Sync for MLFQSched<'a, A>
impl<'a, A> Unpin for MLFQSched<'a, A>
impl<'a, A> !UnwindSafe for MLFQSched<'a, A>
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