real-time soultion

16
Real-time solution in Linux DMP Electronics Inc. intern 陳伯綸

Upload: nylon

Post on 05-Dec-2014

456 views

Category:

Technology


0 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Real-time soultion

Real-time solution in

Linux DMP Electronics Inc.

intern 陳伯綸

Page 2: Real-time soultion

Real-time?

Real-time might, as the name implies, sometimes also be about timeliness (fast), but in my humble opinion it's usually about determinism.

To be precise about event- and temporal determinism (event determinism meaning that you know the state of the outputs with a given set of inputs; temporal determinism meaning that you also know exactly the timing).

Coming back to real-time versus real fast - In case of an aircraft navigation system deadlines are in the tens of milliseconds, while for an airline reservation system the deadlines are at about 15 seconds.

The latter must be deterministic just like the former one, but does not need to be so fast.

After thirty years of research there is still no universal methodology to create real-time systems and that's why in real life real-time is defined as follows:”A real-time system will pass a specified test suite.[2]” Let's stick to those wise words of Paul E. McKenny for the time being.

From Getting real (time) about embedded GNU/Linux

Page 3: Real-time soultion

Real-time Operating System

RTAI

Xenomai

Page 4: Real-time soultion

Linux Kernel latency component

Page 5: Real-time soultion

Solution • Dual kernel (Linux Realtime extensions )

o RTLinux

o RTAI

o Xenomai

• PREEMPT_RT kernel

Page 6: Real-time soultion

Dual kernel

Linux Kernel idle task

RT task RT task

RT kernel

task task task

Page 7: Real-time soultion

RTLinux • First real-time extension for Linux

• It was developed by Victor Yodaiken, Michael

Barabanov, Cort Dougan and others at the New

Mexico Institute of Mining and Technology

• patent covering: o US-Patents 5,995,74 owned by FSMlabs

Page 8: Real-time soultion

ADEOS

Page 9: Real-time soultion

RTAI & Xenomai • The Xenomai project was launched in August 2001. In 2003 it merged with the

Real-Time Application Interface (RTAI) project to produce a production-grade

real-time free software platform for GNU/Linux called RTAI/fusion, on top of

Xenomai's abstract real-time operating system (RTOS) core. Eventually, the

RTAI/fusion effort became independent from RTAI in 2005 as the Xenomai

project

• RTAI o Like Linux itself the RTAI software is a community effort.

o Only really actively maintained on x86

o May offer slightly better latencies than Xenomai

• Xenomai o Initial goals: facilitate the porting of programs to GNU / Linux.

o Any number of RTOS personalities called “skins” can then be built over the

nucleus, providing their own specific interface to the applications, by

using the services of a single generic core to implement it

Page 10: Real-time soultion

RTAI vs Xenomai

Linux Xenomai

ADEOS

Hardware

Linux

Hardware

RTAI

ADEOS

Page 11: Real-time soultion

Linux kernel

Page 12: Real-time soultion

Linux kernel

Page 13: Real-time soultion

Linux kernel

User

Kernel

No context switch Set flag

context switch

Page 14: Real-time soultion

PREEMPT_RT kernel

User

Kernel

context switch

context switch

Page 15: Real-time soultion

Reference • Getting real (time) about embedded GNU/Linux

http://www.embedded.com/design/embedded/4204740/Getting-real--time--about-embedded-GNU-Linux

http://blog.linux.org.tw/~jserv/archives/2011/02/_realtime_gnuli.html

• Embedded Linux system development course

http://free-electrons.com/doc/training/embedded-linux/slides.pdf

• RT nanokernel for Embedded Linux

http://people.debian.org.tw/~jserv/RT-nanokernel.pdf • 共同筆記 - 作業系統設計與實做

http://cs001.cs.ccu.edu.tw/wiki/%E9%A6%96%E9%A0%81

• RTAI - Real Time Application Interface Official Website

https://www.rtai.org/

• Xenomai: Real-Time Framework for Linux

http://www.xenomai.org/

Page 16: Real-time soultion

Thanks for your listening