Real-Time Systems, RTOS Scheduling & WCET Questions

Building embedded and control software with timing guarantees: hard, firm and soft real-time and why fast is not the same as predictable, RTOS task scheduling (fixed-priority, rate-monotonic, earliest-deadline-first, cooperative vs preemptive, lightweight cooperative schedulers on small microcontrollers), priorities and preemption, RTOS task states and lifecycle, bounding priority-inversion blocking with inheritance and ceiling protocols in RTOS designs, schedulability and response-time analysis including blocking terms, worst-case execution time estimation (static, measurement-based, cache, pipeline and DMA bus effects), RTOS internals such as the tick, tickless idle, software timers and context switching, serving aperiodic and best-effort work beside hard periodic tasks, multicore and mixed-criticality scheduling, bounded-wait lock APIs, choosing an RTOS, and diagnosing deadline misses and jitter from timing traces. Excludes interrupt mechanism and ISR design, general-purpose OS (desktop and server) CPU scheduling, priority inversion as a generic locking hazard, general synchronization primitives and lock-free data structures, firmware architecture and power optimization, which are covered elsewhere.

EasyTechnical
104 practiced

What is worst-case execution time, and why does a hard real-time design need it rather than an average? Describe how it is obtained in practice and where each approach falls short.

MediumTechnical
84 practiced

Three periodic tasks run under rate-monotonic scheduling on one core: A with a 1 ms execution time every 4 ms, B with 2 ms every 6 ms, and C with 3 ms every 12 ms. Is the set schedulable? State the utilisation test you would apply first, what it tells you here, and what you do when it is inconclusive.

MediumTechnical
76 practiced

How would you verify the timing behaviour of an RTOS application from a trace? Where would you put trace points, how do you timestamp them, how do you keep the tracing from distorting the timing, and how do you pull out the worst-case occurrences?

HardTechnical
97 practiced

Your RTOS mutex only offers a blocking lock, and a hard-deadline task needs a try-lock and a lock with a timeout. Sketch the C API and implementation on a small microcontroller, say how the timeout and priority inheritance interact, and show how you would bound the worst-case time the hard task can wait on the lock.

MediumSystem Design
104 practiced

You have a small microcontroller with no MMU and 8 periodic jobs running from 1 Hz to 1 kHz. Design a lightweight cooperative scheduler for it. What does a task look like, where does time come from, and how do you keep behaviour deterministic with minimal stack?

Unlock Full Question Bank

Get access to all 32 Real-Time Systems, RTOS Scheduling & WCET interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.