Real-Time Operating Systems Heechul Yun 1 What is an OS? 2 - - PowerPoint PPT Presentation

real time operating systems
SMART_READER_LITE
LIVE PREVIEW

Real-Time Operating Systems Heechul Yun 1 What is an OS? 2 - - PowerPoint PPT Presentation

Real-Time Operating Systems Heechul Yun 1 What is an OS? 2 Operating Systems A program that acts as an intermediary between users and the computer hardware Applications Operating System Computer Hardware 3 Common OS Services Task


slide-1
SLIDE 1

Real-Time Operating Systems

Heechul Yun

1

slide-2
SLIDE 2

What is an OS?

2

slide-3
SLIDE 3

Operating Systems

  • A program that acts as an intermediary

between users and the computer hardware

3

Applications Operating System Computer Hardware

slide-4
SLIDE 4

Common OS Services

  • Task (process) management
  • Inter process communication (IPC)
  • Virtual memory
  • Demand paging
  • Filesystem
  • Hardware interface and I/O handling
  • Protection, error handling, security

4

slide-5
SLIDE 5

Real-Time Operating System

  • OS for real-time systems
  • Real-time systems

– correctness depends on not only logical correctness but also temporal one.

  • Common requirements

– Bounded interrupt latency – Bounded scheduling latency – Bounded WCETs of system-calls – Support for real-time scheduling policies

5

slide-6
SLIDE 6

RTOS

  • Commercial

– VxWorks – QNX – Nucleus – ..

  • Free

– FreeRTOS – NuttX – ...

6

slide-7
SLIDE 7

Common RTOS Services

  • Task (process) management
  • Inter process communication (IPC)
  • Virtual memory (▲)
  • Demand paging (X)
  • Filesystem
  • Hardware interface and I/O handling
  • Protection, error handling, security

7

slide-8
SLIDE 8

RTOS with Partitioning

  • RTOS with time and space partitioning

– E.g., VxWorks 653, Integrity-178

  • Time partitioning

– A partition’s access time to a shared resource (e.g., CPU) must be guaranteed regardless of others

  • Space partitioning

– A partition’s memory cannot be corrupted by other partitions

8

slide-9
SLIDE 9

VxWorks 653

9

slide-10
SLIDE 10

Integrity-178

10

slide-11
SLIDE 11

Linux as RTOS

  • Mainline Linux

– Pretty good real-time support these days – RT schedulers: SCHED_FIFO, RR, DEADLINE – Memory locking and other techniques

  • Problems

– Kernel used to be non-preemptible (not anymore) – Still suffer long interrupt/scheduling latencies – Due to many long non-preemptible code sections

11

slide-12
SLIDE 12

Linux-RT (PREEMPT-RT patchset)

  • Reduce non-preemptible code sections in

various kernel code paths

– Preemptible spin-locks (rtmutexes) – Interrupts are handled by kernel threads (preemptible)

12

slide-13
SLIDE 13

Scheduling Latency Comparison

  • w/o vs. w/ PREEMPT_RT patch
  • I/O heavy background tasks

13 (*) Figure source: A Comparison of Scheduling Latency in Linux, PREEMPT RT, and LITMUS-RT, OSPERT 2013

slide-14
SLIDE 14

Dual-Kernel Approach

  • Linux runs on top of an RTOS

– RTLinux – RTAI – Xenomai – L4/Linux

14

slide-15
SLIDE 15

This Week

  • SCHEDULING AND LOCKING IN MULTIPROCESSOR

REAL-TIME OPERATING SYSTEMS. Chapter 3.3. The Design and Implementation of LITMUSRT. Bj¨orn B. Brandenburg, PhD Thesis, 2011

– LITMUS-RT

  • GPUSync: A Framework for Real-Time GPU

Management, RTAS’13

  • Real-Time Multi-Core Virtual Machine Scheduling in

Xen, EMSOFT'14

15