Rcore Gangs __top__ Site
Modify your existing scheduler (e.g., RoundRobinScheduler ) to wrap gang logic:
impl GangScheduler pub fn new() -> Self Self gangs: BTreeMap::new(), task_to_gang: BTreeMap::new(), ready_gangs: VecDeque::new(), rcore gangs
fn next(&mut self) -> Option<Arc<TaskControlBlock>> if let Some(tid) = self.gang_sched.pick_next_task() return find_task_by_tid(tid); self.inner.next() Modify your existing scheduler (e
pub fn create_gang(&mut self, members: Vec<usize>) -> usize let id = self.gangs.len(); let gang = Arc::new(Mutex::new(Gang id, members: members.clone(), status: GangStatus::Pending, )); for &tid in &members self.task_to_gang.insert(tid, id); self.gangs.insert(id, gang); id Modify your existing scheduler (e.g.
pub struct HybridScheduler inner: RoundRobinScheduler, gang_sched: GangScheduler,
pub struct GangScheduler gangs: BTreeMap<usize, Arc<Mutex<Gang>>>, task_to_gang: BTreeMap<usize, usize>, ready_gangs: VecDeque<usize>, // queue of gang IDs ready to run
It sounds like you're referring to (the educational OS kernel written in Rust, often used in Tsinghua University’s OS courses) and gangs in the context of parallel computing or OS process groups (e.g., gang scheduling).