Deficit based Weighted Round Robin Scheduler

This commit is contained in:
Akshit Gaur
2026-03-22 13:00:31 +00:00
committed by Jeremy Soller
parent 74895c4f0f
commit b7dabfc3c2
10 changed files with 351 additions and 89 deletions
+7
View File
@@ -13,6 +13,7 @@ use crate::{
context::{
self, arch,
file::{FileDescriptor, LockedFileDescription},
run_contexts_mut,
},
cpu_set::{LogicalCpuId, LogicalCpuSet},
cpu_stats,
@@ -137,6 +138,10 @@ pub struct Context {
pub userspace: bool,
pub being_sigkilled: bool,
pub fmap_ret: Option<Frame>,
/// Priority
pub prio: usize,
/// Enqueued
pub enqueued: bool,
// TODO: id can reappear after wraparound?
pub owner_proc_id: Option<NonZeroUsize>,
@@ -194,6 +199,8 @@ impl Context {
files: Arc::new(RwLock::new(FdTbl::new())),
userspace: false,
fmap_ret: None,
prio: 20,
enqueued: false,
being_sigkilled: false,
owner_proc_id,