Design a Task Scheduler
A task scheduler decides which piece of work runs next and keeps track of everything that isn't running yet. An operating system has one for threads. Python's asyncio has one for coroutines, and so does every event-driven server. In this prompt you build a small one: the interface a task implements, the record the scheduler keeps per task, the queue it picks from and the loop that switches between tasks. It's a low-level design question, so the answer is classes and real code, with a few estimates to justify the choices. There's no fleet of servers to draw. Everything runs in one process, and for most of the lesson on one thread.
Hudson River TradingPremium lesson · System design round
The Hudson River Trading design, worked end to end.
- The API and data modelSystem design
- The design, drawn out1 diagram
- 5 deep divesWith the tradeoffs
$49 a year · all 107 companies · instant access
20,000+ candidate reports · guide updated
Hudson River Trading interview guideKnow what Hudson River Trading asks before you walk in.
27 coding · 2 system design · 16 behavioral questions
Get their questions first.
InterviewLegend is independent and not affiliated with or endorsed by any company it covers.