InterviewLegend

Design a Task Scheduler

Commonly asked
Alex Chen40 min readAdded 44 real interview reports

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.

The Hudson River Trading angle
Candidates report this one early at Hudson River Trading, in intern first rounds and phone screens in New York and Singapore. It comes as an abstract task-scheduler class, an asyncio-style framework from a long spec, or a one-liner about task switching. In the spec version, talking through the design counts as much as the code.

Hudson River TradingPremium lesson · System design round

The Hudson River Trading design, worked end to end.

  1. The API and data modelSystem design
  2. The design, drawn out1 diagram
  3. 5 deep divesWith the tradeoffs
Get the Hudson River Trading questions

$49 a year · all 107 companies · instant access

20,000+ candidate reports · guide updated

Hudson River Trading interview guide

Know what Hudson River Trading asks before you walk in.

27 coding · 2 system design · 16 behavioral questions

Get Premium$49 a year · Instant access
Or start freeNo card.

Get their questions first.

Had your Hudson River Trading interview?How we research

InterviewLegend is independent and not affiliated with or endorsed by any company it covers.