General overview of scheduling as it pertains to operating systems: P processors and N tasks If P > N, scheduling is trival So we're not talking about that Considerations: Long-running background tasks bitcoin chain validation, rendering, etc. Immediate, but easy tasks Important vs. Urgent As a real-life thing Immediate, important, urgent tasks These don't leave much wiggle room! Games usually count here Servers can be this way too Alright, algorithms: We'll use Wikipedia's list First come, first served No prioritization We usually like prioritization Priority queue, with wait time secondary This can work Remember heaps, from CS311? Shortest job first: But how would we know? Round-robin: Each one gets a little time Maybe time is related to priority level Or skip low priority tasks Multi-level queue queue has priority level, not individual process Used on a lot of current systems Completely Fair Scheduler We're using it right now Good for sleepy processes priority = -niceness Another demo: Process lookup module We'll write the name of a process It'll generate a report on that process What can we see about the scheduling on it?