SlideShare a Scribd company logo
Presented by:
Steven Rostedt
srostedt@redhat.com
Real Time Linux
Who Needs It?
(Not you!)
What is Real Time?
● Real Time Delivery?
● Real Time Video?
● Real Time Clock?
● Real Time Operating System?
● Real Time Presentation Language
Translation?
● Real Time Presentation Stop Clock
What is Real Time?
● Real Time Delivery?
● Real Time Video?
● Real Time Clock?
● Real Time Operating System?
● Real Time Presentation Language
Translation?
● Real Time Presentation Stop Clock
What is a Real Time
Operating System?
● Faster? NO!
● Real Time does not mean “fast”!
● What does an RTOS give us?
– Determinism
– Determinism
– Determinism
What does being
Deterministic give us?
● Repeatability
● Reliable Results
● Known Worse Case Scenarios
● Known Reaction Times
Real Time (Hard vs Soft)
● Hard Real Time
– Mathematically provable
● More code, much harder to prove
– Bounded Latency
● Soft Real Time
– Can deal with outliers
– Tries to be reliable
May have unbounded latency
Hard Real Time Examples
● Airplane engine controls
● Nuclear power plants
● Mars Lander
● Space Shuttle
Soft Real Time Examples
● Video systems
● Video games
● Some communication systems
Vanilla Linux is a Soft Real Time System!
Real Time Linux
(PREEMPT_RT)
● Is it a Soft Real Time system?
– Does not allow for outliers
– Does not allow for unbounded latency
● Is it a “Hard Real Time” system?
– Too big to be mathematically proven
● What is PREEMPT_RT then?
– Hard Real Time “Designed”!
Real Time Linux
(PREEMPT_RT)
● Can not be mathematically proven
– It is just too darn big
● (people are trying though!)
● Tries to bound all latency
– Unexpected latency are considered bugs
● The design follows that of any hard real
time operating system.
Who uses PREEMPT_RT?
● Financial industries (NASDAQ)
● Audio recordings
– A latency causes a “scratching” sound
● Navigational systems (TomTom / Garmin)
● Can not fail...
– but nobody dies if it does (hopefully)
What PREEMPT_RT gave to
current Linux
● High resolution timers
● Generic interrupt design
● Preemptible RCU locks
● Real Time scheduler
● EDF scheduler (SCHED_DEADLINE)
● Threaded interrupts
● Priority inheritance futexes
● Lockdep
● Ftrace - The Linux kernel tracer
What is left?
● Spin locks to sleeping mutexes
– Interrupts do not need to be disabled
– Helps against reaction time latency
● task wakes up, timer response, etc
● Priority inheritance on kernel locks
– Helps against “unbounded priority
inversion”
What is latency?
● The time between when an event is
expected to happen, to the time it actually
happens
● Causes of latency?
– Interrupts being disabled
– Current interrupt executing
– Shared resources and locking
Interrupts
Interrupts disabled
Interrupt Inversion
Threaded Interrupts
Interrupt Threads
# ps ax |grep irq
root 52 0.0 0.0 0 0 ? S 19:15 0:00 [irq/9-acpi]
root 68 0.0 0.0 0 0 ? S 19:15 0:00 [irq/24-pciehp]
root 69 0.0 0.0 0 0 ? S 19:15 0:00 [irq/25-pciehp]
root 72 0.2 0.0 0 0 ? S 19:15 0:26 [irq/14-ata_piix]
root 73 0.0 0.0 0 0 ? S 19:15 0:00 [irq/15-ata_piix]
root 79 0.0 0.0 0 0 ? S 19:15 0:00 [irq/19-ata_piix]
root 86 0.0 0.0 0 0 ? S 19:15 0:00 [irq/18-ata_gene]
root 93 0.0 0.0 0 0 ? S 19:15 0:00 [irq/19-ehci_hcd]
root 94 0.0 0.0 0 0 ? S 19:15 0:00 [irq/23-ehci_hcd]
root 95 0.0 0.0 0 0 ? S 19:15 0:00 [irq/16-uhci_hcd]
root 96 1.1 0.0 0 0 ? S 19:15 2:13 [irq/21-uhci_hcd]
root 97 0.0 0.0 0 0 ? S 19:15 0:00 [irq/18-uhci_hcd]
root 99 0.0 0.0 0 0 ? S 19:15 0:00 [irq/23-uhci_hcd]
root 100 0.0 0.0 0 0 ? S 19:15 0:00 [irq/19-uhci_hcd]
root 102 0.0 0.0 0 0 ? S 19:15 0:00 [irq/16-uhci_hcd]
root 104 0.0 0.0 0 0 ? S 19:15 0:00 [irq/12-i8042]
root 105 0.0 0.0 0 0 ? S 19:15 0:00 [irq/1-i8042]
root 108 0.0 0.0 0 0 ? S 19:15 0:00 [irq/8-rtc0]
root 114 0.0 0.0 0 0 ? S 19:15 0:00 [irq/4-serial]
root 315 0.0 0.0 0 0 ? S 19:15 0:00 [irq/27-i915]
root 698 0.0 0.0 0 0 ? S 19:15 0:00 [irq/6-floppy]
root 1676 0.0 0.0 0 0 ? S 19:15 0:00 [irq/18-i801_smb]
root 2012 0.0 0.0 0 0 ? S 19:15 0:00 [irq/28-snd_hda_]
Latency
● Latency always happens
– Events are never instantaneous
● Priority Inversion
– When something runs when something else should
be
– Always happens too
● Bounded Priority Inversion
– We know the worse case
● Unbounded Priority Inversion
– No idea when it will finish
Unbounded Priority Inversion
Bounded Priority Inversion
(using Priority Inheritance)
Hardware does matter!
● Cache and TLB misses
● SMI
– System Monster^WManagement Interrupt
● The hardware must also be deterministic
– (Stay tuned, same Bat Channel)
Questions?

More Related Content

Similar to Kernel Recipes 2016 - Wo needs a real-time operating system (not you!)

Embedded Recipes 2019 - RT is about to make it to mainline. Now what?
Embedded Recipes 2019 - RT is about to make it to mainline. Now what?Embedded Recipes 2019 - RT is about to make it to mainline. Now what?
Embedded Recipes 2019 - RT is about to make it to mainline. Now what?
Anne Nicolas
 
Embedded Recipes 2018 - Finding sources of Latency In your system - Steven Ro...
Embedded Recipes 2018 - Finding sources of Latency In your system - Steven Ro...Embedded Recipes 2018 - Finding sources of Latency In your system - Steven Ro...
Embedded Recipes 2018 - Finding sources of Latency In your system - Steven Ro...
Anne Nicolas
 
My talk at Linux Piter 2015
My talk at Linux Piter 2015My talk at Linux Piter 2015
My talk at Linux Piter 2015
Alex Chistyakov
 
PART-1 : Mastering RTOS FreeRTOS and STM32Fx with Debugging
PART-1 : Mastering RTOS FreeRTOS and STM32Fx with DebuggingPART-1 : Mastering RTOS FreeRTOS and STM32Fx with Debugging
PART-1 : Mastering RTOS FreeRTOS and STM32Fx with Debugging
FastBit Embedded Brain Academy
 
PPT.pdf
PPT.pdfPPT.pdf
Bits of Advice for the VM Writer, by Cliff Click @ Curry On 2015
Bits of Advice for the VM Writer, by Cliff Click @ Curry On 2015Bits of Advice for the VM Writer, by Cliff Click @ Curry On 2015
Bits of Advice for the VM Writer, by Cliff Click @ Curry On 2015
curryon
 
D1 t1 t. yunusov k. nesterov - bootkit via sms
D1 t1   t. yunusov k. nesterov - bootkit via smsD1 t1   t. yunusov k. nesterov - bootkit via sms
D1 t1 t. yunusov k. nesterov - bootkit via sms
qqlan
 
Linux Preempt-RT Internals
Linux Preempt-RT InternalsLinux Preempt-RT Internals
Linux Preempt-RT Internals
哲豪 康哲豪
 
Boost UDP Transaction Performance
Boost UDP Transaction PerformanceBoost UDP Transaction Performance
Boost UDP Transaction Performance
LF Events
 
PL-4049, Cache Coherence for GPU Architectures, by Arvindh Shriraman and Tor ...
PL-4049, Cache Coherence for GPU Architectures, by Arvindh Shriraman and Tor ...PL-4049, Cache Coherence for GPU Architectures, by Arvindh Shriraman and Tor ...
PL-4049, Cache Coherence for GPU Architectures, by Arvindh Shriraman and Tor ...
AMD Developer Central
 
Presentation
PresentationPresentation
Presentation
Aanchal Batra
 
FOSDEM 2021 - Infrastructure as Code Drift & Driftctl
FOSDEM 2021 - Infrastructure as Code Drift & DriftctlFOSDEM 2021 - Infrastructure as Code Drift & Driftctl
FOSDEM 2021 - Infrastructure as Code Drift & Driftctl
Stephane Jourdan
 
Resource Management in (Embedded) Real-Time Systems
Resource Management in (Embedded) Real-Time SystemsResource Management in (Embedded) Real-Time Systems
Resource Management in (Embedded) Real-Time Systems
jeronimored
 
Micro-controllers (PIC) based Application Development
Micro-controllers (PIC) based Application DevelopmentMicro-controllers (PIC) based Application Development
Micro-controllers (PIC) based Application Development
Emertxe Information Technologies Pvt Ltd
 
WebRTC: Mostly Video Bits
WebRTC: Mostly Video BitsWebRTC: Mostly Video Bits
WebRTC: Mostly Video Bits
SeanDuBois3
 
All Your IOPS Are Belong To Us - A Pinteresting Case Study in MySQL Performan...
All Your IOPS Are Belong To Us - A Pinteresting Case Study in MySQL Performan...All Your IOPS Are Belong To Us - A Pinteresting Case Study in MySQL Performan...
All Your IOPS Are Belong To Us - A Pinteresting Case Study in MySQL Performan...
Ernie Souhrada
 
rtosbyshibu-131026100746-phpapp01.pdf
rtosbyshibu-131026100746-phpapp01.pdfrtosbyshibu-131026100746-phpapp01.pdf
rtosbyshibu-131026100746-phpapp01.pdf
reemasajin1
 
Real timedata
Real timedataReal timedata
Kernel Recipes 2018 - KernelShark 1.0; What's new and what's coming - Steven ...
Kernel Recipes 2018 - KernelShark 1.0; What's new and what's coming - Steven ...Kernel Recipes 2018 - KernelShark 1.0; What's new and what's coming - Steven ...
Kernel Recipes 2018 - KernelShark 1.0; What's new and what's coming - Steven ...
Anne Nicolas
 
44CON 2014 - Simple Hardware Sidechannel Attacks for 10 GBP or Less, Joe Fitz...
44CON 2014 - Simple Hardware Sidechannel Attacks for 10 GBP or Less, Joe Fitz...44CON 2014 - Simple Hardware Sidechannel Attacks for 10 GBP or Less, Joe Fitz...
44CON 2014 - Simple Hardware Sidechannel Attacks for 10 GBP or Less, Joe Fitz...
44CON
 

Similar to Kernel Recipes 2016 - Wo needs a real-time operating system (not you!) (20)

Embedded Recipes 2019 - RT is about to make it to mainline. Now what?
Embedded Recipes 2019 - RT is about to make it to mainline. Now what?Embedded Recipes 2019 - RT is about to make it to mainline. Now what?
Embedded Recipes 2019 - RT is about to make it to mainline. Now what?
 
Embedded Recipes 2018 - Finding sources of Latency In your system - Steven Ro...
Embedded Recipes 2018 - Finding sources of Latency In your system - Steven Ro...Embedded Recipes 2018 - Finding sources of Latency In your system - Steven Ro...
Embedded Recipes 2018 - Finding sources of Latency In your system - Steven Ro...
 
My talk at Linux Piter 2015
My talk at Linux Piter 2015My talk at Linux Piter 2015
My talk at Linux Piter 2015
 
PART-1 : Mastering RTOS FreeRTOS and STM32Fx with Debugging
PART-1 : Mastering RTOS FreeRTOS and STM32Fx with DebuggingPART-1 : Mastering RTOS FreeRTOS and STM32Fx with Debugging
PART-1 : Mastering RTOS FreeRTOS and STM32Fx with Debugging
 
PPT.pdf
PPT.pdfPPT.pdf
PPT.pdf
 
Bits of Advice for the VM Writer, by Cliff Click @ Curry On 2015
Bits of Advice for the VM Writer, by Cliff Click @ Curry On 2015Bits of Advice for the VM Writer, by Cliff Click @ Curry On 2015
Bits of Advice for the VM Writer, by Cliff Click @ Curry On 2015
 
D1 t1 t. yunusov k. nesterov - bootkit via sms
D1 t1   t. yunusov k. nesterov - bootkit via smsD1 t1   t. yunusov k. nesterov - bootkit via sms
D1 t1 t. yunusov k. nesterov - bootkit via sms
 
Linux Preempt-RT Internals
Linux Preempt-RT InternalsLinux Preempt-RT Internals
Linux Preempt-RT Internals
 
Boost UDP Transaction Performance
Boost UDP Transaction PerformanceBoost UDP Transaction Performance
Boost UDP Transaction Performance
 
PL-4049, Cache Coherence for GPU Architectures, by Arvindh Shriraman and Tor ...
PL-4049, Cache Coherence for GPU Architectures, by Arvindh Shriraman and Tor ...PL-4049, Cache Coherence for GPU Architectures, by Arvindh Shriraman and Tor ...
PL-4049, Cache Coherence for GPU Architectures, by Arvindh Shriraman and Tor ...
 
Presentation
PresentationPresentation
Presentation
 
FOSDEM 2021 - Infrastructure as Code Drift & Driftctl
FOSDEM 2021 - Infrastructure as Code Drift & DriftctlFOSDEM 2021 - Infrastructure as Code Drift & Driftctl
FOSDEM 2021 - Infrastructure as Code Drift & Driftctl
 
Resource Management in (Embedded) Real-Time Systems
Resource Management in (Embedded) Real-Time SystemsResource Management in (Embedded) Real-Time Systems
Resource Management in (Embedded) Real-Time Systems
 
Micro-controllers (PIC) based Application Development
Micro-controllers (PIC) based Application DevelopmentMicro-controllers (PIC) based Application Development
Micro-controllers (PIC) based Application Development
 
WebRTC: Mostly Video Bits
WebRTC: Mostly Video BitsWebRTC: Mostly Video Bits
WebRTC: Mostly Video Bits
 
All Your IOPS Are Belong To Us - A Pinteresting Case Study in MySQL Performan...
All Your IOPS Are Belong To Us - A Pinteresting Case Study in MySQL Performan...All Your IOPS Are Belong To Us - A Pinteresting Case Study in MySQL Performan...
All Your IOPS Are Belong To Us - A Pinteresting Case Study in MySQL Performan...
 
rtosbyshibu-131026100746-phpapp01.pdf
rtosbyshibu-131026100746-phpapp01.pdfrtosbyshibu-131026100746-phpapp01.pdf
rtosbyshibu-131026100746-phpapp01.pdf
 
Real timedata
Real timedataReal timedata
Real timedata
 
Kernel Recipes 2018 - KernelShark 1.0; What's new and what's coming - Steven ...
Kernel Recipes 2018 - KernelShark 1.0; What's new and what's coming - Steven ...Kernel Recipes 2018 - KernelShark 1.0; What's new and what's coming - Steven ...
Kernel Recipes 2018 - KernelShark 1.0; What's new and what's coming - Steven ...
 
44CON 2014 - Simple Hardware Sidechannel Attacks for 10 GBP or Less, Joe Fitz...
44CON 2014 - Simple Hardware Sidechannel Attacks for 10 GBP or Less, Joe Fitz...44CON 2014 - Simple Hardware Sidechannel Attacks for 10 GBP or Less, Joe Fitz...
44CON 2014 - Simple Hardware Sidechannel Attacks for 10 GBP or Less, Joe Fitz...
 

More from Anne Nicolas

Kernel Recipes 2019 - Driving the industry toward upstream first
Kernel Recipes 2019 - Driving the industry toward upstream firstKernel Recipes 2019 - Driving the industry toward upstream first
Kernel Recipes 2019 - Driving the industry toward upstream first
Anne Nicolas
 
Kernel Recipes 2019 - No NMI? No Problem! – Implementing Arm64 Pseudo-NMI
Kernel Recipes 2019 - No NMI? No Problem! – Implementing Arm64 Pseudo-NMIKernel Recipes 2019 - No NMI? No Problem! – Implementing Arm64 Pseudo-NMI
Kernel Recipes 2019 - No NMI? No Problem! – Implementing Arm64 Pseudo-NMI
Anne Nicolas
 
Kernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernel
Kernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernelKernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernel
Kernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernel
Anne Nicolas
 
Kernel Recipes 2019 - Metrics are money
Kernel Recipes 2019 - Metrics are moneyKernel Recipes 2019 - Metrics are money
Kernel Recipes 2019 - Metrics are money
Anne Nicolas
 
Kernel Recipes 2019 - Kernel documentation: past, present, and future
Kernel Recipes 2019 - Kernel documentation: past, present, and futureKernel Recipes 2019 - Kernel documentation: past, present, and future
Kernel Recipes 2019 - Kernel documentation: past, present, and future
Anne Nicolas
 
Embedded Recipes 2019 - Knowing your ARM from your ARSE: wading through the t...
Embedded Recipes 2019 - Knowing your ARM from your ARSE: wading through the t...Embedded Recipes 2019 - Knowing your ARM from your ARSE: wading through the t...
Embedded Recipes 2019 - Knowing your ARM from your ARSE: wading through the t...
Anne Nicolas
 
Kernel Recipes 2019 - GNU poke, an extensible editor for structured binary data
Kernel Recipes 2019 - GNU poke, an extensible editor for structured binary dataKernel Recipes 2019 - GNU poke, an extensible editor for structured binary data
Kernel Recipes 2019 - GNU poke, an extensible editor for structured binary data
Anne Nicolas
 
Kernel Recipes 2019 - Analyzing changes to the binary interface exposed by th...
Kernel Recipes 2019 - Analyzing changes to the binary interface exposed by th...Kernel Recipes 2019 - Analyzing changes to the binary interface exposed by th...
Kernel Recipes 2019 - Analyzing changes to the binary interface exposed by th...
Anne Nicolas
 
Embedded Recipes 2019 - Remote update adventures with RAUC, Yocto and Barebox
Embedded Recipes 2019 - Remote update adventures with RAUC, Yocto and BareboxEmbedded Recipes 2019 - Remote update adventures with RAUC, Yocto and Barebox
Embedded Recipes 2019 - Remote update adventures with RAUC, Yocto and Barebox
Anne Nicolas
 
Embedded Recipes 2019 - Making embedded graphics less special
Embedded Recipes 2019 - Making embedded graphics less specialEmbedded Recipes 2019 - Making embedded graphics less special
Embedded Recipes 2019 - Making embedded graphics less special
Anne Nicolas
 
Embedded Recipes 2019 - Linux on Open Source Hardware and Libre Silicon
Embedded Recipes 2019 - Linux on Open Source Hardware and Libre SiliconEmbedded Recipes 2019 - Linux on Open Source Hardware and Libre Silicon
Embedded Recipes 2019 - Linux on Open Source Hardware and Libre Silicon
Anne Nicolas
 
Embedded Recipes 2019 - From maintaining I2C to the big (embedded) picture
Embedded Recipes 2019 - From maintaining I2C to the big (embedded) pictureEmbedded Recipes 2019 - From maintaining I2C to the big (embedded) picture
Embedded Recipes 2019 - From maintaining I2C to the big (embedded) picture
Anne Nicolas
 
Embedded Recipes 2019 - Testing firmware the devops way
Embedded Recipes 2019 - Testing firmware the devops wayEmbedded Recipes 2019 - Testing firmware the devops way
Embedded Recipes 2019 - Testing firmware the devops way
Anne Nicolas
 
Embedded Recipes 2019 - Herd your socs become a matchmaker
Embedded Recipes 2019 - Herd your socs become a matchmakerEmbedded Recipes 2019 - Herd your socs become a matchmaker
Embedded Recipes 2019 - Herd your socs become a matchmaker
Anne Nicolas
 
Embedded Recipes 2019 - LLVM / Clang integration
Embedded Recipes 2019 - LLVM / Clang integrationEmbedded Recipes 2019 - LLVM / Clang integration
Embedded Recipes 2019 - LLVM / Clang integration
Anne Nicolas
 
Embedded Recipes 2019 - Introduction to JTAG debugging
Embedded Recipes 2019 - Introduction to JTAG debuggingEmbedded Recipes 2019 - Introduction to JTAG debugging
Embedded Recipes 2019 - Introduction to JTAG debugging
Anne Nicolas
 
Embedded Recipes 2019 - Pipewire a new foundation for embedded multimedia
Embedded Recipes 2019 - Pipewire a new foundation for embedded multimediaEmbedded Recipes 2019 - Pipewire a new foundation for embedded multimedia
Embedded Recipes 2019 - Pipewire a new foundation for embedded multimedia
Anne Nicolas
 
Kernel Recipes 2019 - ftrace: Where modifying a running kernel all started
Kernel Recipes 2019 - ftrace: Where modifying a running kernel all startedKernel Recipes 2019 - ftrace: Where modifying a running kernel all started
Kernel Recipes 2019 - ftrace: Where modifying a running kernel all started
Anne Nicolas
 
Kernel Recipes 2019 - Suricata and XDP
Kernel Recipes 2019 - Suricata and XDPKernel Recipes 2019 - Suricata and XDP
Kernel Recipes 2019 - Suricata and XDP
Anne Nicolas
 
Kernel Recipes 2019 - Marvels of Memory Auto-configuration (SPD)
Kernel Recipes 2019 - Marvels of Memory Auto-configuration (SPD)Kernel Recipes 2019 - Marvels of Memory Auto-configuration (SPD)
Kernel Recipes 2019 - Marvels of Memory Auto-configuration (SPD)
Anne Nicolas
 

More from Anne Nicolas (20)

Kernel Recipes 2019 - Driving the industry toward upstream first
Kernel Recipes 2019 - Driving the industry toward upstream firstKernel Recipes 2019 - Driving the industry toward upstream first
Kernel Recipes 2019 - Driving the industry toward upstream first
 
Kernel Recipes 2019 - No NMI? No Problem! – Implementing Arm64 Pseudo-NMI
Kernel Recipes 2019 - No NMI? No Problem! – Implementing Arm64 Pseudo-NMIKernel Recipes 2019 - No NMI? No Problem! – Implementing Arm64 Pseudo-NMI
Kernel Recipes 2019 - No NMI? No Problem! – Implementing Arm64 Pseudo-NMI
 
Kernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernel
Kernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernelKernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernel
Kernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernel
 
Kernel Recipes 2019 - Metrics are money
Kernel Recipes 2019 - Metrics are moneyKernel Recipes 2019 - Metrics are money
Kernel Recipes 2019 - Metrics are money
 
Kernel Recipes 2019 - Kernel documentation: past, present, and future
Kernel Recipes 2019 - Kernel documentation: past, present, and futureKernel Recipes 2019 - Kernel documentation: past, present, and future
Kernel Recipes 2019 - Kernel documentation: past, present, and future
 
Embedded Recipes 2019 - Knowing your ARM from your ARSE: wading through the t...
Embedded Recipes 2019 - Knowing your ARM from your ARSE: wading through the t...Embedded Recipes 2019 - Knowing your ARM from your ARSE: wading through the t...
Embedded Recipes 2019 - Knowing your ARM from your ARSE: wading through the t...
 
Kernel Recipes 2019 - GNU poke, an extensible editor for structured binary data
Kernel Recipes 2019 - GNU poke, an extensible editor for structured binary dataKernel Recipes 2019 - GNU poke, an extensible editor for structured binary data
Kernel Recipes 2019 - GNU poke, an extensible editor for structured binary data
 
Kernel Recipes 2019 - Analyzing changes to the binary interface exposed by th...
Kernel Recipes 2019 - Analyzing changes to the binary interface exposed by th...Kernel Recipes 2019 - Analyzing changes to the binary interface exposed by th...
Kernel Recipes 2019 - Analyzing changes to the binary interface exposed by th...
 
Embedded Recipes 2019 - Remote update adventures with RAUC, Yocto and Barebox
Embedded Recipes 2019 - Remote update adventures with RAUC, Yocto and BareboxEmbedded Recipes 2019 - Remote update adventures with RAUC, Yocto and Barebox
Embedded Recipes 2019 - Remote update adventures with RAUC, Yocto and Barebox
 
Embedded Recipes 2019 - Making embedded graphics less special
Embedded Recipes 2019 - Making embedded graphics less specialEmbedded Recipes 2019 - Making embedded graphics less special
Embedded Recipes 2019 - Making embedded graphics less special
 
Embedded Recipes 2019 - Linux on Open Source Hardware and Libre Silicon
Embedded Recipes 2019 - Linux on Open Source Hardware and Libre SiliconEmbedded Recipes 2019 - Linux on Open Source Hardware and Libre Silicon
Embedded Recipes 2019 - Linux on Open Source Hardware and Libre Silicon
 
Embedded Recipes 2019 - From maintaining I2C to the big (embedded) picture
Embedded Recipes 2019 - From maintaining I2C to the big (embedded) pictureEmbedded Recipes 2019 - From maintaining I2C to the big (embedded) picture
Embedded Recipes 2019 - From maintaining I2C to the big (embedded) picture
 
Embedded Recipes 2019 - Testing firmware the devops way
Embedded Recipes 2019 - Testing firmware the devops wayEmbedded Recipes 2019 - Testing firmware the devops way
Embedded Recipes 2019 - Testing firmware the devops way
 
Embedded Recipes 2019 - Herd your socs become a matchmaker
Embedded Recipes 2019 - Herd your socs become a matchmakerEmbedded Recipes 2019 - Herd your socs become a matchmaker
Embedded Recipes 2019 - Herd your socs become a matchmaker
 
Embedded Recipes 2019 - LLVM / Clang integration
Embedded Recipes 2019 - LLVM / Clang integrationEmbedded Recipes 2019 - LLVM / Clang integration
Embedded Recipes 2019 - LLVM / Clang integration
 
Embedded Recipes 2019 - Introduction to JTAG debugging
Embedded Recipes 2019 - Introduction to JTAG debuggingEmbedded Recipes 2019 - Introduction to JTAG debugging
Embedded Recipes 2019 - Introduction to JTAG debugging
 
Embedded Recipes 2019 - Pipewire a new foundation for embedded multimedia
Embedded Recipes 2019 - Pipewire a new foundation for embedded multimediaEmbedded Recipes 2019 - Pipewire a new foundation for embedded multimedia
Embedded Recipes 2019 - Pipewire a new foundation for embedded multimedia
 
Kernel Recipes 2019 - ftrace: Where modifying a running kernel all started
Kernel Recipes 2019 - ftrace: Where modifying a running kernel all startedKernel Recipes 2019 - ftrace: Where modifying a running kernel all started
Kernel Recipes 2019 - ftrace: Where modifying a running kernel all started
 
Kernel Recipes 2019 - Suricata and XDP
Kernel Recipes 2019 - Suricata and XDPKernel Recipes 2019 - Suricata and XDP
Kernel Recipes 2019 - Suricata and XDP
 
Kernel Recipes 2019 - Marvels of Memory Auto-configuration (SPD)
Kernel Recipes 2019 - Marvels of Memory Auto-configuration (SPD)Kernel Recipes 2019 - Marvels of Memory Auto-configuration (SPD)
Kernel Recipes 2019 - Marvels of Memory Auto-configuration (SPD)
 

Recently uploaded

2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
Georgi Kodinov
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Mind IT Systems
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Natan Silnitsky
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
Globus
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
kalichargn70th171
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
takuyayamamoto1800
 
RISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent EnterpriseRISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent Enterprise
Srikant77
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Globus
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
Philip Schwarz
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
Globus
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Globus
 
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdfEnhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Jay Das
 
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
Max Andersen
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Anthony Dahanne
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
Matt Welsh
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Globus
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Shahin Sheidaei
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
abdulrafaychaudhry
 

Recently uploaded (20)

2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
 
RISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent EnterpriseRISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent Enterprise
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
 
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdfEnhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
 
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBroker
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
 

Kernel Recipes 2016 - Wo needs a real-time operating system (not you!)

  • 1. Presented by: Steven Rostedt srostedt@redhat.com Real Time Linux Who Needs It? (Not you!)
  • 2. What is Real Time? ● Real Time Delivery? ● Real Time Video? ● Real Time Clock? ● Real Time Operating System? ● Real Time Presentation Language Translation? ● Real Time Presentation Stop Clock
  • 3. What is Real Time? ● Real Time Delivery? ● Real Time Video? ● Real Time Clock? ● Real Time Operating System? ● Real Time Presentation Language Translation? ● Real Time Presentation Stop Clock
  • 4. What is a Real Time Operating System? ● Faster? NO! ● Real Time does not mean “fast”! ● What does an RTOS give us? – Determinism – Determinism – Determinism
  • 5. What does being Deterministic give us? ● Repeatability ● Reliable Results ● Known Worse Case Scenarios ● Known Reaction Times
  • 6. Real Time (Hard vs Soft) ● Hard Real Time – Mathematically provable ● More code, much harder to prove – Bounded Latency ● Soft Real Time – Can deal with outliers – Tries to be reliable May have unbounded latency
  • 7. Hard Real Time Examples ● Airplane engine controls ● Nuclear power plants ● Mars Lander ● Space Shuttle
  • 8. Soft Real Time Examples ● Video systems ● Video games ● Some communication systems Vanilla Linux is a Soft Real Time System!
  • 9. Real Time Linux (PREEMPT_RT) ● Is it a Soft Real Time system? – Does not allow for outliers – Does not allow for unbounded latency ● Is it a “Hard Real Time” system? – Too big to be mathematically proven ● What is PREEMPT_RT then? – Hard Real Time “Designed”!
  • 10. Real Time Linux (PREEMPT_RT) ● Can not be mathematically proven – It is just too darn big ● (people are trying though!) ● Tries to bound all latency – Unexpected latency are considered bugs ● The design follows that of any hard real time operating system.
  • 11. Who uses PREEMPT_RT? ● Financial industries (NASDAQ) ● Audio recordings – A latency causes a “scratching” sound ● Navigational systems (TomTom / Garmin) ● Can not fail... – but nobody dies if it does (hopefully)
  • 12. What PREEMPT_RT gave to current Linux ● High resolution timers ● Generic interrupt design ● Preemptible RCU locks ● Real Time scheduler ● EDF scheduler (SCHED_DEADLINE) ● Threaded interrupts ● Priority inheritance futexes ● Lockdep ● Ftrace - The Linux kernel tracer
  • 13. What is left? ● Spin locks to sleeping mutexes – Interrupts do not need to be disabled – Helps against reaction time latency ● task wakes up, timer response, etc ● Priority inheritance on kernel locks – Helps against “unbounded priority inversion”
  • 14. What is latency? ● The time between when an event is expected to happen, to the time it actually happens ● Causes of latency? – Interrupts being disabled – Current interrupt executing – Shared resources and locking
  • 19. Interrupt Threads # ps ax |grep irq root 52 0.0 0.0 0 0 ? S 19:15 0:00 [irq/9-acpi] root 68 0.0 0.0 0 0 ? S 19:15 0:00 [irq/24-pciehp] root 69 0.0 0.0 0 0 ? S 19:15 0:00 [irq/25-pciehp] root 72 0.2 0.0 0 0 ? S 19:15 0:26 [irq/14-ata_piix] root 73 0.0 0.0 0 0 ? S 19:15 0:00 [irq/15-ata_piix] root 79 0.0 0.0 0 0 ? S 19:15 0:00 [irq/19-ata_piix] root 86 0.0 0.0 0 0 ? S 19:15 0:00 [irq/18-ata_gene] root 93 0.0 0.0 0 0 ? S 19:15 0:00 [irq/19-ehci_hcd] root 94 0.0 0.0 0 0 ? S 19:15 0:00 [irq/23-ehci_hcd] root 95 0.0 0.0 0 0 ? S 19:15 0:00 [irq/16-uhci_hcd] root 96 1.1 0.0 0 0 ? S 19:15 2:13 [irq/21-uhci_hcd] root 97 0.0 0.0 0 0 ? S 19:15 0:00 [irq/18-uhci_hcd] root 99 0.0 0.0 0 0 ? S 19:15 0:00 [irq/23-uhci_hcd] root 100 0.0 0.0 0 0 ? S 19:15 0:00 [irq/19-uhci_hcd] root 102 0.0 0.0 0 0 ? S 19:15 0:00 [irq/16-uhci_hcd] root 104 0.0 0.0 0 0 ? S 19:15 0:00 [irq/12-i8042] root 105 0.0 0.0 0 0 ? S 19:15 0:00 [irq/1-i8042] root 108 0.0 0.0 0 0 ? S 19:15 0:00 [irq/8-rtc0] root 114 0.0 0.0 0 0 ? S 19:15 0:00 [irq/4-serial] root 315 0.0 0.0 0 0 ? S 19:15 0:00 [irq/27-i915] root 698 0.0 0.0 0 0 ? S 19:15 0:00 [irq/6-floppy] root 1676 0.0 0.0 0 0 ? S 19:15 0:00 [irq/18-i801_smb] root 2012 0.0 0.0 0 0 ? S 19:15 0:00 [irq/28-snd_hda_]
  • 20. Latency ● Latency always happens – Events are never instantaneous ● Priority Inversion – When something runs when something else should be – Always happens too ● Bounded Priority Inversion – We know the worse case ● Unbounded Priority Inversion – No idea when it will finish
  • 22. Bounded Priority Inversion (using Priority Inheritance)
  • 23. Hardware does matter! ● Cache and TLB misses ● SMI – System Monster^WManagement Interrupt ● The hardware must also be deterministic – (Stay tuned, same Bat Channel)