Rcore Gangs Official

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).

impl Scheduler for HybridScheduler fn push(&mut self, task: Arc<TaskControlBlock>) if let Some(gang_id) = self.gang_sched.task_to_gang.get(&task.tid) self.gang_sched.notify_task_ready(task.tid); else self.inner.push(task); rcore gangs

/// Called when a task becomes runnable (e.g., wakes from I/O or is created) pub fn notify_task_ready(&mut self, tid: usize) if let Some(&gang_id) = self.task_to_gang.get(&tid) let gang = self.gangs.get(&gang_id).unwrap(); let mut gang_lock = gang.lock(); // Check if all members are now runnable let all_ready = gang_lock.members.iter().all( It sounds like you're referring to (the educational

/// Called when a task yields or blocks pub fn task_blocked(&mut self, tid: usize) if let Some(&gang_id) = self.task_to_gang.get(&tid) let gang = self.gangs.get(&gang_id).unwrap(); let mut gang_lock = gang.lock(); gang_lock.status = GangStatus::Pending; // Optionally, preempt all other members of this gang for &other in &gang_lock.members if other != tid && task_status(other) == TaskStatus::Running force_yield_task(other); let mut gang_lock = gang.lock()