Put the vLLM-style continuous-batching scheduler steps in correct order for one iteration
Same topic, related formats. Practice these next.
Same topic, related formats. Practice these next.
Each scheduler iteration runs: reap finished requests and free their KV, compute the block budget, admit waiting requests, preempt under pressure, then run one batched decode step.
Picture a small ferry that crosses a river over and over. Before each crossing, the captain first lets off everyone who reached their stop, freeing up seats. Then he counts how many seats are now open. He waves new passengers aboard up to that count. If he somehow over-promised and the boat is too heavy, he asks the lowest-priority passengers to step off and wait for a later trip. Only then does he actually cross the river once, moving everyone forward by one stop. Next trip, he repeats the whole routine. The crossing itself is always the last thing, because the captain wants the fullest, safest boat before spending the fuel.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
3 min: token-level scheduling motivation + the five-step order with the reason for each position + preemption as fallback + why decode is last + paged attention as the enabler.
Real products, models, and research that use this idea.
What an interviewer would ask next. Try answering before peeking at the approach.
Red flags and common mistakes that signal junior thinking. Click to expand.
Putting the decode step first or admitting new requests before freeing finished ones. You must reclaim KV blocks before you can know the true budget for admission.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.