SlideShare ist ein Scribd-Unternehmen logo
1 von 42
Downloaden Sie, um offline zu lesen
RETIS Lab
               Real-Time Systems Laboratory

    “Self-tuning Schedulers for Legacy Real-
               Time Applications”




Tommaso Cucinotta, Fabio Checconi    Luca Abeni, Luigi Palopoli
   Real-Time Systems Laboratory         University of Trento
    Scuola Superiore Sant'Anna
Introduction and motivations




Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna
                                                                        © 2007 Scuola Superiore
Motivations

    General-Purpose Operating Systems
      Very effective for storing & managing multimedia contents

      Designed for
          • average-case performance

          • serving applications on a best-effort basis

      They are not the best candidate for serving real-time
       applications with tight timing constraints
          • nor for real-time multimedia


Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna
                                                                        © 2007 Scuola Superiore
Motivations

    Overcoming limitations of a GPOS for multimedia
      Large buffers used to compensate unpredictability
          • ==> poor real-time interactivity and no low-latency multimedia

      One-application one-system paradigm
          • For example, for low-latency real-time audio processing (jack),
             gaming, CD/DVD burning, etc...

      POSIX real-time extensions
          • Priority-based, no temporal isolation
          • Not appropriate for deploying the multitude of (soft) real-time
             applications populating the systems of tomorrow
Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna
                                                                        © 2007 Scuola Superiore
Motivations
    Recent developments in GPOS CPU scheduling
      EDF-based real-time scheduling with temporal isolation
          • Better utilization of resources
          • Independent applications are isolated from the temporal perspective

      Various APIs for accessing the enhanced functionality
          • For example, the FRSH API from
          • For example, the API from

      They require modifications of the applications
          • at the source-code level

      What about legacy multimedia applications ?
Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna
                                                                        © 2007 Scuola Superiore
Research objectives
     This research aims to
       allow (legacy) real-time periodic applications
       to benefit of real-time scheduling facilities increasingly
         available on a GPOS
       without any change in the application source-code




Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna
                                                                        © 2007 Scuola Superiore
Proposed approach




Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna
                                                                        © 2007 Scuola Superiore
Proposed approach – LFS++

                                                     Application
                                                     Application


                Monitor
                Monitor




                                                                                    Kernel
                                        Scheduling
                                        Scheduling                 Real-Time
                                                                   Real-Time
                                        Parameters
                                        Parameters                 Scheduler
                                                                   Scheduler




Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna
                                                                        © 2007 Scuola Superiore
Proposed approach

    Legacy Feedback Scheduling (LFS++)
      An appropriate tracing mechanism observes the

         application, inferring main parameters affecting a (periodic)
         multimedia application temporal behaviour:
          • job execution time
          • period

      Scheduling guarantees are automatically provisioned by

         the OS, according to proper scheduling parameters
          • Based on sound arguments from real-time theory

Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna
                                                                        © 2007 Scuola Superiore
Proposed approach

Comprehensive view
   Application tracing

   Period estimation (events analysis)

   On-line WCET estimation

   Automagic provisioning of
     scheduling guarantees




Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna
                                                                        © 2007 Scuola Superiore
Real-time theory

    Reservation-based scheduling: (Qi, Pi)
      “Qi time units guaranteed on CPU every Pi time units”


         (5, 8)

                                                                t
         (2, 6)

    Real-time throttling on Linux is different
      Only constraint to “no more than Qi every system-wide P”

Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna
                                                                        © 2007 Scuola Superiore
Real-time theory

    Known results from the real-time theory
      Not all (Q, P) with
       a given Q/P are
       equal
      Highlighted by
       the shown
       supply-bound
       function




Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna
                                                                        © 2007 Scuola Superiore
Real-time theory

What are the reservation
parameters needed for
correctly scheduling a real-
time periodic task with
assigned WCET and period ?


The minimum reservation
utilization is achieved

   when the reservation period

     equals the task period

       • or any integer sub-
         multiple
Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna
                                                                        © 2007 Scuola Superiore
Core problem

    How to detect the application period ?
      Of a legacy real-time application (no source-code
       availability, no modifications)

    Proposed approach
      Tracing the application behaviour at run-time

      For the purpose of identifying “periodicity patterns”




Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna
                                                                        © 2007 Scuola Superiore
Legacy application tracing

    Tracing legacy multimedia application
      Tracing what the application does
          • What system calls it periodically calls
               – Waiting, reading time information, posting timers, disk operations,
                  network operations, etc...

      Tracing how the application behaves temporally
          • When it suspends and resumes

    Results obtained with system-call tracing

Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna
                                                                        © 2007 Scuola Superiore
Legacy application tracing

    Available mechanisms
      strace Linux utility
          • Designed as debugging helper, too much overhead due to the
             generation of unneeded data

      ptrace() system call
          • Allows an external process to trace the execution of a target
             process, forcing it to stop at each entry and exit of a system call

    We developed qtrace
      A low-overhead kernel-level system-call tracer
Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna
                                                                        © 2007 Scuola Superiore
Why a custom tracer

    The ptrace() ping-pong

                     Application
                     Application                 Tracer
                                                 Tracer      Kernel
                                                             Kernel


                                usleep() begin
                                    signal
                                          usleep()
                                                             
                                             timer

                                 usleep() end
                                    signal


Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna
                                                                        © 2007 Scuola Superiore
Period detection

  The tracer produces a sequence of time-stamps




  Time-stamps used to compute a Fourier-transform




  A heuristic catches the first harmonic
Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna
                                                                        © 2007 Scuola Superiore
Heuristic

    Start from the Fourier Transform sampled at  f




Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna
                                                                        © 2007 Scuola Superiore
Heuristic

    Identify local maxima of the Fourier Transform




Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna
                                                                        © 2007 Scuola Superiore
Heuristic

    Select peaks higher than  times average value




Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna
                                                                        © 2007 Scuola Superiore
Heuristic

  Accumulate FT of up to kmax multiples of each peak




Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna
                                                                        © 2007 Scuola Superiore
Budget identification
  “Feedback-based scheduling” budget control loop




Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna
                                                                        © 2007 Scuola Superiore
Experimental results




Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna
                                                                        © 2007 Scuola Superiore
Experimental results
    Set-up
      Linux 2.6.29, with an implementation of the CBS scheduler
      Feedback-scheduling by means of AQuoSA
      mplayer
          • modified to monitor the Inter-Frame Time (IFT) and
      Application tracing by using qtrace (kernel-level)
    Validation metrics
      Inter-Frame Time (for mplayer)
      A/V desynchronisation (for mplayer)
      Response-time (for synthetic application)
      Allocated bandwidth on the Real-Time scheduler

Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna
                                                                        © 2007 Scuola Superiore
Experimental results

    Using the correct reservation period is better




Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna
                                                                        © 2007 Scuola Superiore
Benefits for the application
                        (LFS++ improves over Linux)
    A/V desynchronisation in mplayer while starting
    the Eclipse IDE
      90% reduction of the peak A/V desynchronisation




Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna
                                                                        © 2007 Scuola Superiore
Benefits for the application
                        (LFS++ improves over Linux)

    CDF of response-times with a 80% loaded system
      Using a synthetic real-time periodic application load




Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna
                                                                        © 2007 Scuola Superiore
LFS++ improves over LFS
                                  (our prior work)

  Inter-frame times of mplayer are much more stable




Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna
                                                                        © 2007 Scuola Superiore
LFS++ improves over LFS
                                  (our prior work)

Inter-frame times CDF
is tighter with LFS++




Allocated bandwidth
CDF is tighter with
LFS++




Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna
                                                                        © 2007 Scuola Superiore
Multiple LFS++ instances
    Frequency misdetection degree with other LFS++
    controllers already active
      New application runs without guarantees while traced




Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna
                                                                        © 2007 Scuola Superiore
Experimental results

    Precision of the frequency detection heuristic
      acceptable even with 0.5s of observation-time

      detected frequency rock-stable from 1.5s observation-time




Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna
                                                                        © 2007 Scuola Superiore
Experimental results
  PMF of detected
  frequency when
  observation-time
  goes
    From 0.2 ms




    To 2 s



Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna
                                                                        © 2007 Scuola Superiore
The bill




Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna
                                                                        © 2007 Scuola Superiore
Cost of tracing
    Tracing overhead
      When using strace: +5,51%
      When using qostrace: +2,69% (previous paper)
      When usinig qtrace: +0.63% (kernel-level tracer)

         88.57% overhead reduction with the custom tracer




Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna
                                                                        © 2007 Scuola Superiore
Cost of Fourier Transform

  Fourier Transform Overhead
     1ms to 25ms, depending on parameters (and accuracy)

     Linear in the observation-time and f parameter (as expected)




Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna
                                                                        © 2007 Scuola Superiore
Cost of Fourier Transform

  Fourier Transform Overhead
     1ms to 25ms, depending on parameters (and accuracy)

     Linear in the observation-time and f parameter (as expected)




Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna
                                                                        © 2007 Scuola Superiore
Conclusions




Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna
                                                                        © 2007 Scuola Superiore
Future work

  Better engineering of the tracer

     Tracing of wake-up times instead of system calls

         • done in submitted journal extension – improved heuristic
           precision at reduced observation times

     Security issues: tracing data queried via ioctl() on special device

  Integration with power-management

     Supporting dynamic CPU frequency switching

         • done in submitted journal extension – need cooperation
           between LFS++ schedulers and OS daemon for power
           management
Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna
                                                                        © 2007 Scuola Superiore
Future work

    Guaranteeing multi-threaded applications
      e.g., VideoLAN Coder (vlc)
      Only marginally tested
      Main problem with inter-dependencies
          • Plan to use bandwidth inheritance techniques

    Multi-core systems
      All experiments on a single-CPU machine
    Feedback-based budget control
      Closer cooperation with the scheduler for quicker response to
       workload increases


Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna
                                                                        © 2007 Scuola Superiore
Related readings

 Tommaso Cucinotta, Luca Abeni, Luigi Palopoli, Fabio Checconi, "The Wizard of OS:

   a Heartbeat for Legacy Multimedia Applications," in Proceedings of the 7th IEEE
   Workshop on Embedded Systems for Real-Time Multimedia, Grenoble (ESTImedia
   2009), Grenoble, October 2009

 Luigi Palopoli, Tommaso Cucinotta, Luca Marzario, Giuseppe Lipari, "AQuoSA -

   Adaptive Quality of Service Architecture," Software: Practice and Experience,
   April 2008, doi 10.1002/spe.883

 Fabio Checconi, Tommaso Cucinotta, Dario Faggioli, Giuseppe Lipari, "Hierarchical

   Multiprocessor CPU Reservations for the Linux Kernel," in Proceedings of the 5th
   International Workshop on Operating Systems Platforms for Embedded Real-Time
   Applications (OSPERT 2009), Dublin, Ireland, June 2009

Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna
                                                                        © 2007 Scuola Superiore
Thanks for your attention




                                  Questions ?

      http://retis.sssup.it/people/tommaso


Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna
                                                                        © 2007 Scuola Superiore

Weitere ähnliche Inhalte

Ähnlich wie Self-tuning Schedulers for Legacy Real-Time Applications

The IRMOS Real-Time Scheduler
The IRMOS Real-Time SchedulerThe IRMOS Real-Time Scheduler
The IRMOS Real-Time Schedulertcucinotta
 
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
 
Building IT with Precision - SUSE Linux Enterprise Real Time
Building IT with Precision - SUSE Linux Enterprise Real TimeBuilding IT with Precision - SUSE Linux Enterprise Real Time
Building IT with Precision - SUSE Linux Enterprise Real TimeJeff Reser
 
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
 
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
 
Real Time Operating Systems
Real Time Operating SystemsReal Time Operating Systems
Real Time Operating SystemsPawandeep Kaur
 
Real Time Systems
Real Time SystemsReal Time Systems
Real Time Systemsleo3004
 
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
 
Employment Hero monitoring solution
Employment Hero monitoring solutionEmployment Hero monitoring solution
Employment Hero monitoring solutionLuong Vo
 
On Tune Performance Monitoring
On Tune Performance MonitoringOn Tune Performance Monitoring
On Tune Performance MonitoringTeemStone Pty Ltd
 
Real time operating-systems
Real time operating-systemsReal time operating-systems
Real time operating-systemskasi963
 
NICS Puppet Case Study
NICS Puppet Case StudyNICS Puppet Case Study
NICS Puppet Case StudyPuppet
 
pptonrtosbychetan001-140213003314-phpapp02.pdf
pptonrtosbychetan001-140213003314-phpapp02.pdfpptonrtosbychetan001-140213003314-phpapp02.pdf
pptonrtosbychetan001-140213003314-phpapp02.pdfJaganBehera8
 
presentation on real time operating system(RTOS's)
presentation on real time operating system(RTOS's)presentation on real time operating system(RTOS's)
presentation on real time operating system(RTOS's)chetan mudenoor
 
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 Systemsjeronimored
 
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
 

Ähnlich wie Self-tuning Schedulers for Legacy Real-Time Applications (20)

Real-Time API
Real-Time APIReal-Time API
Real-Time API
 
The IRMOS Real-Time Scheduler
The IRMOS Real-Time SchedulerThe IRMOS Real-Time Scheduler
The IRMOS Real-Time Scheduler
 
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...
 
Building IT with Precision - SUSE Linux Enterprise Real Time
Building IT with Precision - SUSE Linux Enterprise Real TimeBuilding IT with Precision - SUSE Linux Enterprise Real Time
Building IT with Precision - SUSE Linux Enterprise Real Time
 
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
 
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
 
Rt kernel-prn
Rt kernel-prnRt kernel-prn
Rt kernel-prn
 
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...
 
Real Time Operating Systems
Real Time Operating SystemsReal Time Operating Systems
Real Time Operating Systems
 
Real Time Systems
Real Time SystemsReal Time Systems
Real Time Systems
 
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
 
Employment Hero monitoring solution
Employment Hero monitoring solutionEmployment Hero monitoring solution
Employment Hero monitoring solution
 
On Tune Performance Monitoring
On Tune Performance MonitoringOn Tune Performance Monitoring
On Tune Performance Monitoring
 
Real time operating-systems
Real time operating-systemsReal time operating-systems
Real time operating-systems
 
NICS Puppet Case Study
NICS Puppet Case StudyNICS Puppet Case Study
NICS Puppet Case Study
 
pptonrtosbychetan001-140213003314-phpapp02.pdf
pptonrtosbychetan001-140213003314-phpapp02.pdfpptonrtosbychetan001-140213003314-phpapp02.pdf
pptonrtosbychetan001-140213003314-phpapp02.pdf
 
presentation on real time operating system(RTOS's)
presentation on real time operating system(RTOS's)presentation on real time operating system(RTOS's)
presentation on real time operating system(RTOS's)
 
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
 
10.1.1.85.7969
10.1.1.85.796910.1.1.85.7969
10.1.1.85.7969
 
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
 

Kürzlich hochgeladen

Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024SynarionITSolutions
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Principled Technologies
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 

Kürzlich hochgeladen (20)

Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 

Self-tuning Schedulers for Legacy Real-Time Applications

  • 1. RETIS Lab Real-Time Systems Laboratory “Self-tuning Schedulers for Legacy Real- Time Applications” Tommaso Cucinotta, Fabio Checconi Luca Abeni, Luigi Palopoli Real-Time Systems Laboratory University of Trento Scuola Superiore Sant'Anna
  • 2. Introduction and motivations Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna © 2007 Scuola Superiore
  • 3. Motivations General-Purpose Operating Systems  Very effective for storing & managing multimedia contents  Designed for • average-case performance • serving applications on a best-effort basis  They are not the best candidate for serving real-time applications with tight timing constraints • nor for real-time multimedia Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna © 2007 Scuola Superiore
  • 4. Motivations Overcoming limitations of a GPOS for multimedia  Large buffers used to compensate unpredictability • ==> poor real-time interactivity and no low-latency multimedia  One-application one-system paradigm • For example, for low-latency real-time audio processing (jack), gaming, CD/DVD burning, etc...  POSIX real-time extensions • Priority-based, no temporal isolation • Not appropriate for deploying the multitude of (soft) real-time applications populating the systems of tomorrow Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna © 2007 Scuola Superiore
  • 5. Motivations Recent developments in GPOS CPU scheduling  EDF-based real-time scheduling with temporal isolation • Better utilization of resources • Independent applications are isolated from the temporal perspective  Various APIs for accessing the enhanced functionality • For example, the FRSH API from • For example, the API from  They require modifications of the applications • at the source-code level  What about legacy multimedia applications ? Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna © 2007 Scuola Superiore
  • 6. Research objectives This research aims to  allow (legacy) real-time periodic applications  to benefit of real-time scheduling facilities increasingly available on a GPOS  without any change in the application source-code Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna © 2007 Scuola Superiore
  • 7. Proposed approach Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna © 2007 Scuola Superiore
  • 8. Proposed approach – LFS++ Application Application Monitor Monitor Kernel Scheduling Scheduling Real-Time Real-Time Parameters Parameters Scheduler Scheduler Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna © 2007 Scuola Superiore
  • 9. Proposed approach Legacy Feedback Scheduling (LFS++)  An appropriate tracing mechanism observes the application, inferring main parameters affecting a (periodic) multimedia application temporal behaviour: • job execution time • period  Scheduling guarantees are automatically provisioned by the OS, according to proper scheduling parameters • Based on sound arguments from real-time theory Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna © 2007 Scuola Superiore
  • 10. Proposed approach Comprehensive view  Application tracing  Period estimation (events analysis)  On-line WCET estimation  Automagic provisioning of scheduling guarantees Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna © 2007 Scuola Superiore
  • 11. Real-time theory Reservation-based scheduling: (Qi, Pi)  “Qi time units guaranteed on CPU every Pi time units” (5, 8) t (2, 6) Real-time throttling on Linux is different  Only constraint to “no more than Qi every system-wide P” Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna © 2007 Scuola Superiore
  • 12. Real-time theory Known results from the real-time theory  Not all (Q, P) with a given Q/P are equal  Highlighted by the shown supply-bound function Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna © 2007 Scuola Superiore
  • 13. Real-time theory What are the reservation parameters needed for correctly scheduling a real- time periodic task with assigned WCET and period ? The minimum reservation utilization is achieved  when the reservation period equals the task period • or any integer sub- multiple Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna © 2007 Scuola Superiore
  • 14. Core problem How to detect the application period ?  Of a legacy real-time application (no source-code availability, no modifications) Proposed approach  Tracing the application behaviour at run-time  For the purpose of identifying “periodicity patterns” Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna © 2007 Scuola Superiore
  • 15. Legacy application tracing Tracing legacy multimedia application  Tracing what the application does • What system calls it periodically calls – Waiting, reading time information, posting timers, disk operations, network operations, etc...  Tracing how the application behaves temporally • When it suspends and resumes Results obtained with system-call tracing Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna © 2007 Scuola Superiore
  • 16. Legacy application tracing Available mechanisms  strace Linux utility • Designed as debugging helper, too much overhead due to the generation of unneeded data  ptrace() system call • Allows an external process to trace the execution of a target process, forcing it to stop at each entry and exit of a system call We developed qtrace  A low-overhead kernel-level system-call tracer Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna © 2007 Scuola Superiore
  • 17. Why a custom tracer The ptrace() ping-pong Application Application Tracer Tracer Kernel Kernel usleep() begin signal usleep()    timer usleep() end signal Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna © 2007 Scuola Superiore
  • 18. Period detection The tracer produces a sequence of time-stamps Time-stamps used to compute a Fourier-transform A heuristic catches the first harmonic Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna © 2007 Scuola Superiore
  • 19. Heuristic Start from the Fourier Transform sampled at  f Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna © 2007 Scuola Superiore
  • 20. Heuristic Identify local maxima of the Fourier Transform Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna © 2007 Scuola Superiore
  • 21. Heuristic Select peaks higher than  times average value Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna © 2007 Scuola Superiore
  • 22. Heuristic Accumulate FT of up to kmax multiples of each peak Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna © 2007 Scuola Superiore
  • 23. Budget identification “Feedback-based scheduling” budget control loop Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna © 2007 Scuola Superiore
  • 24. Experimental results Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna © 2007 Scuola Superiore
  • 25. Experimental results Set-up  Linux 2.6.29, with an implementation of the CBS scheduler  Feedback-scheduling by means of AQuoSA  mplayer • modified to monitor the Inter-Frame Time (IFT) and  Application tracing by using qtrace (kernel-level) Validation metrics  Inter-Frame Time (for mplayer)  A/V desynchronisation (for mplayer)  Response-time (for synthetic application)  Allocated bandwidth on the Real-Time scheduler Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna © 2007 Scuola Superiore
  • 26. Experimental results Using the correct reservation period is better Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna © 2007 Scuola Superiore
  • 27. Benefits for the application (LFS++ improves over Linux) A/V desynchronisation in mplayer while starting the Eclipse IDE  90% reduction of the peak A/V desynchronisation Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna © 2007 Scuola Superiore
  • 28. Benefits for the application (LFS++ improves over Linux) CDF of response-times with a 80% loaded system  Using a synthetic real-time periodic application load Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna © 2007 Scuola Superiore
  • 29. LFS++ improves over LFS (our prior work) Inter-frame times of mplayer are much more stable Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna © 2007 Scuola Superiore
  • 30. LFS++ improves over LFS (our prior work) Inter-frame times CDF is tighter with LFS++ Allocated bandwidth CDF is tighter with LFS++ Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna © 2007 Scuola Superiore
  • 31. Multiple LFS++ instances Frequency misdetection degree with other LFS++ controllers already active  New application runs without guarantees while traced Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna © 2007 Scuola Superiore
  • 32. Experimental results Precision of the frequency detection heuristic  acceptable even with 0.5s of observation-time  detected frequency rock-stable from 1.5s observation-time Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna © 2007 Scuola Superiore
  • 33. Experimental results PMF of detected frequency when observation-time goes  From 0.2 ms  To 2 s Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna © 2007 Scuola Superiore
  • 34. The bill Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna © 2007 Scuola Superiore
  • 35. Cost of tracing Tracing overhead  When using strace: +5,51%  When using qostrace: +2,69% (previous paper)  When usinig qtrace: +0.63% (kernel-level tracer) 88.57% overhead reduction with the custom tracer Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna © 2007 Scuola Superiore
  • 36. Cost of Fourier Transform Fourier Transform Overhead  1ms to 25ms, depending on parameters (and accuracy)  Linear in the observation-time and f parameter (as expected) Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna © 2007 Scuola Superiore
  • 37. Cost of Fourier Transform Fourier Transform Overhead  1ms to 25ms, depending on parameters (and accuracy)  Linear in the observation-time and f parameter (as expected) Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna © 2007 Scuola Superiore
  • 38. Conclusions Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna © 2007 Scuola Superiore
  • 39. Future work Better engineering of the tracer  Tracing of wake-up times instead of system calls • done in submitted journal extension – improved heuristic precision at reduced observation times  Security issues: tracing data queried via ioctl() on special device Integration with power-management  Supporting dynamic CPU frequency switching • done in submitted journal extension – need cooperation between LFS++ schedulers and OS daemon for power management Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna © 2007 Scuola Superiore
  • 40. Future work Guaranteeing multi-threaded applications  e.g., VideoLAN Coder (vlc)  Only marginally tested  Main problem with inter-dependencies • Plan to use bandwidth inheritance techniques Multi-core systems  All experiments on a single-CPU machine Feedback-based budget control  Closer cooperation with the scheduler for quicker response to workload increases Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna © 2007 Scuola Superiore
  • 41. Related readings  Tommaso Cucinotta, Luca Abeni, Luigi Palopoli, Fabio Checconi, "The Wizard of OS: a Heartbeat for Legacy Multimedia Applications," in Proceedings of the 7th IEEE Workshop on Embedded Systems for Real-Time Multimedia, Grenoble (ESTImedia 2009), Grenoble, October 2009  Luigi Palopoli, Tommaso Cucinotta, Luca Marzario, Giuseppe Lipari, "AQuoSA - Adaptive Quality of Service Architecture," Software: Practice and Experience, April 2008, doi 10.1002/spe.883  Fabio Checconi, Tommaso Cucinotta, Dario Faggioli, Giuseppe Lipari, "Hierarchical Multiprocessor CPU Reservations for the Linux Kernel," in Proceedings of the 5th International Workshop on Operating Systems Platforms for Embedded Real-Time Applications (OSPERT 2009), Dublin, Ireland, June 2009 Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna © 2007 Scuola Superiore
  • 42. Thanks for your attention Questions ? http://retis.sssup.it/people/tommaso Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna © 2007 Scuola Superiore