Skip to content

ACtE0405 Real-time operating and control system

Operating-system basics

An operating system manages hardware resources and provides services such as scheduling, memory management, file/device access, and abstraction for applications.

In embedded systems, the OS may be:

  • absent (bare metal);
  • lightweight scheduler;
  • full RTOS;
  • general-purpose OS variant.

Task, process, and thread

Term Core meaning
Task schedulable unit of work; often RTOS term
Process executing program with its own protected address space/resources in many OSes
Thread execution path within a process sharing process resources

Validity condition:

  • RTOS literature may use "task" roughly where desktop OS literature uses "thread"; the exam usually tests conceptual separation, not one vendor's terminology.

Multiprocessing and multitasking

Term Recognition
Multiprocessing more than one processor/core executes tasks truly in parallel
Multitasking one CPU or several CPUs handle multiple tasks by scheduling/time sharing

Multitasking can exist on a single-core system through context switching.

Task scheduling

Scheduling categories:

Basis Types
Dispatch control preemptive, cooperative
Priority policy fixed-priority, dynamic-priority
Timing objective rate-monotonic, EDF, round-robin, FCFS

Recognition cues:

  • preemptive scheduler can interrupt a running lower-priority task;
  • cooperative scheduler relies on tasks yielding;
  • RTOS scheduling cares about deadline satisfaction and predictability.

Task synchronization and concurrency

Concurrency hazards:

  • race condition;
  • deadlock;
  • priority inversion;
  • starvation.

Common primitives:

Primitive Purpose
Mutex mutual exclusion
Semaphore counting or signaling
Event flag event notification
Message queue synchronized communication
Barrier group synchronization

Priority inversion cue:

  • high-priority task waits on resource held by low-priority task while medium-priority task runs;
  • inheritance or ceiling protocols can mitigate it.

Device drivers

Device driver = software layer that controls a hardware peripheral and presents a usable interface to upper layers.

Driver roles:

  • initialization/configuration;
  • interrupt handling;
  • data movement;
  • buffering;
  • error/status reporting.

Open-loop and closed-loop control systems

Type Feedback? Recognition
Open-loop no output not measured to correct action
Closed-loop yes feedback used to reduce error

Examples:

  • open-loop: fixed-time toaster, simple traffic light timer;
  • closed-loop: thermostat, motor speed control with sensor feedback.

Control cue:

  • closed-loop improves disturbance rejection and accuracy but adds sensing, computation, and possible stability concerns.

Real-time validity conditions

  • Hard real-time: missing a deadline is unacceptable/system failure level.
  • Soft real-time: occasional misses degrade quality but are not catastrophic.
  • Determinism matters: worst-case response can be more important than average response.

RTOS-control revision box

  • Task/process/thread are related but not identical terms.
  • Multitasking does not require multiple processors.
  • Preemptive scheduling improves responsiveness but needs safe synchronization.
  • Mutexes and semaphores solve different coordination patterns.
  • Closed-loop control uses feedback; open-loop does not.
  • Real-time quality is about deadlines and predictability.