Jump to content
View in the app

A better way to browse. Learn more.

IPB-Board.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Rcore Gangs <2024>

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

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

pub struct HybridScheduler inner: RoundRobinScheduler, gang_sched: GangScheduler, rcore gangs

impl GangScheduler pub fn new() -> Self Self gangs: BTreeMap::new(), task_to_gang: BTreeMap::new(), ready_gangs: VecDeque::new(),

/// Pick the next runnable gang, then return its next member to run pub fn pick_next_task(&mut self) -> Option<usize> while let Some(gang_id) = self.ready_gangs.pop_front() let gang = self.gangs.get(&gang_id).unwrap(); let mut gang_lock = gang.lock(); if gang_lock.status == GangStatus::Runnable gang_lock.status = GangStatus::Running; // Return the first member that isn't already running on a CPU for &tid in &gang_lock.members if !is_task_running_on_another_cpu(tid) return Some(tid); // If all already running (rare), re-queue self.ready_gangs.push_back(gang_id); None pub struct GangScheduler gangs: BTreeMap&lt

Modify your existing scheduler (e.g., RoundRobinScheduler ) to wrap gang logic:

/// 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) &m pub struct HybridScheduler inner: RoundRobinScheduler

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.