---
title: "Real-time system and real-time OS components"
subject: "Software Engineering"
chapter: 4
key: "semester_5/software_engineering:real-time-os"
source: https://www.bctengineer.com/q/semester_5/software_engineering/real-time-os
site: BCT Engineering
---

# Real-time system and real-time OS components

Software Engineering · Chapter 4: Real-time software design

- Asked in: 2068 Chaitra, 1+4 marks; year not given, 1+4 marks
- Video: [Introduction to RTOS Part 1 - What is a Real-Time Operating System (RTOS)? | Digi-Key Electronics](https://www.youtube.com/watch?v=F321087yYy4) — DigiKey
- Answer checked by Claude Sonnet 5.5 on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_5/software_engineering/real-time-os
- Whole chapter: https://www.bctengineer.com/md/semester_5/software_engineering/chapter-4

## Question

Define a real-time system. Explain the real-time operating system and its components?

## Short answer

A real-time system's correctness depends on results and timing; hard real-time fails if a deadline is missed, soft degrades. An RTOS manages processes with priority-based pre-emptive scheduling and bounded response times. Its components are real-time clock, interrupt handler, scheduler, resource manager, and dispatcher.

## Answer

A **real-time system** is a software system whose correct functioning depends both on the **results** it produces and on the **time** at which these results are produced. A **hard** real-time system fails if a deadline is missed (e.g. airbag control); a **soft** one only degrades (e.g. video streaming).

#### Real-time operating system (RTOS)
An RTOS (real-time executive) manages processes and resources in a real-time system so that time-critical processes meet their deadlines. It is usually small, uses **priority-based pre-emptive scheduling**, and has predictable, bounded response times. Examples: VxWorks, FreeRTOS, QNX.

Processes are handled at different priority levels:
- **Interrupt level** – highest priority, for processes that need a very fast response (e.g. the clock process).
- **Clock level** – periodic processes.
- **Background level** – low-priority work with no deadline.

#### Components of an RTOS (Sommerville)

```text
                 +-----------------+
                 | Real-time clock |
                 +-----------------+
                          |
 +-----------+            v
 | Interrupt |----> +------------+
 | handler   |      | Scheduler  |<--- process
 +-----------+      +------------+     priority info
                          |
                          v
                 +-------------------+
                 | Resource manager  |<--- available
                 +-------------------+     resource list
                          |
                          v
                 +-------------------+
                 |    Dispatcher     |--> ready list
                 +-------------------+     -> processor
```

1. **Real-time clock** – gives regular timing signals used to schedule periodic processes.
2. **Interrupt handler** – manages aperiodic requests for service (e.g. a sensor event) and passes them on quickly.
3. **Scheduler** – examines the processes that can run and picks the next one according to priority.
4. **Resource manager** – allocates memory and processor resources to the process chosen by the scheduler.
5. **Dispatcher** – starts the execution of a process from the ready list on a free processor.

Large real-time systems may also have a **configuration manager** (dynamic reconfiguration, hot-swapping of hardware) and a **fault manager** (detects faults and moves work to backup systems).

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. A real-time system's correctness depends on:
   A. Only the results produced
   B. Only the speed of the processor
   C. Only user interface design
   D. Both the results and the time at which they are produced
   Answer: D. Correct functioning depends on results and on when they are produced. (Key point: Real-time system)

2. Which is a hard real-time example?
   A. Video streaming
   B. Web browsing
   C. Airbag control
   D. Word processing
   Answer: C. A hard system fails if a deadline is missed, as in an airbag controller; streaming is soft. (Key point: Hard vs soft)

3. What does the RTOS scheduler do?
   A. Allocates memory to processes
   B. Starts the process on a free processor
   C. Gives regular timing signals
   D. Examines runnable processes and picks the next by priority
   Answer: D. The scheduler chooses the next process by priority; the resource manager allocates resources and the dispatcher starts execution. (Key point: Scheduler role)

4. What does the interrupt handler manage?
   A. Periodic clock ticks
   B. Aperiodic requests for service such as a sensor event
   C. Memory allocation
   D. Fault recovery to backup
   Answer: B. The interrupt handler deals with aperiodic requests and passes them on quickly. (Key point: Interrupt handler)

## Related in Software Engineering

- [Real-time versus ordinary software and OS; data acquisition](https://www.bctengineer.com/question.md?key=semester_5%2Fsoftware_engineering%3Areal-time-vs-non-real-time) — Software Engineering, chapter 4
- [General OS versus real-time OS](https://www.bctengineer.com/question.md?key=semester_5%2Fsoftware_engineering%3Ageneral-os-vs-rtos) — Software Engineering, chapter 4
- [Designing software for real-time environments](https://www.bctengineer.com/question.md?key=semester_5%2Fsoftware_engineering%3Areal-time-design-considerations) — Software Engineering, chapter 4

## Related in other subjects

- [Basic functions of real-time kernel](https://www.bctengineer.com/question.md?key=semester_6%2Fembedded_system%3Areal-time-kernel-functions) — Embedded System, chapter 6, asked 2×
- [Preemptive vs non-preemptive; real-time scheduling](https://www.bctengineer.com/question.md?key=semester_6%2Foperating_system%3Apreemptive-nonpreemptive-realtime) — Operating System, chapter 2
- [Rate Monotonic real-time schedule](https://www.bctengineer.com/question.md?key=semester_6%2Foperating_system%3Arate-monotonic-schedule) — Operating System, chapter 2
- [Real-time scheduling; two-processor numerical](https://www.bctengineer.com/question.md?key=semester_6%2Foperating_system%3Arealtime-two-processor-fcfs-sjf-priority-rr) — Operating System, chapter 2
