Real-Time Systems: Understanding Predictability and Performance, Slides of Microcontrollers

An introduction to real-time systems, explaining their definition, distinguishing features from embedded systems, and various classifications. Real-time systems ensure predictable and timely responses, with examples including cruise control and manufacturing systems. The document also covers terminology, misconceptions, static vs. Dynamic systems, operating systems, and real-time operating systems.

Typology: Slides

2012/2013

Uploaded on 04/24/2013

ballari
ballari 🇮🇳

4.6

(10)

117 documents

1 / 22

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Introduction to
Real-Time Systems
Docsity.com
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16

Partial preview of the text

Download Real-Time Systems: Understanding Predictability and Performance and more Slides Microcontrollers in PDF only on Docsity!

Introduction to

Real-Time Systems

Real Time System

  • “A real time computer system is one in which the correctness of the system behavior depends not only on the logical results of the computation, but also on the physical instant at which these results are produced.” –Kopetz
  • Not necessarily fast, but definitely predictable

Non–RTS

  • Utility value remains constant
    • “Utility” is some measurement of value of the computation

Soft RTS

  • Decreasing Utility value after deadline

Example: Cruise Control

  • Regulates speed of car by adjusting the throttle: driver sets a speed and car maintains it.
  • Measures speed through device connected to drive shaft.
  • Hard real-time: drive shaft revolution events.
  • Soft real-time: driver inputs, throttle adjustments.

Example: Manufacturing

Terminology

  • System : black box with n inputs and m outputs
  • Response time: time between presentation of a set of inputs and the appearance of the corresponding outputs
  • Utilization : measure of „useful‟ work a system performs
  • Events : Change of state causing a change of flow-of-control of a computer program

Classification of RT Systems

  • synchronous : events occur at predictable times in the flow-of-control.
  • asynchronous : interrupts.
  • state-based vs. event-based :
    • plane wing is at an angle of 32º (state)
    • plane wing moved up 4º (event)
  • deterministic system : for each possible state and each set of inputs, a unique set of outputs and next state of the system can be determined.

Static vs. Dynamic RT Systems

  • In a Static System , the environment and workload is assumed to be constant (or at least close) - Approach: Prove at design-time that your system meets required timings
  • In a Dynamic System , where the environment may change, we aren‟t so lucky - Approach: Prove at design-time that your system will meet required timings given certain environmental assumptions - Reliability is the measure of how sure we are that correct operation will happen - Usually a probability

Operating Systems

  • Real-Time OS : VxWorks, QNX, LynxOS, etc.
  • GPOS : no support for real-time applications, focus on „fairness‟.
    • BUT, people love GPOSs, e.g., Linux:
      • RTLinux(WindRiver)
      • KURT (Kansas U.)
      • Linux/RT (TimeSys)

RT OS Sampler

  • LynxOS
    • Microkernel Architecture
    • Provides scheduling, interrupt, and synchronization support
    • Real-Time POSIX support
    • Easy transition from Linux
  • VxWorks
    • Monolithic Kernel
      • Reduced run-time overhead, but increased kernel size compared to Microkernel designs
    • Supports Real-Time POSIX standards
    • Common in industry
      • Mars missions
      • Honda ASIMO robot
      • Switches
      • MRI scanners
      • Car engine control systems

RT Linux

  • “Workaround”on top of a generic O/S
    • Generic O/S – optimizes average case scenario
    • RTOS – need to consider WORST CASE scenarios to ensure deadlines are met
  • Dual-kernel approach
    • Makes Linux a low-priority pre-emptable thread running on a separate RTLinux kernel
    • Tradeoff between determinism of pure real-time O/S and flexibility of conventional O/S
  • Periodic tasks only
    • (still true?)

Real-Time Scheduling

  • Schedulers: compile-time or run-time
  • Systems: uniprocessor, multiprocessor
  • We can characterize a task with a few parameters:

c computation time s start (release or ready) time d deadline (relative to start time) p period or minimum separation

Preemptive vs. Not

  • Preemptive Scheduling
    • Task execution is preempted and resumed later.
    • Preemption takes place to execute a higher priority task.
    • Offers higher schedulability.
    • Involves higher scheduling overhead due to context switching.
  • Non-preemptive Scheduling
    • Once a task is started executing, it completes its execution.
    • Offers lower schedulability.
    • Has less scheduling overhead because of less context switching