Design multi-core service startup scheduler
SnowflakeSoftware Engineer · OnsiteLast updated
This question evaluates scheduling and resource-management skills, including DAG dependency handling, concurrency bounding, timeout/retry strategies, observability, and correctness reasoning for service startup orchestration.
Services must start on a host with M CPU cores, and each service may depend on others (a DAG). Design a scheduler that minimizes total startup time while respecting dependencies. Discuss: detecting ready services, maximizing parallelism within core limits, prioritization, bounding concurrency, handling timeouts/retries/failures, backoff, resource constraints (CPU, memory, ports), and observability. Describe data structures (e.g., in-degree tracking, ready queues), correctness properties, and how you would extend it across multiple machines.
Solution walkthrough is for members
Get the full walkthrough with reference code and complexity analysis, plus Kitty Coach at 300 messages a day. Hints, the code runner and community answers stay free.