---
title: "RTOS and its architecture"
subject: "Embedded System"
chapter: 6
key: "semester_6/embedded_system:rtos-architecture"
source: https://www.bctengineer.com/q/semester_6/embedded_system/rtos-architecture
site: BCT Engineering
---

# RTOS and its architecture

Embedded System · Chapter 6: RTOS

- Asked in: 2079 Jestha, 4 marks; 2064 Poush (old course) (asked 2 times)
- 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 Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_6/embedded_system/rtos-architecture
- Whole chapter: https://www.bctengineer.com/md/semester_6/embedded_system/chapter-6

## Question

Briefly explain real time operating system. With neat diagram explain its architecture.

## Short answer

An RTOS guarantees tasks meet strict deadlines. Its architecture layers: application tasks, RTOS API, kernel (scheduler, task management, inter-task communication, timers, memory, interrupt handling), device drivers/BSP, and hardware. The kernel core provides deterministic scheduling and synchronization services.

## Answer

A **Real-Time Operating System (RTOS)** is an operating system that guarantees to complete tasks and respond to events within strict, predictable time limits. It manages tasks, time and resources so that deadlines are met (hard or soft real-time). Examples: VxWorks, uC/OS-II, FreeRTOS, QNX.

#### Architecture
```text
 +-----------------------------------------------+
 |        Application tasks (Task1 ... TaskN)    |
 +-----------------------------------------------+
 |                RTOS API / system calls        |
 +-----------------------------------------------+
 |  Kernel:                                      |
 |   Scheduler | Task mgmt | Inter-task comm.    |
 |   Timer/clock mgmt | Memory mgmt | I/O mgmt   |
 |   Interrupt handling | Synchronisation        |
 +-----------------------------------------------+
 |  Device drivers / Board support package (BSP) |
 +-----------------------------------------------+
 |       Hardware: processor, memory, I/O        |
 +-----------------------------------------------+
```
- **Kernel:** the core containing the scheduler (priority pre-emptive), task management (create, delete, suspend, resume), inter-task communication and synchronisation (semaphore, mutex, queue, event, mailbox), timers and memory management.
- **Interrupt handling:** low latency, ISR to task signalling.
- **Device drivers / BSP:** hardware-dependent software.
- **Application layer:** user tasks run on top, using the API.

## Check yourself

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

1. What does an RTOS guarantee?
   A. Virtual memory
   B. Maximum throughput
   C. Tasks complete and events are responded to within strict predictable time limits
   D. A rich GUI
   Answer: C. It manages tasks, time and resources to meet deadlines. (Key point: RTOS definition)

2. Which is the correct top-to-bottom order?
   A. Kernel, application, hardware, API
   B. Application tasks, RTOS API, kernel, drivers/BSP, hardware
   C. Hardware, kernel, application
   D. API, hardware, kernel
   Answer: B. Application tasks run on top using the API. (Key point: Layers)

3. Which belong to the kernel?
   A. Only the application
   B. Only device drivers
   C. Scheduler, task management, inter-task communication, timers, memory and interrupt handling
   D. Only the GUI
   Answer: C. These are core kernel services. (Key point: Kernel components)

4. What is the role of device drivers/BSP layer?
   A. Scheduling
   B. User tasks
   C. The GUI
   D. Hardware-dependent software
   Answer: D. It sits between the kernel and hardware. (Key point: BSP)

## Related in Embedded System

- [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×
- [RTOS and its services](https://www.bctengineer.com/question.md?key=semester_6%2Fembedded_system%3Artos-services) — Embedded System, chapter 6
- [RTOS versus general-purpose OS](https://www.bctengineer.com/question.md?key=semester_6%2Fembedded_system%3Artos-vs-gpos) — Embedded System, chapter 6, asked 4×
- [Context switching in RTOS](https://www.bctengineer.com/question.md?key=semester_6%2Fembedded_system%3Acontext-switching) — Embedded System, chapter 6, asked 3×
- [Synchronization issues in RTOS](https://www.bctengineer.com/question.md?key=semester_6%2Fembedded_system%3Artos-synchronization-issues) — Embedded System, chapter 6, asked 2×
- [Super scalar versus VLIW architecture](https://www.bctengineer.com/question.md?key=semester_6%2Fembedded_system%3Asuperscalar-vs-vliw) — Embedded System, chapter 2

## Related in other subjects

- [Real-time system and real-time OS components](https://www.bctengineer.com/question.md?key=semester_5%2Fsoftware_engineering%3Areal-time-os) — Software Engineering, chapter 4
- [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
