SlideShare uma empresa Scribd logo
1 de 57
Baixar para ler offline
RETIS Lab
                  Real-Time Systems Laboratory




                   Research in
    Soft Real-Time and Virtualized Applications
                     on Linux


                            Tommaso Cucinotta
                       Real-Time Systems Lab (RETIS)
Center for Excellence in Information, Communication and Perception Engineering
                                    (CEIICP)
                   Scuola Superiore Sant'Anna, Pisa (Italy)
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, plant control, 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
Real-time theory

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


         (5, 9)                                                              ~88.9%
                                                                t            Overall
                                                                             Load
         (2, 6)
                                                                t
      Independently of how others behave
       (temporal isolation)


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

    Is needed despite blocks/unblocks
      Not only EDF scheduling
                                         block      unblock


         (5, 9)
                                                                   t
                                                                       deadline-miss

         (2, 6)
                                                                   t




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

    Is needed despite blocks/unblocks
      Not only EDF scheduling
                                         block      unblock


         (5, 9)
                                                                          t

         (2, 6)
                                                                          t
    See CBS “unblock rule”


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

    Enforcement of temporal isolation
      Not only EDF scheduling
                                             bad job

         (5, 9)
                                                                      t
                                                                           deadline missed
                                                                             by good job
         (2, 6)
                                                                      t




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

    Enforcement of temporal isolation
      Once budget exhausted, delay to next activation period
                                                                           Deadline missed
                                             bad job                         by bad job

         (5, 9)
                                                                                     t

         (2, 6)
                                                                                      t




Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna
                                                                        © 2007 Scuola Superiore
Linux and T.I.

    Need for T.I. evident in mainline Linux
      A (buggy) real-time task can starve the entire OS
      Real-time throttling prevents this to happen
    Real-Time Throttling
      Different design principles
          • Priority-based scheduling
          • Constraints to “no more than Qi every system-wide P”
          • Behaves like “Deferrable Servers”




Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna
                                                                        © 2007 Scuola Superiore
Making Linux a better place

               (for multimedia and soft real-time applications)




Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna
                                                                        © 2007 Scuola Superiore
Real-Time Scheduling in
                          Linux
    Linux
      Not a Hard Real-Time OS
      Monolithic structure
          • Device drivers may adversely affect responsiveness

    Advances in Linux temporal behavior (responsiv.)
      Preemptability of kernel-space code
      High-resolution timers
      Increasing use of RCU primitives
      Nearly complete support for POSIX real-time extensions
          • Sporadic Server is missing (!)
      IRQ handlers as kernel threads (preempt-rt branch)
Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna
                                                                        © 2007 Scuola Superiore
Real-Time Scheduling in
                          Linux
    Research on Linux for Real-Time Systems
    at RETIS
      Applying techniques from Real-Time Systems to a GPOS
      Improving responsiveness and stability of performance
       for time-sensitive applications
      Investigating effectiveness of Adaptive Reservations
      Synchronization protocols for real-time multimedia
      Stabilising performance of virtualized applications
      Isolating computing and I/O traffic for Virtual Machines
      Effective exploitation of multi-cores in real-time systems
      Programmability of multi-threaded, distributed, real-time
       applications (API)
Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna
                                                                        © 2007 Scuola Superiore
Real-Time Schedulers
                           for Linux
    Resource reservation scheduling in Linux
      Adaptive Quality of Service Architecture
          • Single-processor embedded systems
          • Multi-threaded applications
      Hybrid Deadline/Priority Scheduler
          • Multi-processor systems
          • Multi-threaded virtualized
            applications
      Partitioned/Global EDF Scheduler
       SCHED_DEADLINE
          • Multi-processor systems
          • Single-threaded control
            applications
Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna
                                                                        © 2007 Scuola Superiore
Adaptive Quality of Service
                Architecture for Linux




Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna
                                                                        © 2007 Scuola Superiore
Framework for Real-time Embedded
                     Systems based on COntRacts

    Soft and hard real-time
    Support for CPU, disk, network
    Distributed real-time systems
    Portability across RTOSs
    Adaptive real-time systems
    Application-level QoS control
    QoS power-aware optimization
    Atomic negotiations




    http://www.frescor.org

Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna
                                                                        © 2007 Scuola Superiore
Experimental results
                   (Pentium 4 @ 2GHz, Linux 2.6.29.1 + AQuoSA)


    Response-time CDF for the
    real-time task with the




                                                                              deadline
    shortest period under light
    load (48%)




    Response-time CDF for the
    real-time task with the




                                                                             deadline
    shortest period under heavy
    load (84%)




Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna
                                                                        © 2007 Scuola Superiore
Experimental results
                   (Pentium 4 @ 2GHz, Linux 2.6.29.1 + AQuoSA)


   Average normalized tardiness
   for the real-time task with the
   shortest period, varying the
   number of real-time tasks in
                                                  deadline
   the system.




   Maximum and 95th percentile
   of the normalized tardiness
   for the real-time task with the
   shortest period, varying the
   number of real-time tasks in
   the system.
                                                   deadline




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

    Bandwidth Inheritance (BWI / M-BWI)
      Deals with Priority Inversion in EDF scheduling
      Deadline inherited from lock owner




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




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

    Computation times for decoding MPEG
    frames




    Scheduling error with an over-
    allocation of 30% over the average                  deadline




                                                        deadline

    Scheduling error with allocation tuned
    on maximum



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

    Feedback-based scheduling
      Sense: tracking of workload fluctuations
      Compute:
          • Prediction/estimation of workload for next period(s)
          • Compensation for possible current delays
      Actuate: adapt the scheduling parameters (Qi, Pi)




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

  Workload prediction
     Moving average
     Percentile estimation over moving window
     FIR decorrelation + error estimation
  Budget controller
     Target region around
      deadline
     Stochastic approaches
         • Probability of deadline-miss
         • Optimum error/bandwidth trade-offs


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

    PMF of scheduling error with various budget
    control strategies




Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna
                                                                        © 2007 Scuola Superiore
Automatic identification of scheduling parameters




Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna
                                                                        © 2007 Scuola Superiore
Automatic identification
                of scheduling parameters
    Recent developments in GPOS CPU scheduling
      Various APIs for accessing the enhanced functionality
          • For example, the FRSH API
          • For example, the AquoSA API

      They require modifications of the applications
          • at the source-code level
      Can we provide real-time guarantees to unmodified
       applications ?
          • For example, for legacy multimedia applications ?
          • Or, simply because of no time to modify the applications



Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna
                                                                        © 2007 Scuola Superiore
Objectives
     We actually can
       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
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, 9)

                                                                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

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
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
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
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
Precision of frequency
                           detector
  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
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
Research Activities at ReTiS




Real-Time Service-Oriented Architectures
     Virtualized Real-Time Multimedia




Tommaso Cucinotta – ReTiS – CEIICP – Scuola Superiore Sant'Anna

  Tommaso Cucinotta – ReTiS Lab – Scuola Superiore Sant'Anna – Pisa – Italy   45
Introduction

Virtualization & real-time increasingly interesting
   Wide availability of broadband connections ==>
    shift in computing paradigms towards distributed
    computing
       Not only remote storage and batch processing

       But also remote processing for interactive applications

   Examples
       Virtual Reality with heavyweight physics simulations

       Distributed editing of HD video (film post-production)
         Tommaso Cucinotta – ReTiS Lab – Scuola Superiore Sant'Anna – Pisa – Italy   46
Introduction

Service-Oriented Architectures
   Promising approach to distributed computing
   Taking advantage from virtualization techniques:
       Location independence

       Security

       Fault-Tolerance
   Distributed Interactive/Real-Time Applications may
    benefit from SOA design

         Tommaso Cucinotta – ReTiS Lab – Scuola Superiore Sant'Anna – Pisa – Italy   47
Problems

Issues in deploying RT SW Components in VMs
   Execution time
       Virtualisation overhead: intensive I/O on virtualised peripherals
   Benchmarking
       A VM may be deployed on different HW (SOA scenario)
        – How to achieve predictable performance ?

       VMs may be deployed on General-Purpose HW (with cache)
        – How to account for HW-level interferences ?



         Tommaso Cucinotta – ReTiS Lab – Scuola Superiore Sant'Anna – Pisa – Italy   48
Problems

Issues in deploying RT SW Components in VMs
   Scheduling and timing
       Host scheduling algorithm and VM layer impacts on the
        vision of time by guest OSes
        – Time granularity (for measuring time and setting timers)
        – Scheduling capabilities
        – Non-uniform progress-rate of applications
       SMP-enabled guests
        – Spin-lock primitives assume release of locks within very short time-frames
           » What happens if the lock-owner VM is descheduled ?
       Proper management of shared resources
        – What MP resource-sharing protocol is appropriate ?
          » Proper management of priority inversion
          » Reduced overheads (limited number of preemptions)
          » Run-time schedulability analysis and admission control

         Tommaso Cucinotta – ReTiS Lab – Scuola Superiore Sant'Anna – Pisa – Italy   49
Approach

Use of RR techniques for
scheduling multiple VMs
   Temporal isolation among
    VMs
   Deadline guarantees to tasks                       Hard Reservation
    within VMs
       hierarchical scheduling

Experimental set-up
   VMs scheduled by a
    modified Linux kernel implementing resource reservations


         Tommaso Cucinotta – ReTiS Lab – Scuola Superiore Sant'Anna – Pisa – Italy   50
Approach

Validation on modified Linux kernel
with SMP Resource Reservation Scheduler




    Tommaso Cucinotta – ReTiS Lab – Scuola Superiore Sant'Anna – Pisa – Italy   51
Experimental Results

SOA Scenario
   Response-times of Apache2 Web Server
       From unpredictable and highly variable
       To predictable and very stable (low fluctuations)
        – At the cost of an increased minimum response-time




         Tommaso Cucinotta – ReTiS Lab – Scuola Superiore Sant'Anna – Pisa – Italy   52
Security for Embedded
               (and Real-Time) Systems
Real-Time and Security
   Temporal encapsulation as a security feature
   Secure access to Real-Time scheduling services by
    unprivileged applications
   Optimum trade-offs between:
    Security, Quality of Service and Power Consumption




       Tommaso Cucinotta – ReTiS Lab – Scuola Superiore Sant'Anna – Pisa – Italy   53
Relevant Publications
                                 (from year 2009)
Journals
  A robust mechanism for adaptive scheduling of multimedia applications, Tommaso Cucinotta, Luca
   Abeni, Luigi Palopoli, Giuseppe Lipari, accepted on ACM Transactions on Embedded Computing
   Systems
  QoS Control for Pipelines of Tasks using Multiple Resources, Tommaso Cucinotta, Luigi Palopoli,
   IEEE Transactions on Computers, Vol. 53, No. 3, pp. 416--430, March 2010, IEEE Computer Society
   Digital Library
  A Real-time Service-Oriented Architecture for Industrial Automation, Tommaso Cucinotta, Antonio
   Mancina, Gaetano F. Anastasi, Giuseppe Lipari, Leonardo Mangeruca, Roberto Checcozzo, Fulvio
   Rusinà, to appear on IEEE Transactions on Industrial Informatics, Aug 2009
  AQuoSA - Adaptive Quality of Service Architecture, Luigi Palopoli, Tommaso Cucinotta, Luca
   Marzario, Giuseppe Lipari, Software: Practice and Experience, Vol. 39, No. 1, January 2009




         Tommaso Cucinotta – ReTiS Lab – Scuola Superiore Sant'Anna – Pisa – Italy              54
Relevant Publications
                                  (from year 2009)
Conferences/Workshops
  The Multiprocessor BandWidth Inheritance Protocol, Dario Faggioli, Giuseppe Lipari, Tommaso
   Cucinotta, to appear at the 22nd Euromicro Conference on Real-Time Systems (ECRTS 2010), Bruxelles,
   July 2010
  Self-tuning Schedulers for Legacy Real-Time Applications, Tommaso Cucinotta, Fabio Checconi, Luca
   Abeni, Luigi Palopoli, European Conference on Computer Systems (EuroSys 2010), Paris, April 2010
  The Wizard of OS: a Heartbeat for Legacy Multimedia Applications, Tommaso Cucinotta, Luca Abeni,
   Luigi Palopoli, Fabio Checconi, 7th IEEE Workshop on Embedded Systems for Real-Time Multimedia,
   Grenoble (ESTIMedia 2009), Grenoble, October 2009
  Multi-level feedback control for Quality of Service Management, Tommaso Cucinotta, Giuseppe Lipari,
   Luigi Palopoli, Luca Abeni, Rodrigo Santos, 14th IEEE International Conference on Emerging
   Technologies and Factory Automation (ETFA 2009), Mallorca, Spain, September 2009
  Exception-Based Management of Timing Constraints Violations for Soft Real-Time Applications,
   Tommaso Cucinotta, Dario Faggioli, Alessandro Evangelista, 5th International Workshop on Operating
   Systems Platforms for Embedded Real-Time Applications (OSPERT 2009), Dublin, Ireland, June 2009
  Hierarchical Multiprocessor CPU Reservations for the Linux Kernel, Fabio Checconi, Tommaso
   Cucinotta, Dario Faggioli, Giuseppe Lipari, 5th International Workshop on Operating Systems Platforms
   for Embedded Real-Time Applications (OSPERT 2009), Dublin, Ireland, June 2009
  Real-time guarantees in flexible advance reservations, Kleopatra Kostanteli, Dimosthenis Kyriazis,
   Theodora Varvarigou, Tommaso Cucinotta, Gaetano Anastasi, 2nd IEEE International Workshop on Real-
   Time Service-Oriented Architecture and Applications (RTSOAA 2009), Seattle, Washington, July 2009
  Respecting temporal constraints in virtualised services, Tommaso Cucinotta, Gaetano Anastasi, Luca
   Abeni, in Proceedings of the 2nd IEEE International Workshop on Real-Time Service-Oriented
   Architecture and Applications (RTSOAA 2009), Seattle, Washington, July 2009
         Tommaso Cucinotta – ReTiS Lab – Scuola Superiore Sant'Anna – Pisa – Italy                 55
S(o)OS

Service-Oriented Operating Systems – S(o)OS
   Focus on large-scale multi-cores of tomorrow
   Heterogeneous multi-core systems
   What OS model is appropriate ?
   What kind of applications are expected ?
   How to deploy heterogeneous workloads ?
   How to program in such systems ?
   How to mix H.P. with G.P. Computing ?
   etc.




       Tommaso Cucinotta – ReTiS Lab – Scuola Superiore Sant'Anna – Pisa – Italy   56
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

Mais conteúdo relacionado

Semelhante a Research in Soft Real-Time and Virtualized Applications on Linux

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
 
Week 1 Time_measuremenjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjt.pdf
Week 1 Time_measuremenjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjt.pdfWeek 1 Time_measuremenjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjt.pdf
Week 1 Time_measuremenjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjt.pdf
devinezekiel2003
 
Real Time Operating Systems
Real Time Operating SystemsReal Time Operating Systems
Real Time Operating Systems
Rohit Joshi
 
NICS Puppet Case Study
NICS Puppet Case StudyNICS Puppet Case Study
NICS Puppet Case Study
Puppet
 

Semelhante a Research in Soft Real-Time and Virtualized Applications on Linux (20)

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
 
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
 
Real-Time API
Real-Time APIReal-Time API
Real-Time API
 
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
 
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...
 
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...
 
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
 
Rt kernel-prn
Rt kernel-prnRt kernel-prn
Rt kernel-prn
 
Rtos 8051
Rtos 8051Rtos 8051
Rtos 8051
 
Week 1 Time_measuremenjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjt.pdf
Week 1 Time_measuremenjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjt.pdfWeek 1 Time_measuremenjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjt.pdf
Week 1 Time_measuremenjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjt.pdf
 
Real Time Operating Systems
Real Time Operating SystemsReal Time Operating Systems
Real Time Operating Systems
 
pptonrtosbychetan001-140213003314-phpapp02.pdf
pptonrtosbychetan001-140213003314-phpapp02.pdfpptonrtosbychetan001-140213003314-phpapp02.pdf
pptonrtosbychetan001-140213003314-phpapp02.pdf
 
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
 
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)
 
Tutotial 2 answer
Tutotial 2 answerTutotial 2 answer
Tutotial 2 answer
 
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
 
Making Linux do Hard Real-time
Making Linux do Hard Real-timeMaking Linux do Hard Real-time
Making Linux do Hard Real-time
 
Embedded Intro India05
Embedded Intro India05Embedded Intro India05
Embedded Intro India05
 

Último

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Último (20)

Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
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
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
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
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
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
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
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
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 

Research in Soft Real-Time and Virtualized Applications on Linux

  • 1. RETIS Lab Real-Time Systems Laboratory Research in Soft Real-Time and Virtualized Applications on Linux Tommaso Cucinotta Real-Time Systems Lab (RETIS) Center for Excellence in Information, Communication and Perception Engineering (CEIICP) Scuola Superiore Sant'Anna, Pisa (Italy)
  • 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, plant control, 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. Real-time theory Reservation-based scheduling: (Qi, Pi)  “Qi time units guaranteed on a CPU every Pi time units” (5, 9) ~88.9% t Overall Load (2, 6) t  Independently of how others behave (temporal isolation) Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna © 2007 Scuola Superiore
  • 6. Temporal Isolation Is needed despite blocks/unblocks  Not only EDF scheduling block unblock (5, 9) t deadline-miss (2, 6) t Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna © 2007 Scuola Superiore
  • 7. Temporal Isolation Is needed despite blocks/unblocks  Not only EDF scheduling block unblock (5, 9) t (2, 6) t See CBS “unblock rule” Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna © 2007 Scuola Superiore
  • 8. Temporal Isolation Enforcement of temporal isolation  Not only EDF scheduling bad job (5, 9) t deadline missed by good job (2, 6) t Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna © 2007 Scuola Superiore
  • 9. Temporal Isolation Enforcement of temporal isolation  Once budget exhausted, delay to next activation period Deadline missed bad job by bad job (5, 9) t (2, 6) t Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna © 2007 Scuola Superiore
  • 10. Linux and T.I. Need for T.I. evident in mainline Linux  A (buggy) real-time task can starve the entire OS  Real-time throttling prevents this to happen Real-Time Throttling  Different design principles • Priority-based scheduling • Constraints to “no more than Qi every system-wide P” • Behaves like “Deferrable Servers” Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna © 2007 Scuola Superiore
  • 11. Making Linux a better place (for multimedia and soft real-time applications) Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna © 2007 Scuola Superiore
  • 12. Real-Time Scheduling in Linux Linux  Not a Hard Real-Time OS  Monolithic structure • Device drivers may adversely affect responsiveness Advances in Linux temporal behavior (responsiv.)  Preemptability of kernel-space code  High-resolution timers  Increasing use of RCU primitives  Nearly complete support for POSIX real-time extensions • Sporadic Server is missing (!)  IRQ handlers as kernel threads (preempt-rt branch) Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna © 2007 Scuola Superiore
  • 13. Real-Time Scheduling in Linux Research on Linux for Real-Time Systems at RETIS  Applying techniques from Real-Time Systems to a GPOS  Improving responsiveness and stability of performance for time-sensitive applications  Investigating effectiveness of Adaptive Reservations  Synchronization protocols for real-time multimedia  Stabilising performance of virtualized applications  Isolating computing and I/O traffic for Virtual Machines  Effective exploitation of multi-cores in real-time systems  Programmability of multi-threaded, distributed, real-time applications (API) Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna © 2007 Scuola Superiore
  • 14. Real-Time Schedulers for Linux Resource reservation scheduling in Linux  Adaptive Quality of Service Architecture • Single-processor embedded systems • Multi-threaded applications  Hybrid Deadline/Priority Scheduler • Multi-processor systems • Multi-threaded virtualized applications  Partitioned/Global EDF Scheduler SCHED_DEADLINE • Multi-processor systems • Single-threaded control applications Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna © 2007 Scuola Superiore
  • 15. Adaptive Quality of Service Architecture for Linux Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna © 2007 Scuola Superiore
  • 16. Framework for Real-time Embedded Systems based on COntRacts Soft and hard real-time Support for CPU, disk, network Distributed real-time systems Portability across RTOSs Adaptive real-time systems Application-level QoS control QoS power-aware optimization Atomic negotiations http://www.frescor.org Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna © 2007 Scuola Superiore
  • 17. Experimental results (Pentium 4 @ 2GHz, Linux 2.6.29.1 + AQuoSA) Response-time CDF for the real-time task with the deadline shortest period under light load (48%) Response-time CDF for the real-time task with the deadline shortest period under heavy load (84%) Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna © 2007 Scuola Superiore
  • 18. Experimental results (Pentium 4 @ 2GHz, Linux 2.6.29.1 + AQuoSA) Average normalized tardiness for the real-time task with the shortest period, varying the number of real-time tasks in deadline the system. Maximum and 95th percentile of the normalized tardiness for the real-time task with the shortest period, varying the number of real-time tasks in the system. deadline Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna © 2007 Scuola Superiore
  • 19. Synchronization Bandwidth Inheritance (BWI / M-BWI)  Deals with Priority Inversion in EDF scheduling  Deadline inherited from lock owner Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna © 2007 Scuola Superiore
  • 20. Adaptive Reservations Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna © 2007 Scuola Superiore
  • 21. Need for adaptivity Computation times for decoding MPEG frames Scheduling error with an over- allocation of 30% over the average deadline deadline Scheduling error with allocation tuned on maximum Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna © 2007 Scuola Superiore
  • 22. Adaptive Reservations Feedback-based scheduling  Sense: tracking of workload fluctuations  Compute: • Prediction/estimation of workload for next period(s) • Compensation for possible current delays  Actuate: adapt the scheduling parameters (Qi, Pi) Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna © 2007 Scuola Superiore
  • 23. Adaptive Reservations Workload prediction  Moving average  Percentile estimation over moving window  FIR decorrelation + error estimation Budget controller  Target region around deadline  Stochastic approaches • Probability of deadline-miss • Optimum error/bandwidth trade-offs Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna © 2007 Scuola Superiore
  • 24. Experimental results PMF of scheduling error with various budget control strategies Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna © 2007 Scuola Superiore
  • 25. Automatic identification of scheduling parameters Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna © 2007 Scuola Superiore
  • 26. Automatic identification of scheduling parameters Recent developments in GPOS CPU scheduling  Various APIs for accessing the enhanced functionality • For example, the FRSH API • For example, the AquoSA API  They require modifications of the applications • at the source-code level  Can we provide real-time guarantees to unmodified applications ? • For example, for legacy multimedia applications ? • Or, simply because of no time to modify the applications Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna © 2007 Scuola Superiore
  • 27. Objectives We actually can  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
  • 28. 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
  • 29. 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
  • 30. 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
  • 31. Real-time theory Reservation-based scheduling: (Qi, Pi)  “Qi time units guaranteed on CPU every Pi time units” (5, 9) 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
  • 32. 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
  • 33. 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
  • 34. 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
  • 35. Budget identification “Feedback-based scheduling” budget control loop Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna © 2007 Scuola Superiore
  • 36. Experimental results Tommaso Cucinotta – Real Time Systems Laboratory (ReTiS) – Scuola Superiore Sant'Anna Sant’Anna © 2007 Scuola Superiore
  • 37. 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
  • 38. 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
  • 39. 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
  • 40. 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
  • 41. 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
  • 42. Precision of frequency detector 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
  • 43. 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
  • 44. 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
  • 45. Research Activities at ReTiS Real-Time Service-Oriented Architectures Virtualized Real-Time Multimedia Tommaso Cucinotta – ReTiS – CEIICP – Scuola Superiore Sant'Anna Tommaso Cucinotta – ReTiS Lab – Scuola Superiore Sant'Anna – Pisa – Italy 45
  • 46. Introduction Virtualization & real-time increasingly interesting  Wide availability of broadband connections ==> shift in computing paradigms towards distributed computing  Not only remote storage and batch processing  But also remote processing for interactive applications  Examples  Virtual Reality with heavyweight physics simulations  Distributed editing of HD video (film post-production) Tommaso Cucinotta – ReTiS Lab – Scuola Superiore Sant'Anna – Pisa – Italy 46
  • 47. Introduction Service-Oriented Architectures  Promising approach to distributed computing  Taking advantage from virtualization techniques:  Location independence  Security  Fault-Tolerance  Distributed Interactive/Real-Time Applications may benefit from SOA design Tommaso Cucinotta – ReTiS Lab – Scuola Superiore Sant'Anna – Pisa – Italy 47
  • 48. Problems Issues in deploying RT SW Components in VMs  Execution time  Virtualisation overhead: intensive I/O on virtualised peripherals  Benchmarking  A VM may be deployed on different HW (SOA scenario) – How to achieve predictable performance ?  VMs may be deployed on General-Purpose HW (with cache) – How to account for HW-level interferences ? Tommaso Cucinotta – ReTiS Lab – Scuola Superiore Sant'Anna – Pisa – Italy 48
  • 49. Problems Issues in deploying RT SW Components in VMs  Scheduling and timing  Host scheduling algorithm and VM layer impacts on the vision of time by guest OSes – Time granularity (for measuring time and setting timers) – Scheduling capabilities – Non-uniform progress-rate of applications  SMP-enabled guests – Spin-lock primitives assume release of locks within very short time-frames » What happens if the lock-owner VM is descheduled ?  Proper management of shared resources – What MP resource-sharing protocol is appropriate ? » Proper management of priority inversion » Reduced overheads (limited number of preemptions) » Run-time schedulability analysis and admission control Tommaso Cucinotta – ReTiS Lab – Scuola Superiore Sant'Anna – Pisa – Italy 49
  • 50. Approach Use of RR techniques for scheduling multiple VMs  Temporal isolation among VMs  Deadline guarantees to tasks Hard Reservation within VMs  hierarchical scheduling Experimental set-up  VMs scheduled by a modified Linux kernel implementing resource reservations Tommaso Cucinotta – ReTiS Lab – Scuola Superiore Sant'Anna – Pisa – Italy 50
  • 51. Approach Validation on modified Linux kernel with SMP Resource Reservation Scheduler Tommaso Cucinotta – ReTiS Lab – Scuola Superiore Sant'Anna – Pisa – Italy 51
  • 52. Experimental Results SOA Scenario  Response-times of Apache2 Web Server  From unpredictable and highly variable  To predictable and very stable (low fluctuations) – At the cost of an increased minimum response-time Tommaso Cucinotta – ReTiS Lab – Scuola Superiore Sant'Anna – Pisa – Italy 52
  • 53. Security for Embedded (and Real-Time) Systems Real-Time and Security  Temporal encapsulation as a security feature  Secure access to Real-Time scheduling services by unprivileged applications  Optimum trade-offs between: Security, Quality of Service and Power Consumption Tommaso Cucinotta – ReTiS Lab – Scuola Superiore Sant'Anna – Pisa – Italy 53
  • 54. Relevant Publications (from year 2009) Journals  A robust mechanism for adaptive scheduling of multimedia applications, Tommaso Cucinotta, Luca Abeni, Luigi Palopoli, Giuseppe Lipari, accepted on ACM Transactions on Embedded Computing Systems  QoS Control for Pipelines of Tasks using Multiple Resources, Tommaso Cucinotta, Luigi Palopoli, IEEE Transactions on Computers, Vol. 53, No. 3, pp. 416--430, March 2010, IEEE Computer Society Digital Library  A Real-time Service-Oriented Architecture for Industrial Automation, Tommaso Cucinotta, Antonio Mancina, Gaetano F. Anastasi, Giuseppe Lipari, Leonardo Mangeruca, Roberto Checcozzo, Fulvio Rusinà, to appear on IEEE Transactions on Industrial Informatics, Aug 2009  AQuoSA - Adaptive Quality of Service Architecture, Luigi Palopoli, Tommaso Cucinotta, Luca Marzario, Giuseppe Lipari, Software: Practice and Experience, Vol. 39, No. 1, January 2009 Tommaso Cucinotta – ReTiS Lab – Scuola Superiore Sant'Anna – Pisa – Italy 54
  • 55. Relevant Publications (from year 2009) Conferences/Workshops  The Multiprocessor BandWidth Inheritance Protocol, Dario Faggioli, Giuseppe Lipari, Tommaso Cucinotta, to appear at the 22nd Euromicro Conference on Real-Time Systems (ECRTS 2010), Bruxelles, July 2010  Self-tuning Schedulers for Legacy Real-Time Applications, Tommaso Cucinotta, Fabio Checconi, Luca Abeni, Luigi Palopoli, European Conference on Computer Systems (EuroSys 2010), Paris, April 2010  The Wizard of OS: a Heartbeat for Legacy Multimedia Applications, Tommaso Cucinotta, Luca Abeni, Luigi Palopoli, Fabio Checconi, 7th IEEE Workshop on Embedded Systems for Real-Time Multimedia, Grenoble (ESTIMedia 2009), Grenoble, October 2009  Multi-level feedback control for Quality of Service Management, Tommaso Cucinotta, Giuseppe Lipari, Luigi Palopoli, Luca Abeni, Rodrigo Santos, 14th IEEE International Conference on Emerging Technologies and Factory Automation (ETFA 2009), Mallorca, Spain, September 2009  Exception-Based Management of Timing Constraints Violations for Soft Real-Time Applications, Tommaso Cucinotta, Dario Faggioli, Alessandro Evangelista, 5th International Workshop on Operating Systems Platforms for Embedded Real-Time Applications (OSPERT 2009), Dublin, Ireland, June 2009  Hierarchical Multiprocessor CPU Reservations for the Linux Kernel, Fabio Checconi, Tommaso Cucinotta, Dario Faggioli, Giuseppe Lipari, 5th International Workshop on Operating Systems Platforms for Embedded Real-Time Applications (OSPERT 2009), Dublin, Ireland, June 2009  Real-time guarantees in flexible advance reservations, Kleopatra Kostanteli, Dimosthenis Kyriazis, Theodora Varvarigou, Tommaso Cucinotta, Gaetano Anastasi, 2nd IEEE International Workshop on Real- Time Service-Oriented Architecture and Applications (RTSOAA 2009), Seattle, Washington, July 2009  Respecting temporal constraints in virtualised services, Tommaso Cucinotta, Gaetano Anastasi, Luca Abeni, in Proceedings of the 2nd IEEE International Workshop on Real-Time Service-Oriented Architecture and Applications (RTSOAA 2009), Seattle, Washington, July 2009 Tommaso Cucinotta – ReTiS Lab – Scuola Superiore Sant'Anna – Pisa – Italy 55
  • 56. S(o)OS Service-Oriented Operating Systems – S(o)OS  Focus on large-scale multi-cores of tomorrow  Heterogeneous multi-core systems  What OS model is appropriate ?  What kind of applications are expected ?  How to deploy heterogeneous workloads ?  How to program in such systems ?  How to mix H.P. with G.P. Computing ?  etc. Tommaso Cucinotta – ReTiS Lab – Scuola Superiore Sant'Anna – Pisa – Italy 56
  • 57. 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