SlideShare a Scribd company logo
1 of 16
Download to read offline
Analysis of
                                                       interrupt latencies
                                                          in a real-time
             Università degli Studi di Trento                 kernel

   Facoltà di Scienze Matematiche Fisiche e Naturali
                                                       Real-time
                                                       operating systems

                                                       Real-time Linux

                                                       CFS
     Analysis of interrupt latencies in a              Recap

              real-time kernel



                   March 26, 2008


Laureando: Gabriele Modena (Mat. 108742)
Relatore: dott. Luigi Palopoli
Correlatore: dott. Luca Abeni
Analysis of
Real-Time Operating Systems (RTOS)                        interrupt latencies
                                                             in a real-time
                                                                 kernel



                                                          Real-time
                                                          operating systems

                                                          Real-time Linux

                                                          CFS

                                                          Recap




Ensure that an operation completes within a fixed amount
of time (deadline) =⇒ predictability.
When dealing with device drivers this implies
    managing race conditions;
    fulfill temporal constraints.
This thesis focuses on shared mixed resources.
Analysis of
Latency                                                    interrupt latencies
                                                              in a real-time
                                                                  kernel



                                                           Real-time
Latency is the measure of the difference between the       operating systems

theoretical (algorithm) and actual (implementation)        Real-time Linux

schedule.                                                  CFS

                                                           Recap
In a RTOS latency:
    should be bounded;
    the bound should not be too high.
The goal of a real-time kernel is to minimize latency by
using algorithms and technology that properly
implements them:

                  preemptible kernel.
Analysis of
Linux as an RTOS                                    interrupt latencies
                                                       in a real-time
                                                           kernel



                                                    Real-time
                                                    operating systems
Linux vanilla:
                                                    Real-time Linux
    since 2.6 preemptible kernel;                   CFS

The rt-preempt patch:                               Recap


    developed by Ingo Molnar;
    makes Linux hard real-time;
    uses the new (2.6.21) high resolution timers;
    preemptible critical sections;
    real-time mutexes;
    threaded interrput handlers.
Analysis of
Benchmarking rt-preempt                                   interrupt latencies
                                                             in a real-time
                                                                 kernel



                                                          Real-time
                                                          operating systems

                                                          Real-time Linux

                                                          CFS

                                                          Recap



Two goals:
    test the actual real-time performance;
    test the performance of I/O scheduling.
We look for a trade-off between latency and throughput.
Analysis of
Cyclictest                                                 interrupt latencies
                                                              in a real-time
                                                                  kernel



                                                           Real-time
                                                           operating systems

                                                           Real-time Linux

                                                           CFS
    high resolution test program written by Thomas         Recap
    Gleixner;
    measure latency;
    schedules periodic threads;
When it comes to real-time applications rt-preempt gives
the expected performance.
Analysis of
Vanilla vs. rt-preempt (1)                                                                                                  interrupt latencies
                                                                                                                               in a real-time
                                                                                                                                   kernel
 Probability of the latency (num. of samples / total samples)




                                                                                                                            Real-time
                                                                                       Preemptible Linux
                                                                                                                            operating systems
                                                                    1
                                                                                                                            Real-time Linux

                                                                                                                            CFS
                                                                   0.1
                                                                                                                            Recap

                                                                  0.01


                                                                 0.001


                                                                0.0001


                                                                1e-05


                                                                1e-06
                                                                         0   1000   2000    3000       4000   5000   6000
                                                                                       Latency (usecs)
Analysis of
Vanilla vs. rt-preempt (2)                                                                                         interrupt latencies
                                                                                                                      in a real-time
                                                                                                                          kernel
 Probability of the latency (num. of samples / total samples)




                                                                                                                   Real-time
                                                                                          RT Linux
                                                                                                                   operating systems
                                                                    1
                                                                                                                   Real-time Linux

                                                                                                                   CFS
                                                                   0.1
                                                                                                                   Recap

                                                                  0.01


                                                                 0.001


                                                                0.0001


                                                                1e-05


                                                                1e-06
                                                                         0   10   20       30       40   50   60
                                                                                       Latency (usecs)
Analysis of
I/O scheduling                                           interrupt latencies
                                                            in a real-time
                                                                kernel



                                                         Real-time
                                                         operating systems

                                                         Real-time Linux

                                                         CFS
    In traditional operating systems interrupt handler   Recap

    have priority above everything.
    rt-preempt =⇒ soft and hard irq handlers are
    threads:
             scheduling I/O ≡ scheduling tasks.
Analysis of
Benchmark network throughput                 interrupt latencies
                                                in a real-time
                                                    kernel



                                             Real-time
                                             operating systems

                                             Real-time Linux

                                             CFS
   netperf;                                  Recap

   UDP traffic;
   750B datagrams;
   schedule the real-time network threads;
   30 minutes execution.
Analysis of
Fixed priority scheduling                                    interrupt latencies
                                                                in a real-time
                                                                    kernel
It is not possibile to obtain low latency and high
throughput;                                                  Real-time
                                                             operating systems

                                                             Real-time Linux

 Net priority   min. lat (µs)    max. lat (µs)   Tp (Mbps)   CFS

      1              20              94            38.9      Recap

     50              22              96            39.9
     80              20             148            77.4
     99              22             164            73.4
      Table: Linux 2.6.24-rc2-rt1, 750B UDP datagrams


    high throughput and high latency;
    low throughput and low latency.
Fixed priority scheduling is not suitable =⇒ we look for
a method to assign CPU quota to tasks.
Analysis of
Completely Fair Scheduler              interrupt latencies
                                          in a real-time
                                              kernel



                                       Real-time
                                       operating systems

                                       Real-time Linux

                                       CFS

                                       Recap
    implemented by Ingo Molnar;
    merged in mainline since 2.6.23;
    weights tasks by ratio;
    group scheduling;
Analysis of
cfs & rt-preempt                                      interrupt latencies
                                                         in a real-time
                                                             kernel

My work
                                                      Real-time
    use CFS and modify the nice system call to set    operating systems

    weights (> 200 µs);                               Real-time Linux

                                                      CFS
    use CFS and tune Control Groups (> 1000 µs).
                                                      Recap
Results

          net   cyc   load   lat (µs)   Tp (Mbps)
           1     1      1     2931        49.9
           2     1      1     3911        67.3
           2     2      1     3721        71.1
           4     2      1     6117        80.9
           1     1      4     2871        35.2
       Table: Scheduling real-time threads with CFS
Analysis of
cfs & rt-preempt                                       interrupt latencies
                                                          in a real-time
                                                              kernel



                                                       Real-time
                                                       operating systems

                                                       Real-time Linux

                                                       CFS
    impact on the I/O throughput =⇒ the ratio system
                                                       Recap
    works;
    high latencies.
Short time possible solutions
    CFS clean up and tuning (in progress);
    EDF scheduling + time limit (Linux 2.6.25).
Analysis of
Overview of the work                                           interrupt latencies
                                                                  in a real-time
Step 1                                                                kernel

    litterature study on real-time computing;
                                                               Real-time
    study of the rt-preempt patch and real-time under Linux;   operating systems

                                                               Real-time Linux
Step 2                                                         CFS

                                                               Recap
    benchmark real-time performance;
    study the relationship between I/O and real-time
    applications;

Step 3
    test the CFS scheduler;
    try custom and standard solutions;
Future work
    results presented at the RTAS 2008 conference
    (http://www.rtas.org/ );
    tuning CFS and testing new scheduling policies.
Analysis of
Questions                   interrupt latencies
                               in a real-time
                                   kernel



                            Real-time
                            operating systems

                            Real-time Linux

                            CFS

                            Recap



            Any question?

More Related Content

What's hot

Linux26 New Features
Linux26 New FeaturesLinux26 New Features
Linux26 New Featuresguest491c69
 
Windows Internals for Linux Kernel Developers
Windows Internals for Linux Kernel DevelopersWindows Internals for Linux Kernel Developers
Windows Internals for Linux Kernel DevelopersKernel TLV
 
NetBSD and Linux for Embedded Systems
NetBSD and Linux for Embedded SystemsNetBSD and Linux for Embedded Systems
NetBSD and Linux for Embedded SystemsMahendra M
 
Running Applications on the NetBSD Rump Kernel by Justin Cormack
Running Applications on the NetBSD Rump Kernel by Justin Cormack Running Applications on the NetBSD Rump Kernel by Justin Cormack
Running Applications on the NetBSD Rump Kernel by Justin Cormack eurobsdcon
 
Systemd for developers
Systemd for developersSystemd for developers
Systemd for developersAlison Chaiken
 
Introduction to NetBSD kernel
Introduction to NetBSD kernelIntroduction to NetBSD kernel
Introduction to NetBSD kernelMahendra M
 
Linux cgroups and namespaces
Linux cgroups and namespacesLinux cgroups and namespaces
Linux cgroups and namespacesLocaweb
 
Containers with systemd-nspawn
Containers with systemd-nspawnContainers with systemd-nspawn
Containers with systemd-nspawnGábor Nyers
 
Realizing Linux Containers (LXC)
Realizing Linux Containers (LXC)Realizing Linux Containers (LXC)
Realizing Linux Containers (LXC)Boden Russell
 
Linuxcon Barcelon 2012: LXC Best Practices
Linuxcon Barcelon 2012: LXC Best PracticesLinuxcon Barcelon 2012: LXC Best Practices
Linuxcon Barcelon 2012: LXC Best Practiceschristophm
 
Processes in unix
Processes in unixProcesses in unix
Processes in unixmiau_max
 
Linux Instrumentation
Linux InstrumentationLinux Instrumentation
Linux InstrumentationDarkStarSword
 
Namespaces and cgroups - the basis of Linux containers
Namespaces and cgroups - the basis of Linux containersNamespaces and cgroups - the basis of Linux containers
Namespaces and cgroups - the basis of Linux containersKernel TLV
 
Systemd: the modern Linux init system you will learn to love
Systemd: the modern Linux init system you will learn to loveSystemd: the modern Linux init system you will learn to love
Systemd: the modern Linux init system you will learn to loveAlison Chaiken
 
Process and Threads in Linux - PPT
Process and Threads in Linux - PPTProcess and Threads in Linux - PPT
Process and Threads in Linux - PPTQUONTRASOLUTIONS
 
IJCER (www.ijceronline.com) International Journal of computational Engineeri...
 IJCER (www.ijceronline.com) International Journal of computational Engineeri... IJCER (www.ijceronline.com) International Journal of computational Engineeri...
IJCER (www.ijceronline.com) International Journal of computational Engineeri...ijceronline
 
Containers and Namespaces in the Linux Kernel
Containers and Namespaces in the Linux KernelContainers and Namespaces in the Linux Kernel
Containers and Namespaces in the Linux KernelOpenVZ
 

What's hot (20)

Linux26 New Features
Linux26 New FeaturesLinux26 New Features
Linux26 New Features
 
Windows Internals for Linux Kernel Developers
Windows Internals for Linux Kernel DevelopersWindows Internals for Linux Kernel Developers
Windows Internals for Linux Kernel Developers
 
.ppt
.ppt.ppt
.ppt
 
NetBSD and Linux for Embedded Systems
NetBSD and Linux for Embedded SystemsNetBSD and Linux for Embedded Systems
NetBSD and Linux for Embedded Systems
 
First steps on CentOs7
First steps on CentOs7First steps on CentOs7
First steps on CentOs7
 
Running Applications on the NetBSD Rump Kernel by Justin Cormack
Running Applications on the NetBSD Rump Kernel by Justin Cormack Running Applications on the NetBSD Rump Kernel by Justin Cormack
Running Applications on the NetBSD Rump Kernel by Justin Cormack
 
Systemd for developers
Systemd for developersSystemd for developers
Systemd for developers
 
Introduction to NetBSD kernel
Introduction to NetBSD kernelIntroduction to NetBSD kernel
Introduction to NetBSD kernel
 
Daemons
DaemonsDaemons
Daemons
 
Linux cgroups and namespaces
Linux cgroups and namespacesLinux cgroups and namespaces
Linux cgroups and namespaces
 
Containers with systemd-nspawn
Containers with systemd-nspawnContainers with systemd-nspawn
Containers with systemd-nspawn
 
Realizing Linux Containers (LXC)
Realizing Linux Containers (LXC)Realizing Linux Containers (LXC)
Realizing Linux Containers (LXC)
 
Linuxcon Barcelon 2012: LXC Best Practices
Linuxcon Barcelon 2012: LXC Best PracticesLinuxcon Barcelon 2012: LXC Best Practices
Linuxcon Barcelon 2012: LXC Best Practices
 
Processes in unix
Processes in unixProcesses in unix
Processes in unix
 
Linux Instrumentation
Linux InstrumentationLinux Instrumentation
Linux Instrumentation
 
Namespaces and cgroups - the basis of Linux containers
Namespaces and cgroups - the basis of Linux containersNamespaces and cgroups - the basis of Linux containers
Namespaces and cgroups - the basis of Linux containers
 
Systemd: the modern Linux init system you will learn to love
Systemd: the modern Linux init system you will learn to loveSystemd: the modern Linux init system you will learn to love
Systemd: the modern Linux init system you will learn to love
 
Process and Threads in Linux - PPT
Process and Threads in Linux - PPTProcess and Threads in Linux - PPT
Process and Threads in Linux - PPT
 
IJCER (www.ijceronline.com) International Journal of computational Engineeri...
 IJCER (www.ijceronline.com) International Journal of computational Engineeri... IJCER (www.ijceronline.com) International Journal of computational Engineeri...
IJCER (www.ijceronline.com) International Journal of computational Engineeri...
 
Containers and Namespaces in the Linux Kernel
Containers and Namespaces in the Linux KernelContainers and Namespaces in the Linux Kernel
Containers and Namespaces in the Linux Kernel
 

Similar to Analysis of interrupt latencies in a real-time kernel

Virtual Network Functions as Real-Time Containers in Private Clouds
Virtual Network Functions as Real-Time Containers in Private CloudsVirtual Network Functions as Real-Time Containers in Private Clouds
Virtual Network Functions as Real-Time Containers in Private Cloudstcucinotta
 
embedded system CHAPTER four about design .pdf
embedded system CHAPTER four about design .pdfembedded system CHAPTER four about design .pdf
embedded system CHAPTER four about design .pdfabdulkerimaragaw936
 
XPDS14 - RT-Xen: Real-Time Virtualization in Xen - Sisu Xi, Washington Univer...
XPDS14 - RT-Xen: Real-Time Virtualization in Xen - Sisu Xi, Washington Univer...XPDS14 - RT-Xen: Real-Time Virtualization in Xen - Sisu Xi, Washington Univer...
XPDS14 - RT-Xen: Real-Time Virtualization in Xen - Sisu Xi, Washington Univer...The Linux Foundation
 
Chapter 19 - Real Time Systems
Chapter 19 - Real Time SystemsChapter 19 - Real Time Systems
Chapter 19 - Real Time SystemsWayne Jones Jnr
 
Real time operating-systems
Real time operating-systemsReal time operating-systems
Real time operating-systemskasi963
 
Enea Enabling Real-Time in Linux Whitepaper
Enea Enabling Real-Time in Linux WhitepaperEnea Enabling Real-Time in Linux Whitepaper
Enea Enabling Real-Time in Linux WhitepaperEnea Software AB
 
Four Ways to Improve Linux Performance IEEE Webinar, R2.0
Four Ways to Improve Linux Performance IEEE Webinar, R2.0Four Ways to Improve Linux Performance IEEE Webinar, R2.0
Four Ways to Improve Linux Performance IEEE Webinar, R2.0Michael Christofferson
 
Real Time OS For Embedded Systems
Real Time OS For Embedded SystemsReal Time OS For Embedded Systems
Real Time OS For Embedded SystemsHimanshu Ghetia
 
RTAI - Earliest Deadline First
RTAI - Earliest Deadline FirstRTAI - Earliest Deadline First
RTAI - Earliest Deadline FirstStefano Bragaglia
 
Real-time Programming in Java
Real-time Programming in JavaReal-time Programming in Java
Real-time Programming in JavaAleš Plšek
 
Bottom halves on Linux
Bottom halves on LinuxBottom halves on Linux
Bottom halves on LinuxChinmay V S
 

Similar to Analysis of interrupt latencies in a real-time kernel (20)

Making Linux do Hard Real-time
Making Linux do Hard Real-timeMaking Linux do Hard Real-time
Making Linux do Hard Real-time
 
Rtos slides
Rtos slidesRtos slides
Rtos slides
 
RTOS Basic Concepts
RTOS Basic ConceptsRTOS Basic Concepts
RTOS Basic Concepts
 
Virtual Network Functions as Real-Time Containers in Private Clouds
Virtual Network Functions as Real-Time Containers in Private CloudsVirtual Network Functions as Real-Time Containers in Private Clouds
Virtual Network Functions as Real-Time Containers in Private Clouds
 
embedded system CHAPTER four about design .pdf
embedded system CHAPTER four about design .pdfembedded system CHAPTER four about design .pdf
embedded system CHAPTER four about design .pdf
 
Realtime
RealtimeRealtime
Realtime
 
XPDS14 - RT-Xen: Real-Time Virtualization in Xen - Sisu Xi, Washington Univer...
XPDS14 - RT-Xen: Real-Time Virtualization in Xen - Sisu Xi, Washington Univer...XPDS14 - RT-Xen: Real-Time Virtualization in Xen - Sisu Xi, Washington Univer...
XPDS14 - RT-Xen: Real-Time Virtualization in Xen - Sisu Xi, Washington Univer...
 
Chapter 19 - Real Time Systems
Chapter 19 - Real Time SystemsChapter 19 - Real Time Systems
Chapter 19 - Real Time Systems
 
Real time operating-systems
Real time operating-systemsReal time operating-systems
Real time operating-systems
 
UNIT V PPT.ppt
UNIT V PPT.pptUNIT V PPT.ppt
UNIT V PPT.ppt
 
Rtos 2
Rtos 2Rtos 2
Rtos 2
 
Rtos
RtosRtos
Rtos
 
RTDroid_Presentation
RTDroid_PresentationRTDroid_Presentation
RTDroid_Presentation
 
Enea Enabling Real-Time in Linux Whitepaper
Enea Enabling Real-Time in Linux WhitepaperEnea Enabling Real-Time in Linux Whitepaper
Enea Enabling Real-Time in Linux Whitepaper
 
Four Ways to Improve Linux Performance IEEE Webinar, R2.0
Four Ways to Improve Linux Performance IEEE Webinar, R2.0Four Ways to Improve Linux Performance IEEE Webinar, R2.0
Four Ways to Improve Linux Performance IEEE Webinar, R2.0
 
Real Time OS For Embedded Systems
Real Time OS For Embedded SystemsReal Time OS For Embedded Systems
Real Time OS For Embedded Systems
 
RTAI - Earliest Deadline First
RTAI - Earliest Deadline FirstRTAI - Earliest Deadline First
RTAI - Earliest Deadline First
 
Real-time Programming in Java
Real-time Programming in JavaReal-time Programming in Java
Real-time Programming in Java
 
Rtai
RtaiRtai
Rtai
 
Bottom halves on Linux
Bottom halves on LinuxBottom halves on Linux
Bottom halves on Linux
 

More from Gabriele Modena

Resilient Distributed Datasets
Resilient Distributed DatasetsResilient Distributed Datasets
Resilient Distributed DatasetsGabriele Modena
 
Estimating mental states of a depressed person with Bayesian Networks
Estimating mental states of a depressed person with Bayesian NetworksEstimating mental states of a depressed person with Bayesian Networks
Estimating mental states of a depressed person with Bayesian NetworksGabriele Modena
 
Analysis of grid log data with Affinity Propagation
Analysis of grid log data with Affinity PropagationAnalysis of grid log data with Affinity Propagation
Analysis of grid log data with Affinity PropagationGabriele Modena
 
Moving Towards a Streaming Architecture
Moving Towards a Streaming ArchitectureMoving Towards a Streaming Architecture
Moving Towards a Streaming ArchitectureGabriele Modena
 
Approximation algorithms for stream and batch processing
Approximation algorithms for stream and batch processingApproximation algorithms for stream and batch processing
Approximation algorithms for stream and batch processingGabriele Modena
 
Full stack analytics with Hadoop 2
Full stack analytics with Hadoop 2Full stack analytics with Hadoop 2
Full stack analytics with Hadoop 2Gabriele Modena
 

More from Gabriele Modena (6)

Resilient Distributed Datasets
Resilient Distributed DatasetsResilient Distributed Datasets
Resilient Distributed Datasets
 
Estimating mental states of a depressed person with Bayesian Networks
Estimating mental states of a depressed person with Bayesian NetworksEstimating mental states of a depressed person with Bayesian Networks
Estimating mental states of a depressed person with Bayesian Networks
 
Analysis of grid log data with Affinity Propagation
Analysis of grid log data with Affinity PropagationAnalysis of grid log data with Affinity Propagation
Analysis of grid log data with Affinity Propagation
 
Moving Towards a Streaming Architecture
Moving Towards a Streaming ArchitectureMoving Towards a Streaming Architecture
Moving Towards a Streaming Architecture
 
Approximation algorithms for stream and batch processing
Approximation algorithms for stream and batch processingApproximation algorithms for stream and batch processing
Approximation algorithms for stream and batch processing
 
Full stack analytics with Hadoop 2
Full stack analytics with Hadoop 2Full stack analytics with Hadoop 2
Full stack analytics with Hadoop 2
 

Recently uploaded

Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajanpragatimahajan3
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...Pooja Nehwal
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 

Recently uploaded (20)

Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 

Analysis of interrupt latencies in a real-time kernel

  • 1. Analysis of interrupt latencies in a real-time Università degli Studi di Trento kernel Facoltà di Scienze Matematiche Fisiche e Naturali Real-time operating systems Real-time Linux CFS Analysis of interrupt latencies in a Recap real-time kernel March 26, 2008 Laureando: Gabriele Modena (Mat. 108742) Relatore: dott. Luigi Palopoli Correlatore: dott. Luca Abeni
  • 2. Analysis of Real-Time Operating Systems (RTOS) interrupt latencies in a real-time kernel Real-time operating systems Real-time Linux CFS Recap Ensure that an operation completes within a fixed amount of time (deadline) =⇒ predictability. When dealing with device drivers this implies managing race conditions; fulfill temporal constraints. This thesis focuses on shared mixed resources.
  • 3. Analysis of Latency interrupt latencies in a real-time kernel Real-time Latency is the measure of the difference between the operating systems theoretical (algorithm) and actual (implementation) Real-time Linux schedule. CFS Recap In a RTOS latency: should be bounded; the bound should not be too high. The goal of a real-time kernel is to minimize latency by using algorithms and technology that properly implements them: preemptible kernel.
  • 4. Analysis of Linux as an RTOS interrupt latencies in a real-time kernel Real-time operating systems Linux vanilla: Real-time Linux since 2.6 preemptible kernel; CFS The rt-preempt patch: Recap developed by Ingo Molnar; makes Linux hard real-time; uses the new (2.6.21) high resolution timers; preemptible critical sections; real-time mutexes; threaded interrput handlers.
  • 5. Analysis of Benchmarking rt-preempt interrupt latencies in a real-time kernel Real-time operating systems Real-time Linux CFS Recap Two goals: test the actual real-time performance; test the performance of I/O scheduling. We look for a trade-off between latency and throughput.
  • 6. Analysis of Cyclictest interrupt latencies in a real-time kernel Real-time operating systems Real-time Linux CFS high resolution test program written by Thomas Recap Gleixner; measure latency; schedules periodic threads; When it comes to real-time applications rt-preempt gives the expected performance.
  • 7. Analysis of Vanilla vs. rt-preempt (1) interrupt latencies in a real-time kernel Probability of the latency (num. of samples / total samples) Real-time Preemptible Linux operating systems 1 Real-time Linux CFS 0.1 Recap 0.01 0.001 0.0001 1e-05 1e-06 0 1000 2000 3000 4000 5000 6000 Latency (usecs)
  • 8. Analysis of Vanilla vs. rt-preempt (2) interrupt latencies in a real-time kernel Probability of the latency (num. of samples / total samples) Real-time RT Linux operating systems 1 Real-time Linux CFS 0.1 Recap 0.01 0.001 0.0001 1e-05 1e-06 0 10 20 30 40 50 60 Latency (usecs)
  • 9. Analysis of I/O scheduling interrupt latencies in a real-time kernel Real-time operating systems Real-time Linux CFS In traditional operating systems interrupt handler Recap have priority above everything. rt-preempt =⇒ soft and hard irq handlers are threads: scheduling I/O ≡ scheduling tasks.
  • 10. Analysis of Benchmark network throughput interrupt latencies in a real-time kernel Real-time operating systems Real-time Linux CFS netperf; Recap UDP traffic; 750B datagrams; schedule the real-time network threads; 30 minutes execution.
  • 11. Analysis of Fixed priority scheduling interrupt latencies in a real-time kernel It is not possibile to obtain low latency and high throughput; Real-time operating systems Real-time Linux Net priority min. lat (µs) max. lat (µs) Tp (Mbps) CFS 1 20 94 38.9 Recap 50 22 96 39.9 80 20 148 77.4 99 22 164 73.4 Table: Linux 2.6.24-rc2-rt1, 750B UDP datagrams high throughput and high latency; low throughput and low latency. Fixed priority scheduling is not suitable =⇒ we look for a method to assign CPU quota to tasks.
  • 12. Analysis of Completely Fair Scheduler interrupt latencies in a real-time kernel Real-time operating systems Real-time Linux CFS Recap implemented by Ingo Molnar; merged in mainline since 2.6.23; weights tasks by ratio; group scheduling;
  • 13. Analysis of cfs & rt-preempt interrupt latencies in a real-time kernel My work Real-time use CFS and modify the nice system call to set operating systems weights (> 200 µs); Real-time Linux CFS use CFS and tune Control Groups (> 1000 µs). Recap Results net cyc load lat (µs) Tp (Mbps) 1 1 1 2931 49.9 2 1 1 3911 67.3 2 2 1 3721 71.1 4 2 1 6117 80.9 1 1 4 2871 35.2 Table: Scheduling real-time threads with CFS
  • 14. Analysis of cfs & rt-preempt interrupt latencies in a real-time kernel Real-time operating systems Real-time Linux CFS impact on the I/O throughput =⇒ the ratio system Recap works; high latencies. Short time possible solutions CFS clean up and tuning (in progress); EDF scheduling + time limit (Linux 2.6.25).
  • 15. Analysis of Overview of the work interrupt latencies in a real-time Step 1 kernel litterature study on real-time computing; Real-time study of the rt-preempt patch and real-time under Linux; operating systems Real-time Linux Step 2 CFS Recap benchmark real-time performance; study the relationship between I/O and real-time applications; Step 3 test the CFS scheduler; try custom and standard solutions; Future work results presented at the RTAS 2008 conference (http://www.rtas.org/ ); tuning CFS and testing new scheduling policies.
  • 16. Analysis of Questions interrupt latencies in a real-time kernel Real-time operating systems Real-time Linux CFS Recap Any question?