Simulate EASY Backfill Scheduling on a GPU Cluster
Last updated: November 29, 2026
Quick Overview
Given a cluster of N nodes and a FIFO stream of jobs (id, submit time, nodes, walltime), simulate EASY backfill scheduling and return each job's start time, where later jobs may jump ahead only if they do not delay the reservation of the blocked head job.
Fluidstack
November 29, 20260
0
0 solved
Given a cluster of N nodes and a FIFO stream of jobs (id, submit time, nodes, walltime), simulate EASY backfill scheduling and return each job's start time, where later jobs may jump ahead only if they do not delay the reservation of the blocked head job.
Fluidstack offers managed Slurm on its dedicated clusters, and backfill is what keeps expensive GPUs busy while a large gang-scheduled job waits for enough free nodes. This onsite question tests event-driven simulation, heap usage and getting the reservation rule exactly right, which is where most candidates slip.
What the Interviewer Expects
- Run a discrete-event simulation keyed on submits and job completions
- Start head-of-queue jobs greedily while they fit
- Compute the head job's shadow time and the spare nodes at that time
- Backfill a job only if it ends by the shadow time or fits within spare nodes, and consume spare nodes correctly
- Handle simultaneous events and impossible jobs
- Analyse complexity and discuss real-world walltime overestimation
Key Topics to Cover
How to Approach This
- Clarify input constraints and edge cases before writing code.
- Walk through your approach verbally and confirm with the interviewer before coding.
- Start with a brute force solution, then optimize. Mention time and space complexity.
- Test your solution with examples, including edge cases like empty input or duplicates.
- Consider common patterns: sliding window, two pointers, hash map, BFS/DFS, dynamic programming.
Possible Follow-up Questions
- Users overestimate walltime and jobs finish early. How does that change behaviour and fairness?
- How would you extend this to conservative backfill, where every queued job gets a reservation?
- How would you add per-tenant fair-share priority on top of FIFO?
- What breaks if node topology matters, not just a node count?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice DSA ProblemsSample Answer
Requirements
Nodes are interchangeable. A job holds its nodes for exactly its walltime. Queue order is submit time then id. At any event time: start jobs from the head while they fit. If the head is blocked, reser...
High-Level Design
Events come from two sources: the sorted job list (submits) and a min-heap of running job end times. Advance now to the earlier of the two, free finished jobs, enqueue new submits, then call `schedu...