Schedule one million videos per week through CPU and GPU stages, estimating capacity and handling dependencies, backpressure, retries, and intermediate data.
Design a task scheduler that processes 1,000,000 videos per week. Each video passes through three processing stages:
1. Stage 1 requires CPU resources.
2. Stage 2 requires both GPU and CPU resources.
3. Stage 3 requires CPU resources.
Explain how you would schedule the stages, manage intermediate data, estimate capacity, and recover from failures. Discuss how the scheduler handles a general mix of CPU and GPU jobs as well.
### What a Strong Answer Covers
- Dependencies between a video's stages and separate accounting for CPU and GPU demand.
- Capacity estimates that distinguish weekly average throughput from burst demand and execution time.
- Resource admission that avoids holding one scarce resource indefinitely while waiting for another.
- Durable stage state, retry-safe result publication, backpressure, and workload monitoring.
### Follow-up Questions
- What happens if CPU stages produce work faster than the GPU stage can consume it?
- How would a weekly processing target change your policy if most videos arrived near the end of the week?
Overview: Schedule one million videos per week through CPU and GPU stages, estimating capacity and handling dependencies, backpressure, retries, and intermediate data.
Design a task scheduler that processes 1,000,000 videos per week. Each video passes through three processing stages:
Stage 1 requires CPU resources.
Stage 2 requires both GPU and CPU resources.
Stage 3 requires CPU resources.
Explain how you would schedule the stages, manage intermediate data, estimate capacity, and recover from failures. Discuss how the scheduler handles a general mix of CPU and GPU jobs as well.
What a Strong Answer Covers Guidance
Dependencies between a video's stages and separate accounting for CPU and GPU demand.
Capacity estimates that distinguish weekly average throughput from burst demand and execution time.
Resource admission that avoids holding one scarce resource indefinitely while waiting for another.
Durable stage state, retry-safe result publication, backpressure, and workload monitoring.
Follow-up Questions Guidance
What happens if CPU stages produce work faster than the GPU stage can consume it?
How would a weekly processing target change your policy if most videos arrived near the end of the week?