SlideShare une entreprise Scribd logo
1  sur  23
Télécharger pour lire hors ligne
1st International Workshop on
                                  Analysis Tools and Methodologies
                                  for Embedded and Real-time Systems



                                  Bruxelles, July 20th 2010




              IRMOS Tutorial

The IRMOS Real-Time Scheduler
                    by
            Tommaso Cucinotta
       cucinotta -at-domain- sssup.it
Outline
 About     the IRMOS Project

 IRMOS        Real-Time Scheduler

 Tutorial         Session

 Conclusions




       Tommaso Cucinotta – Real-Time System Laboratory – Scuola Superiore Sant'Anna – Pisa – Italy
Outline
 About     the IRMOS Project

 IRMOS        Real-Time Scheduler

 Tutorial         Session

 Conclusions




       Tommaso Cucinotta – Real-Time System Laboratory – Scuola Superiore Sant'Anna – Pisa – Italy
About IRMOS
 FP7 IP – Call ICT-2007.1.2
 3-Years: Feb 2008 – Jan 2011
 11 Partners – Total Cost: €12.9M




        Tommaso Cucinotta – Real-Time System Laboratory – Scuola Superiore Sant'Anna – Pisa – Italy
Distributed interactive
real-time multimedia
applications
   Deployment of VSNs on PNs
     Given computing/network requirements
     Respecting end-to-end timing constraints
                                                                                                             Physical Host
                                                           Physical Host
Computing             Networking
Requirements          Requirements                                                        Physical
                                                                                          Subnet


                                                                         Physical
                                                                         Link

                                                                                                   Physical Host
Virtual Service Network


Maximum response-time                                        Physical Host
               Tommaso Cucinotta – Real-Time System Laboratory – Scuola Superiore Sant'Anna – Pisa – Italy
Two-Phase Approach

                     Design
                      Tools
     Benchmarking                                                          Application
                                                                           Concretion               Discovery
                                                                                                    Negotiati
                                                                                                        on
Modeling,                                                                                                  Reservation
Analysis,
Planning
                                                                                                                  Service
                                                                                                               Instantiation

                                                                                                                 Service
                                                                                                               Component
                                                                                                              Configuration

                                                                                                    Execution &
                                                                                                     Monitoring
                                                                             Cleanup
                                                                                                                       6
                       Offline
                Tommaso Cucinotta – Real-Time System Laboratory – Scuola Superiore Sant'Anna – Pisa – Italy
Mechanisms
 QoS-awareness                                 and Real-time:
   Real-Time CPU Scheduling among VMs
   Networking
   Storage Access

 Virtualization
              & Fault-tolerance
 Workflow Management/Monitoring
…




      Tommaso Cucinotta – Real-Time System Laboratory – Scuola Superiore Sant'Anna – Pisa – Italy
Outline
 About     the IRMOS Project

 IRMOS        Real-Time Scheduler

 Tutorial         Session

 Conclusions




       Tommaso Cucinotta – Real-Time System Laboratory – Scuola Superiore Sant'Anna – Pisa – Italy
IRMOS Scheduler
 Features               at a glance
    Resource Reservations
      EDF-based               scheduling (hard CBS)
    Hierarchical scheduling
      Multipletasks attached to same reservation
      POSIX Fixed Priority scheduling inside each

       reservation
    Multi-processor reservations
      Partitionedscheduling for improved efficiency
      Migration of tasks among CPUs

    Simple admission control
         Tommaso Cucinotta – Real-Time System Laboratory – Scuola Superiore Sant'Anna – Pisa – Italy
IRMOS RT Scheduler
Design Goals
 Replace  real-time throttling
 Tight integration in Linux kernel
     Modification to the Linux RT scheduler
 Reuseas many Linux features as
 possible
   Management of task hierarchies and
    scheduling parameters via cgroups
   POSIX compatibility and API
 Efficient             for SMP
     Independent runqueues
          Tommaso Cucinotta – Real-Time System Laboratory – Scuola Superiore Sant'Anna – Pisa – Italy
IRMOS Scheduler
  Slicethe available computing
    power into reservations




CPU 0
CPU 1
CPU 2
CPU 3

           Tommaso Cucinotta – Real-Time System Laboratory – Scuola Superiore Sant'Anna – Pisa – Italy
Hierarchical
Scheduling
 Partitioned                         CBS

 Fixed Priority
   Scheduling
     Of Tasks                                                 Partitioned
                                                              Deadline-Based
                                                              Scheduling
 Fixed Priority
                                                              Of Entities (groups)
   Scheduling
     Of Tasks

                                            CPU0
                                            CPU0




             Tommaso Cucinotta – Real-Time System Laboratory – Scuola Superiore Sant'Anna – Pisa – Italy
Multi-processor
Scheduling
 Group-wide                         POSIX Fixed-Priority
    SCHED_RR, SCHED_FIFO both possible
    With M CPUs, if
     N ≤ M partitioned
     reservations are
     scheduled, then the
     N highest priority
     tasks in the group
     concurrently run                  push
                                                                                       pull




          Tommaso Cucinotta – Real-Time System Laboratory – Scuola Superiore Sant'Anna – Pisa – Italy
Outline
 About     the IRMOS Project

 IRMOS        Real-Time Scheduler

 Tutorial         Session

 Conclusions




       Tommaso Cucinotta – Real-Time System Laboratory – Scuola Superiore Sant'Anna – Pisa – Italy
Installation
   Install binary kernel package(s)
       Download the RPM/DEB binary kernel packages
            Go to the AQuoSA website: http://aquosa.sourceforge.net
            Follow Downloads → Get AQuoSA → kernel-binaries
   Compile from kernel sources
       Download Linux 2.6.30.10
            wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.30.10.tar.bz2
            tar -xjf linux-2.6.30.10.tar.bz2
            cd linux-2.6.30.10
       Download the IRMOS patch
            Go to the AQuoSA website: http://aquosa.sourceforge.net
            Follow Downloads → Get AQuoSA → kernel-patches
       Apply the patch
            patch -p1 < /path/to/linux-2.6.30.10-irmos-1.0.patch




                 Tommaso Cucinotta – Real-Time System Laboratory – Scuola Superiore Sant'Anna – Pisa – Italy
Configuration
   Configure, compile, install kernel
       make menuconfig; make -j4; sudo make modules_install; sudo make install
   Needed kernel compile-time options
       RT_GROUP_SCHED
       GROUP_SCHED
       CGROUPS
       CGROUP_SCHED
       EXPERIMENTAL
       CONFIG_PREEMPT (recommended)
       CGROUP_CPUACCT (recommended)
       SCHED_DEBUG (recommended)
       HIGH_RES_TIMERS
       HZ_1000 (suggested)
   Run-time tunable options (recommended)
       mount -t debugfs debugfs /sys/kernel/debug/
       echo NO_RUNTIME_BALANCING > /sys/kernel/debug/sched_features
       echo HRTICK > /sys/kernel/debug/sched_features

                Tommaso Cucinotta – Real-Time System Laboratory – Scuola Superiore Sant'Anna – Pisa – Italy
Group Management
   Pre-requisite at run-time: mount cgroups
       mkdir /cg
       mount -t cgroup -o cpu,cpuacct cgroup /cg
   Reduce runtime for root-level tasks
       echo 200000 > /cg/cpu.rt_rt_task_runtime_us
        (root-group runtime remains at default of 950000)
   Create group, with reservation of 10ms every 100ms
       mkdir /cg/g1
       echo 100000 > /cg/g1/cpu.rt_period_us
       echo 10000 > /cg/g1/cpu.rt_runtime_us
       echo 100000 > /cg/g1/cpu.rt_task_period_us
       echo 10000 > /cg/g1/cpu.rt_task_runtime_us
   Attach task with tid=1421
       echo 1421 > /cg/g1/tasks
   Detach task
       echo 1421 > /cg/tasks
   Attach process with pid=1700
       for tid in `ls /proc/1700/task`; do echo $tid > /cg/g1/tasks; done
   Destroy group
       rmdir /cg/g1
                Tommaso Cucinotta – Real-Time System Laboratory – Scuola Superiore Sant'Anna – Pisa – Italy
POSIX Priorities
   After attachment to a group
      tasks are still SCHED_OTHER

   Need to set real-time scheduling
      Class (SCHED_RR or SCHED_FIFO)
      Priority

   Task 1421 at SCHED_RR with rtprio=20
       chrt -r -p 20 1421
   Return at SCHED_OTHER
       chrt -o -p 1421
   Process 1700 at SCHED_RR
       for tid in `ls /proc/1700/task`; do chrt -o -p $tid; done

               Tommaso Cucinotta – Real-Time System Laboratory – Scuola Superiore Sant'Anna – Pisa – Italy
Things easier with
AQuoSA
   Create group, with reservation of
    10ms every 100ms
       qres create q=10000 p=100000
        SID of new server: 1
   Attach task with tid=1421
       qres attach sid=1 tid=1421
   Detach task
       qres detach sid=1 tid=1421
   Attach process with pid=1700                                                                       aquosa
                                                                                                        aquosa
       qres attach sid=1 pid=1700                                                     qres
                                                                                       qres            manager
                                                                                                       manager       …
   Destroy group
       qres destroy sid=1                                                                AQuoSA qosres API
                                                                                          AQuoSA qosres API
   All-in-one command
                                                                                               ioctl()          cgroups
       qres create q=30000 p=100000 attach tid=1421
   Wrap an entire process at start                                                    AQuoSA
                                                                                        AQuoSA                 IRMOS
                                                                                                                IRMOS
       qres create q=30000 p=100000 wrap qemu-kvm …                                   scheduler
                                                                                       scheduler              scheduler
                                                                                                              scheduler

                Tommaso Cucinotta – Real-Time System Laboratory – Scuola Superiore Sant'Anna – Pisa – Italy
Outline
 About     the IRMOS Project

 IRMOS        Real-Time Scheduler

 Tutorial         Session

 Conclusions




       Tommaso Cucinotta – Real-Time System Laboratory – Scuola Superiore Sant'Anna – Pisa – Italy
Conclusions
   IRMOS real-time scheduler
       Hierarchical EDF/FP scheduling
       Multi-processor reservations
       User-space interface based on cgroups
   Things to improve
       Kernel-space ↔ User-space communic.
       Access-control model
       Add a desired budget for adaptive reservation
       Soft reservations
   We're working on it
       Stay tuned
            http://aquosa.sourceforge.net
            http://retis.sssup.it/~tommaso
            http://retis.sssup.it/~fabio




                 Tommaso Cucinotta – Real-Time System Laboratory – Scuola Superiore Sant'Anna – Pisa – Italy
Related Publications
    Hierarchical Multiprocessor CPU Reservations for the Linux Kernel
     F. Checconi, T. Cucinotta, D. Faggioli, G. Lipari
     OSPERT 2009, Dublin, Ireland, June 2009
    Access Control for Adaptive Reservations on Multi-User Systems
     T. Cucinotta
     RTAS 2008, St. Louis, MO, United States, April 2008
    Self-tuning Schedulers for Legacy Real-Time Applications
     T. Cucinotta, F. Checconi, L. Abeni, L. Palopoli
     EuroSys 2010, Paris, April 2010
    Respecting temporal constraints in virtualised services
     T. Cucinotta, G. Anastasi, L. Abeni
     RTSOAA 2009, Seattle, Washington, July 2009




            Tommaso Cucinotta – Real-Time System Laboratory – Scuola Superiore Sant'Anna – Pisa – Italy
1st International Workshop on
                                      Analysis Tools and Methodologies
                                      for Embedded and Real-time Systems



                                      Bruxelles, July 20th 2010




                        Thank you!
Tommaso Cucinotta       Further Information
 Scuola Superiore       http://www.irmosproject.eu
     Sant'Anna
cucinotta at sssup.it
                        The research leading to these results has
                        received funding from the European
                        Commission Seventh Framework
                        Programme FP7/2007-2011 under
                        grant agreement n° 214777

Contenu connexe

Similaire à The IRMOS Real-Time Scheduler

Virtualised e-Learning with Real-Time Guarantees on the IRMOS Platform
Virtualised e-Learning with Real-Time Guarantees on the IRMOS PlatformVirtualised e-Learning with Real-Time Guarantees on the IRMOS Platform
Virtualised e-Learning with Real-Time Guarantees on the IRMOS Platformtcucinotta
 
Self-tuning Schedulers for Legacy Real-Time Applications
Self-tuning Schedulers for Legacy Real-Time ApplicationsSelf-tuning Schedulers for Legacy Real-Time Applications
Self-tuning Schedulers for Legacy Real-Time Applicationstcucinotta
 
Self-tuning Schedulers for Legacy Real-Time Applications
Self-tuning Schedulers for Legacy Real-Time ApplicationsSelf-tuning Schedulers for Legacy Real-Time Applications
Self-tuning Schedulers for Legacy Real-Time Applicationsguestbbe1c83
 
The Wizard of OS: a Heartbeat for Legacy Multimedia Applications
The Wizard of OS: a Heartbeat for Legacy Multimedia ApplicationsThe Wizard of OS: a Heartbeat for Legacy Multimedia Applications
The Wizard of OS: a Heartbeat for Legacy Multimedia Applicationstcucinotta
 
Providing Performance Guarantees to Virtual Machines using Real-Time Scheduling
Providing Performance Guarantees to Virtual Machines using Real-Time SchedulingProviding Performance Guarantees to Virtual Machines using Real-Time Scheduling
Providing Performance Guarantees to Virtual Machines using Real-Time Schedulingtcucinotta
 
Improving Responsiveness for Virtualized Networking Under Intensive Computing...
Improving Responsiveness for Virtualized Networking Under Intensive Computing...Improving Responsiveness for Virtualized Networking Under Intensive Computing...
Improving Responsiveness for Virtualized Networking Under Intensive Computing...tcucinotta
 
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
 
A Survey on Heuristic Based Techniques in Cloud Computing
A Survey on Heuristic Based Techniques in Cloud ComputingA Survey on Heuristic Based Techniques in Cloud Computing
A Survey on Heuristic Based Techniques in Cloud ComputingIRJET Journal
 
Csc presentation
Csc presentationCsc presentation
Csc presentationAlmu Dena
 
MULTIPROCESSOR AND REAL TIME SCHEDULING.ppt
MULTIPROCESSOR AND REAL TIME SCHEDULING.pptMULTIPROCESSOR AND REAL TIME SCHEDULING.ppt
MULTIPROCESSOR AND REAL TIME SCHEDULING.pptCUO VEERANAN VEERANAN
 
Embedded Intro India05
Embedded Intro India05Embedded Intro India05
Embedded Intro India05Rajesh Gupta
 
ADVISE - a Framework for Evaluating Cloud Service Elasticity Behavior - Best...
 ADVISE - a Framework for Evaluating Cloud Service Elasticity Behavior - Best... ADVISE - a Framework for Evaluating Cloud Service Elasticity Behavior - Best...
ADVISE - a Framework for Evaluating Cloud Service Elasticity Behavior - Best...Georgiana Copil
 
Implementation and study of the BandWidth Inheritance protocol in the Linux k...
Implementation and study of the BandWidth Inheritance protocol in the Linux k...Implementation and study of the BandWidth Inheritance protocol in the Linux k...
Implementation and study of the BandWidth Inheritance protocol in the Linux k...Dario Faggioli
 
CS 23 Operating System Design Principles_MULTIPROCESSOR AND REAL TIME SCHEDULING
CS 23 Operating System Design Principles_MULTIPROCESSOR AND REAL TIME SCHEDULINGCS 23 Operating System Design Principles_MULTIPROCESSOR AND REAL TIME SCHEDULING
CS 23 Operating System Design Principles_MULTIPROCESSOR AND REAL TIME SCHEDULINGCUO VEERANAN VEERANAN
 
Uniprocessor SchedulingCsci 430, Spring 2018Texas A&
Uniprocessor SchedulingCsci 430, Spring 2018Texas A&Uniprocessor SchedulingCsci 430, Spring 2018Texas A&
Uniprocessor SchedulingCsci 430, Spring 2018Texas A&corbing9ttj
 
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
 
Calibration of Deployment Simulation Models - A Multi-Paradigm Modelling Appr...
Calibration of Deployment Simulation Models - A Multi-Paradigm Modelling Appr...Calibration of Deployment Simulation Models - A Multi-Paradigm Modelling Appr...
Calibration of Deployment Simulation Models - A Multi-Paradigm Modelling Appr...Daniele Gianni
 

Similaire à The IRMOS Real-Time Scheduler (20)

Virtualised e-Learning with Real-Time Guarantees on the IRMOS Platform
Virtualised e-Learning with Real-Time Guarantees on the IRMOS PlatformVirtualised e-Learning with Real-Time Guarantees on the IRMOS Platform
Virtualised e-Learning with Real-Time Guarantees on the IRMOS Platform
 
Self-tuning Schedulers for Legacy Real-Time Applications
Self-tuning Schedulers for Legacy Real-Time ApplicationsSelf-tuning Schedulers for Legacy Real-Time Applications
Self-tuning Schedulers for Legacy Real-Time Applications
 
Self-tuning Schedulers for Legacy Real-Time Applications
Self-tuning Schedulers for Legacy Real-Time ApplicationsSelf-tuning Schedulers for Legacy Real-Time Applications
Self-tuning Schedulers for Legacy Real-Time Applications
 
Real-Time API
Real-Time APIReal-Time API
Real-Time API
 
The Wizard of OS: a Heartbeat for Legacy Multimedia Applications
The Wizard of OS: a Heartbeat for Legacy Multimedia ApplicationsThe Wizard of OS: a Heartbeat for Legacy Multimedia Applications
The Wizard of OS: a Heartbeat for Legacy Multimedia Applications
 
Providing Performance Guarantees to Virtual Machines using Real-Time Scheduling
Providing Performance Guarantees to Virtual Machines using Real-Time SchedulingProviding Performance Guarantees to Virtual Machines using Real-Time Scheduling
Providing Performance Guarantees to Virtual Machines using Real-Time Scheduling
 
Improving Responsiveness for Virtualized Networking Under Intensive Computing...
Improving Responsiveness for Virtualized Networking Under Intensive Computing...Improving Responsiveness for Virtualized Networking Under Intensive Computing...
Improving Responsiveness for Virtualized Networking Under Intensive Computing...
 
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
 
IBM PureSystems
IBM PureSystemsIBM PureSystems
IBM PureSystems
 
A Survey on Heuristic Based Techniques in Cloud Computing
A Survey on Heuristic Based Techniques in Cloud ComputingA Survey on Heuristic Based Techniques in Cloud Computing
A Survey on Heuristic Based Techniques in Cloud Computing
 
Csc presentation
Csc presentationCsc presentation
Csc presentation
 
MULTIPROCESSOR AND REAL TIME SCHEDULING.ppt
MULTIPROCESSOR AND REAL TIME SCHEDULING.pptMULTIPROCESSOR AND REAL TIME SCHEDULING.ppt
MULTIPROCESSOR AND REAL TIME SCHEDULING.ppt
 
Embedded Intro India05
Embedded Intro India05Embedded Intro India05
Embedded Intro India05
 
ADVISE - a Framework for Evaluating Cloud Service Elasticity Behavior - Best...
 ADVISE - a Framework for Evaluating Cloud Service Elasticity Behavior - Best... ADVISE - a Framework for Evaluating Cloud Service Elasticity Behavior - Best...
ADVISE - a Framework for Evaluating Cloud Service Elasticity Behavior - Best...
 
Implementation and study of the BandWidth Inheritance protocol in the Linux k...
Implementation and study of the BandWidth Inheritance protocol in the Linux k...Implementation and study of the BandWidth Inheritance protocol in the Linux k...
Implementation and study of the BandWidth Inheritance protocol in the Linux k...
 
CS 23 Operating System Design Principles_MULTIPROCESSOR AND REAL TIME SCHEDULING
CS 23 Operating System Design Principles_MULTIPROCESSOR AND REAL TIME SCHEDULINGCS 23 Operating System Design Principles_MULTIPROCESSOR AND REAL TIME SCHEDULING
CS 23 Operating System Design Principles_MULTIPROCESSOR AND REAL TIME SCHEDULING
 
Uniprocessor SchedulingCsci 430, Spring 2018Texas A&
Uniprocessor SchedulingCsci 430, Spring 2018Texas A&Uniprocessor SchedulingCsci 430, Spring 2018Texas A&
Uniprocessor SchedulingCsci 430, Spring 2018Texas A&
 
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...
 
10.1.1.85.7969
10.1.1.85.796910.1.1.85.7969
10.1.1.85.7969
 
Calibration of Deployment Simulation Models - A Multi-Paradigm Modelling Appr...
Calibration of Deployment Simulation Models - A Multi-Paradigm Modelling Appr...Calibration of Deployment Simulation Models - A Multi-Paradigm Modelling Appr...
Calibration of Deployment Simulation Models - A Multi-Paradigm Modelling Appr...
 

Plus de tcucinotta

An Evaluation of Adaptive Partitioning of Real-Time Workloads on Linux
An Evaluation of Adaptive Partitioning of Real-Time Workloads on LinuxAn Evaluation of Adaptive Partitioning of Real-Time Workloads on Linux
An Evaluation of Adaptive Partitioning of Real-Time Workloads on Linuxtcucinotta
 
Modeling and simulation of power consumption and execution times for real-tim...
Modeling and simulation of power consumption and execution times for real-tim...Modeling and simulation of power consumption and execution times for real-tim...
Modeling and simulation of power consumption and execution times for real-tim...tcucinotta
 
Optimum Scalability Point for Parallelisable Real-Time Components
Optimum Scalability Point for Parallelisable Real-Time ComponentsOptimum Scalability Point for Parallelisable Real-Time Components
Optimum Scalability Point for Parallelisable Real-Time Componentstcucinotta
 
SLAs in Virtualized Cloud Computing Infrastructures with QoS Assurance
SLAs in Virtualized Cloud Computing Infrastructures with QoS AssuranceSLAs in Virtualized Cloud Computing Infrastructures with QoS Assurance
SLAs in Virtualized Cloud Computing Infrastructures with QoS Assurancetcucinotta
 
Low-Latency Audio on Linux by Means of Real-Time Scheduling
Low-Latency Audio on Linux by Means of Real-Time SchedulingLow-Latency Audio on Linux by Means of Real-Time Scheduling
Low-Latency Audio on Linux by Means of Real-Time Schedulingtcucinotta
 
An Exception Based Approach to Timing Constraints Violations in Real-Time and...
An Exception Based Approach to Timing Constraints Violations in Real-Time and...An Exception Based Approach to Timing Constraints Violations in Real-Time and...
An Exception Based Approach to Timing Constraints Violations in Real-Time and...tcucinotta
 

Plus de tcucinotta (6)

An Evaluation of Adaptive Partitioning of Real-Time Workloads on Linux
An Evaluation of Adaptive Partitioning of Real-Time Workloads on LinuxAn Evaluation of Adaptive Partitioning of Real-Time Workloads on Linux
An Evaluation of Adaptive Partitioning of Real-Time Workloads on Linux
 
Modeling and simulation of power consumption and execution times for real-tim...
Modeling and simulation of power consumption and execution times for real-tim...Modeling and simulation of power consumption and execution times for real-tim...
Modeling and simulation of power consumption and execution times for real-tim...
 
Optimum Scalability Point for Parallelisable Real-Time Components
Optimum Scalability Point for Parallelisable Real-Time ComponentsOptimum Scalability Point for Parallelisable Real-Time Components
Optimum Scalability Point for Parallelisable Real-Time Components
 
SLAs in Virtualized Cloud Computing Infrastructures with QoS Assurance
SLAs in Virtualized Cloud Computing Infrastructures with QoS AssuranceSLAs in Virtualized Cloud Computing Infrastructures with QoS Assurance
SLAs in Virtualized Cloud Computing Infrastructures with QoS Assurance
 
Low-Latency Audio on Linux by Means of Real-Time Scheduling
Low-Latency Audio on Linux by Means of Real-Time SchedulingLow-Latency Audio on Linux by Means of Real-Time Scheduling
Low-Latency Audio on Linux by Means of Real-Time Scheduling
 
An Exception Based Approach to Timing Constraints Violations in Real-Time and...
An Exception Based Approach to Timing Constraints Violations in Real-Time and...An Exception Based Approach to Timing Constraints Violations in Real-Time and...
An Exception Based Approach to Timing Constraints Violations in Real-Time and...
 

Dernier

A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Scott Andery
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 

Dernier (20)

A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 

The IRMOS Real-Time Scheduler

  • 1. 1st International Workshop on Analysis Tools and Methodologies for Embedded and Real-time Systems Bruxelles, July 20th 2010 IRMOS Tutorial The IRMOS Real-Time Scheduler by Tommaso Cucinotta cucinotta -at-domain- sssup.it
  • 2. Outline  About the IRMOS Project  IRMOS Real-Time Scheduler  Tutorial Session  Conclusions Tommaso Cucinotta – Real-Time System Laboratory – Scuola Superiore Sant'Anna – Pisa – Italy
  • 3. Outline  About the IRMOS Project  IRMOS Real-Time Scheduler  Tutorial Session  Conclusions Tommaso Cucinotta – Real-Time System Laboratory – Scuola Superiore Sant'Anna – Pisa – Italy
  • 4. About IRMOS  FP7 IP – Call ICT-2007.1.2  3-Years: Feb 2008 – Jan 2011  11 Partners – Total Cost: €12.9M Tommaso Cucinotta – Real-Time System Laboratory – Scuola Superiore Sant'Anna – Pisa – Italy
  • 5. Distributed interactive real-time multimedia applications  Deployment of VSNs on PNs  Given computing/network requirements  Respecting end-to-end timing constraints Physical Host Physical Host Computing Networking Requirements Requirements Physical Subnet Physical Link Physical Host Virtual Service Network Maximum response-time Physical Host Tommaso Cucinotta – Real-Time System Laboratory – Scuola Superiore Sant'Anna – Pisa – Italy
  • 6. Two-Phase Approach Design Tools Benchmarking Application Concretion Discovery Negotiati on Modeling, Reservation Analysis, Planning Service Instantiation Service Component Configuration Execution & Monitoring Cleanup 6 Offline Tommaso Cucinotta – Real-Time System Laboratory – Scuola Superiore Sant'Anna – Pisa – Italy
  • 7. Mechanisms  QoS-awareness and Real-time:  Real-Time CPU Scheduling among VMs  Networking  Storage Access  Virtualization & Fault-tolerance  Workflow Management/Monitoring … Tommaso Cucinotta – Real-Time System Laboratory – Scuola Superiore Sant'Anna – Pisa – Italy
  • 8. Outline  About the IRMOS Project  IRMOS Real-Time Scheduler  Tutorial Session  Conclusions Tommaso Cucinotta – Real-Time System Laboratory – Scuola Superiore Sant'Anna – Pisa – Italy
  • 9. IRMOS Scheduler  Features at a glance  Resource Reservations  EDF-based scheduling (hard CBS)  Hierarchical scheduling  Multipletasks attached to same reservation  POSIX Fixed Priority scheduling inside each reservation  Multi-processor reservations  Partitionedscheduling for improved efficiency  Migration of tasks among CPUs  Simple admission control Tommaso Cucinotta – Real-Time System Laboratory – Scuola Superiore Sant'Anna – Pisa – Italy
  • 10. IRMOS RT Scheduler Design Goals  Replace real-time throttling  Tight integration in Linux kernel  Modification to the Linux RT scheduler  Reuseas many Linux features as possible  Management of task hierarchies and scheduling parameters via cgroups  POSIX compatibility and API  Efficient for SMP  Independent runqueues Tommaso Cucinotta – Real-Time System Laboratory – Scuola Superiore Sant'Anna – Pisa – Italy
  • 11. IRMOS Scheduler  Slicethe available computing power into reservations CPU 0 CPU 1 CPU 2 CPU 3 Tommaso Cucinotta – Real-Time System Laboratory – Scuola Superiore Sant'Anna – Pisa – Italy
  • 12. Hierarchical Scheduling  Partitioned CBS Fixed Priority Scheduling Of Tasks Partitioned Deadline-Based Scheduling Fixed Priority Of Entities (groups) Scheduling Of Tasks CPU0 CPU0 Tommaso Cucinotta – Real-Time System Laboratory – Scuola Superiore Sant'Anna – Pisa – Italy
  • 13. Multi-processor Scheduling  Group-wide POSIX Fixed-Priority  SCHED_RR, SCHED_FIFO both possible  With M CPUs, if N ≤ M partitioned reservations are scheduled, then the N highest priority tasks in the group concurrently run push pull Tommaso Cucinotta – Real-Time System Laboratory – Scuola Superiore Sant'Anna – Pisa – Italy
  • 14. Outline  About the IRMOS Project  IRMOS Real-Time Scheduler  Tutorial Session  Conclusions Tommaso Cucinotta – Real-Time System Laboratory – Scuola Superiore Sant'Anna – Pisa – Italy
  • 15. Installation  Install binary kernel package(s)  Download the RPM/DEB binary kernel packages  Go to the AQuoSA website: http://aquosa.sourceforge.net  Follow Downloads → Get AQuoSA → kernel-binaries  Compile from kernel sources  Download Linux 2.6.30.10  wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.30.10.tar.bz2  tar -xjf linux-2.6.30.10.tar.bz2  cd linux-2.6.30.10  Download the IRMOS patch  Go to the AQuoSA website: http://aquosa.sourceforge.net  Follow Downloads → Get AQuoSA → kernel-patches  Apply the patch  patch -p1 < /path/to/linux-2.6.30.10-irmos-1.0.patch Tommaso Cucinotta – Real-Time System Laboratory – Scuola Superiore Sant'Anna – Pisa – Italy
  • 16. Configuration  Configure, compile, install kernel  make menuconfig; make -j4; sudo make modules_install; sudo make install  Needed kernel compile-time options  RT_GROUP_SCHED  GROUP_SCHED  CGROUPS  CGROUP_SCHED  EXPERIMENTAL  CONFIG_PREEMPT (recommended)  CGROUP_CPUACCT (recommended)  SCHED_DEBUG (recommended)  HIGH_RES_TIMERS  HZ_1000 (suggested)  Run-time tunable options (recommended)  mount -t debugfs debugfs /sys/kernel/debug/  echo NO_RUNTIME_BALANCING > /sys/kernel/debug/sched_features  echo HRTICK > /sys/kernel/debug/sched_features Tommaso Cucinotta – Real-Time System Laboratory – Scuola Superiore Sant'Anna – Pisa – Italy
  • 17. Group Management  Pre-requisite at run-time: mount cgroups  mkdir /cg  mount -t cgroup -o cpu,cpuacct cgroup /cg  Reduce runtime for root-level tasks  echo 200000 > /cg/cpu.rt_rt_task_runtime_us (root-group runtime remains at default of 950000)  Create group, with reservation of 10ms every 100ms  mkdir /cg/g1  echo 100000 > /cg/g1/cpu.rt_period_us  echo 10000 > /cg/g1/cpu.rt_runtime_us  echo 100000 > /cg/g1/cpu.rt_task_period_us  echo 10000 > /cg/g1/cpu.rt_task_runtime_us  Attach task with tid=1421  echo 1421 > /cg/g1/tasks  Detach task  echo 1421 > /cg/tasks  Attach process with pid=1700  for tid in `ls /proc/1700/task`; do echo $tid > /cg/g1/tasks; done  Destroy group  rmdir /cg/g1 Tommaso Cucinotta – Real-Time System Laboratory – Scuola Superiore Sant'Anna – Pisa – Italy
  • 18. POSIX Priorities  After attachment to a group  tasks are still SCHED_OTHER  Need to set real-time scheduling  Class (SCHED_RR or SCHED_FIFO)  Priority  Task 1421 at SCHED_RR with rtprio=20  chrt -r -p 20 1421  Return at SCHED_OTHER  chrt -o -p 1421  Process 1700 at SCHED_RR  for tid in `ls /proc/1700/task`; do chrt -o -p $tid; done Tommaso Cucinotta – Real-Time System Laboratory – Scuola Superiore Sant'Anna – Pisa – Italy
  • 19. Things easier with AQuoSA  Create group, with reservation of 10ms every 100ms  qres create q=10000 p=100000 SID of new server: 1  Attach task with tid=1421  qres attach sid=1 tid=1421  Detach task  qres detach sid=1 tid=1421  Attach process with pid=1700 aquosa aquosa  qres attach sid=1 pid=1700 qres qres manager manager …  Destroy group  qres destroy sid=1 AQuoSA qosres API AQuoSA qosres API  All-in-one command ioctl() cgroups  qres create q=30000 p=100000 attach tid=1421  Wrap an entire process at start AQuoSA AQuoSA IRMOS IRMOS  qres create q=30000 p=100000 wrap qemu-kvm … scheduler scheduler scheduler scheduler Tommaso Cucinotta – Real-Time System Laboratory – Scuola Superiore Sant'Anna – Pisa – Italy
  • 20. Outline  About the IRMOS Project  IRMOS Real-Time Scheduler  Tutorial Session  Conclusions Tommaso Cucinotta – Real-Time System Laboratory – Scuola Superiore Sant'Anna – Pisa – Italy
  • 21. Conclusions  IRMOS real-time scheduler  Hierarchical EDF/FP scheduling  Multi-processor reservations  User-space interface based on cgroups  Things to improve  Kernel-space ↔ User-space communic.  Access-control model  Add a desired budget for adaptive reservation  Soft reservations  We're working on it  Stay tuned  http://aquosa.sourceforge.net  http://retis.sssup.it/~tommaso  http://retis.sssup.it/~fabio Tommaso Cucinotta – Real-Time System Laboratory – Scuola Superiore Sant'Anna – Pisa – Italy
  • 22. Related Publications  Hierarchical Multiprocessor CPU Reservations for the Linux Kernel F. Checconi, T. Cucinotta, D. Faggioli, G. Lipari OSPERT 2009, Dublin, Ireland, June 2009  Access Control for Adaptive Reservations on Multi-User Systems T. Cucinotta RTAS 2008, St. Louis, MO, United States, April 2008  Self-tuning Schedulers for Legacy Real-Time Applications T. Cucinotta, F. Checconi, L. Abeni, L. Palopoli EuroSys 2010, Paris, April 2010  Respecting temporal constraints in virtualised services T. Cucinotta, G. Anastasi, L. Abeni RTSOAA 2009, Seattle, Washington, July 2009 Tommaso Cucinotta – Real-Time System Laboratory – Scuola Superiore Sant'Anna – Pisa – Italy
  • 23. 1st International Workshop on Analysis Tools and Methodologies for Embedded and Real-time Systems Bruxelles, July 20th 2010 Thank you! Tommaso Cucinotta Further Information Scuola Superiore http://www.irmosproject.eu Sant'Anna cucinotta at sssup.it The research leading to these results has received funding from the European Commission Seventh Framework Programme FP7/2007-2011 under grant agreement n° 214777