Design a Multi-Core Service Startup Scheduler
A host runs dozens of services with a dependency DAG; a service may start only after the services it depends on are healthy. Design the scheduler that brings the host up as fast as possible on M cores, respecting memory and port budgets, handling services that hang or fail, and reporting what blocked.
Cover the ordering, the limit on concurrent starts, readiness versus started, timeouts and retries, failure reporting, and how the same design extends across machines.
Hints
Hint 1
Kahn's algorithm with a ready queue, exactly as in the course-schedule family, plus a cap of M concurrent starts and checks against memory and port budgets before launching.
Hint 2
A service unblocks its dependants only when its health check passes, not when its process starts; prioritise the ready service with the longest remaining dependency chain.
Hint 3
Timeouts and retries with backoff per service; a service that fails permanently blocks and reports its transitive dependants instead of hanging the boot.
Asked at
Sign in to talk to the interviewer — ask what's in scope, what scale to design for, or for a nudge when you're stuck. Conversations save to your account.