Simulating a Round Robin CPU scheduler in Python
This easy coding problem tests your ability to implement a fundamental operating-system scheduling algorithm. It's the kind of question interviewers at systems-focused firms like NVIDIA ask to verify you understand how CPU time is fairly allocated among competing processes and can translate that logic into clean, working code.
Round Robin scheduling relies on a queue: each process gets a fixed time slice (quantum), runs for that duration or until it finishes (whichever comes first), and either completes or goes to the back of the queue. The core challenge is tracking remaining time for each process, managing the queue order, and recording the completion sequence accurately.
- Queue management and simulation
- Tracking process state (remaining burst time)
- Handling completion conditions