RTOS & Real-Time Concepts · Interview question

How do you determine whether a set of tasks will meet their deadlines?

A strong answer

Through schedulability analysis, which combines each task's worst-case execution time, period, and deadline. The first, simplest check is CPU utilization: sum each task's WCET divided by its period; if that total exceeds 1.0 (100%) the task set is definitely infeasible, and even below that you need to be under the relevant bound. Under fixed-priority scheduling, the classic approach is Rate-Monotonic Scheduling: assign priorities by period, the task with the shortest period gets the highest priority (more frequent equals more urgent), and there's a utilization bound (around 69% as the number of tasks grows, often higher in practice) below which all deadlines are guaranteed; for utilizations between that bound and 100% you use the more precise response-time analysis, which iteratively computes each task's worst-case response time including interference from higher-priority tasks and blocking from lower-priority ones (priority inversion), and checks it against the deadline. The dynamic-priority alternative is Earliest Deadline First, which always runs the task with the nearest deadline and can theoretically reach 100% utilization (more efficient) but is more complex to implement and degrades unpredictably under overload. The practical guidance is to assign priorities by urgency (RMS), keep utilization comfortably below the bound to leave margin for jitter and interrupts, include blocking time from shared resources in the analysis, and verify with both analysis and measurement. You don't just hope it fits, you compute whether it does.

What a weak answer sounds like

You know the answer. Do you know what gets you dinged?

Pro breaks down the answer most candidates actually give to this question — and the specific reason an interviewer marks it down. It’s the difference between sounding correct and sounding senior, on all 472 questions.

From the lesson

Hard vs Soft Real-Time

Real-time is about meeting deadlines deterministically, not being fast: hard vs firm vs soft by the cost of a miss, worst-case execution time, schedulability, and what destroys determinism.

More Hard vs Soft Real-Time questions

Browse all 472 interview questions
How do you determine whether a set of tasks will meet their deadlines? | EmbeddedPrep.io