SlideShare ist ein Scribd-Unternehmen logo
1 von 45
Using Hard Disks in Real-Time
          Systems

       Mark Stanovich
Context
 Real-time systems
 Raw disk I/O

 Hard disks with built-in scheduler/queue

 Mixed Workload
     Disk requests with deadline/response time
      requirements
     Background/best effort requests
 Want    to guarantee real-time deadlines
Difficulties
 Real-time   schedulability analysis generally
  relies on knowing worst-case execution times
  (WCET)
 Non-preemption makes guarantees even
  more difficult
 Variability of disk service times is extreme
  (tens of milliseconds to several seconds)
 Result is that hard disks are not prevelant in
  the critical path of a real-time system
 Meeting guarantees vs optimizing disk
  utilization
Value of Research

 Provides   more information to provide
  schedulability analysis
 Large capacity of hard disks can be utilized in
  the critical path of a real-time system
 Less burden on other resources

 Lower latencies
Applications

 Multimedia

 Data Logging
 Webservers

 Data Analysis
Disk Scheduling
 Allow   internal scheduler to schedule requests
     less burden on the CPU
     device driver can be at a lower priority
     fine-grained internal state does not have to be
      maintained
     disk specific characteristics can be utilized
 All   scheduling performed inside the OS
     more control over request service order
     scheduling policy can be changed
Disk Scheduling
 Rotational-Position-Aware Real-Time Disk
  Scheduling Using a Dynamic Active Subset
  (DAS)
 A Real-Time Disk Scheduler for Multimedia
  Integrated Server Considering the Disk
  Internal Scheduler
Dynamic Active Subset
 upon  each scheduling decision, the calculation
  of a subset of the outstanding disk requests
  such that all service guarantees can be
  enforced under worst-case assumptions
 schedule the subset based on the rotational
  position of requests in order to improve
  scheduling decision
Response Times
Response Times
Worst-Case Execution Time
 seek  time
 rotional delay * number of rotations to settle

 access time for some number of sectors
     time per sector varies depending on the zone
 overhead    time
     disk controller processing
     data transfer between disk and host system
 skew    time * v
     time to switch next cylinder and next disk head
     v depends on maximum request size and minimum
      size of a single track
Number of Rotations to Settle
 Rare  cases the disk head needs some
  additional rotations to settle on the destination
  track
 Provoke worst-case by alternately issuing
  requests to the innermost and outermost
  region of the disk
Worst-Case Execution Times
Hiding Overhead Times

 substantial amount of time communicating
  with the disk without media access
 use TCQ to minimize these times
     send 2 requests so that as one request is
      transferred to or from the disk the other will be
      executing
Real-Time Disk Scheduling
 Execute all real-time requests at the beginning
 of each period
    limits the scope of scheduling optimizations to
     request classes
 DAS
    construct a subset of the outstanding requests
     such that no service guarantee will be violated
     regardless of which request is executed
    all scheduling algorithms can be used while
     ensuring deadlines
    dynamic nature of DAS does not allow scheduling
     inside the disk controller's hardware
DAS
Performance
Autonomous


                                   disk head location




345   468                589               642




            = data locations to retrieve
Autonomous
Worst-case Rotational Latencies

5400 RPM = 11.1 msec
7200 RPM = 8.3 msec
10K RPM = 6 msec




                                  disk head location
Autonomous
 cons
    without detailed knowledge of hard disk internals,
     service times are difficult to predict for real-time
     requests
Lack of Preemption Capablility

 Real-timerequests must wait for current
 request to finish
    if current request takes too long, even if we start
     the real-time request immediately, it may fail to
     meet its deadline
 NCQ  does not allow requests to be pushed to
 the head of the queue
    now we may have to wait for all requests on the
     disk to be processed first
Response Time

 Simplistic     Bound
     rotation latency + full stroke seek time
     Example: Maxtor 73G 10K RPM drive
         worst case latency: 6 msec + 11 msec = 17 msec
Response Time




background
task                     real-time task
Response Time
RT I/O Scheduler
                                                   application

 simple                           user space

    no merging                    kernel space
    no sorting                                       VFS

 accomodates     I/O priorities
                               elevator            block I/O




                                                  device driver
Response Times
Response Times

 Problems
    disk unaware of request priorities
    starvation of requests
      new background requests sent to the disk are serviced
       before older requests
      better performance to keep disk head in a certain
       region, less disk head movement
Response Times
Response Times

 Solutions
    use round based scheduling with ordered tag to
     prevent background requests from being serviced
     before real-time requests [Kim 2003]
    rely on disk starvation prevention algorithm
    draining of disk queue
    limiting on disk queue depth
Draining
Draining

 allow disk to service request already on the
  disk without sending any new requests
 drain_time(n)
     maximum time to service n disk requests with no
      subsequent requests being sent to the disk
 condition   to send new request:
  if (current time + drain_time(x)) <= earliest deadline,
  where x is the size of the on-disk queue depth
Draining

 determing    drain_time(n)
    on-disk scheduling logic unknown, therefore makes
     analytical analysis difficult
    can empirically determine
      send n number of requests to the disk and measure the
       time to completion
      how to know when the worst case response time has
       been reached
Draining
Limiting On-Disk Queue Depth

 max_depth
     maximum number of outstanding requests
      permitted to be sent to the disk
 condition   to send new request:
 if number of outstanding requests < max_depth
Implementation

                   application
    user space

   kernel space
                      VFS



  elevator         block I/O



                  device driver
Experimental Verification

 periodic   real-time task requests data from disk
     period = deadline = 250 msec
     256KB request size
 450constant background asynchronous
 requests sent to same disk
Experimental Verification
Experimental Verification
Conclusion

 more  intelligent, autonomous hard drives
  increase the complexity of scheduling requests
 command queuing provides some assistance,
  but does not address all real-time disk I/O
  issues
 draining and limiting the on-disk queue can be
  used to maintain deadline constraints
 several aspects of disk behavior is still
  unexplained and until these are resolved, no
  absolute guarantees can be made
Previous Work

 Pro's
     takes advantage of drives internal mechanisms
     can guarantee most requests in a round
     uses Linux, a commodity OS
     uses an admission controller for the real-time
      requests
 Con's
     constrained to the time interval of a round
     all requests of one round are treated as equal
      priority
     does not mention about priority of disk device
      driver
Work in progress

   constrain the internal features of a disk in
    order to provide some idea of reserved
    bandwidth
   start with periodic requests (benefit from the
    knowledge of upcoming requests)
       as time gets close to the real-time request reduce
        admission of best-effort requests to the disk
        (gradually lower on-disk requests)
       may also want to constrain the region in which the
        disk can do work if the region of the real-time
        request is known
   reserve bandwidth for some time interval
Work in progress
 disk   drive has a worst-case bandwidth
     admission control can allocate up to this parameter
     after that cannot guarantee anything else for hard
      real-time constraints
     best-effort requests can fit before real-time
      requests as long as the requests do not jeopardize
      the upcoming real-time request (worst-case service
      time)
     real-time requests usually will not fill the entire time
      allocated for the worst case bandwidth therefore
      time will be available for best-effort requests
     use ordered tag to send best-effort requests after
      ALL known real-time requests are issued to the
      disk
Work in progress
 Differences       between read/writes
    writes normally require a longer settle time
        time for head position to stabilize on the selected track
Work in progress
 Metrics
    extent to which real-time request exceeded
     deadline (for hard real-time this should be 0)
    average response time of real-time request in
     comparison with calculated worst-case time
    bandwidth of best-effort requests
    average/min/max of on-disk queue depth used
      NCQ allows for only 32 on-disk requests
      are more really needed such as the SAS drives with
       256 requests (SCSI TCQ has a maximum queue length
       of 2^64)
    stress an actual implementation
        displaying video with best-effort applcations in the
         background (compile kernel, copy large files, etc.)
Constraining the Disk Reduces
          Efficiency
 Not   necessary to send ordered tag right away
    sending the ordered tag may put unnecessary
     constraints on the internal scheduler
    may be better to stop future requests until the real-
     time request is completed or to some minimum
     internal disk queue length

Weitere ähnliche Inhalte

Was ist angesagt?

Red Hat Enterprise Linux OpenStack Platform on Inktank Ceph Enterprise
Red Hat Enterprise Linux OpenStack Platform on Inktank Ceph EnterpriseRed Hat Enterprise Linux OpenStack Platform on Inktank Ceph Enterprise
Red Hat Enterprise Linux OpenStack Platform on Inktank Ceph EnterpriseRed_Hat_Storage
 
Rman duplicate-database-on-the-same-host1
Rman duplicate-database-on-the-same-host1Rman duplicate-database-on-the-same-host1
Rman duplicate-database-on-the-same-host1hunghtc83
 
Redundancy for Big Hadoop Clusters is hard - Stuart Pook
Redundancy for Big Hadoop Clusters is hard  - Stuart PookRedundancy for Big Hadoop Clusters is hard  - Stuart Pook
Redundancy for Big Hadoop Clusters is hard - Stuart PookEvention
 
An introduction and evaluations of a wide area distributed storage system
An introduction and evaluations of  a wide area distributed storage systemAn introduction and evaluations of  a wide area distributed storage system
An introduction and evaluations of a wide area distributed storage systemHiroki Kashiwazaki
 
Ceph Day Melbourne - Ceph on All-Flash Storage - Breaking Performance Barriers
Ceph Day Melbourne - Ceph on All-Flash Storage - Breaking Performance BarriersCeph Day Melbourne - Ceph on All-Flash Storage - Breaking Performance Barriers
Ceph Day Melbourne - Ceph on All-Flash Storage - Breaking Performance BarriersCeph Community
 
Netbackup 6.5 backup process
Netbackup 6.5 backup processNetbackup 6.5 backup process
Netbackup 6.5 backup processHernán Larrea
 
LISA18: Hidden Linux Metrics with Prometheus eBPF Exporter
LISA18: Hidden Linux Metrics with Prometheus eBPF ExporterLISA18: Hidden Linux Metrics with Prometheus eBPF Exporter
LISA18: Hidden Linux Metrics with Prometheus eBPF ExporterIvan Babrou
 
LizardFS-WhitePaper-Eng-v3.9.2-web
LizardFS-WhitePaper-Eng-v3.9.2-webLizardFS-WhitePaper-Eng-v3.9.2-web
LizardFS-WhitePaper-Eng-v3.9.2-webSzymon Haly
 
Oow2007 performance
Oow2007 performanceOow2007 performance
Oow2007 performanceRicky Zhu
 
LISA2019 Linux Systems Performance
LISA2019 Linux Systems PerformanceLISA2019 Linux Systems Performance
LISA2019 Linux Systems PerformanceBrendan Gregg
 
Kernel Recipes 2017: Performance Analysis with BPF
Kernel Recipes 2017: Performance Analysis with BPFKernel Recipes 2017: Performance Analysis with BPF
Kernel Recipes 2017: Performance Analysis with BPFBrendan Gregg
 
ATO Linux Performance 2018
ATO Linux Performance 2018ATO Linux Performance 2018
ATO Linux Performance 2018Brendan Gregg
 
Security Monitoring with eBPF
Security Monitoring with eBPFSecurity Monitoring with eBPF
Security Monitoring with eBPFAlex Maestretti
 
Analysis of interrupt latencies in a real-time kernel
Analysis of interrupt latencies in a real-time kernelAnalysis of interrupt latencies in a real-time kernel
Analysis of interrupt latencies in a real-time kernelGabriele Modena
 
Memory, Big Data, NoSQL and Virtualization
Memory, Big Data, NoSQL and VirtualizationMemory, Big Data, NoSQL and Virtualization
Memory, Big Data, NoSQL and VirtualizationBigstep
 
Kernel Recipes 2019 - ftrace: Where modifying a running kernel all started
Kernel Recipes 2019 - ftrace: Where modifying a running kernel all startedKernel Recipes 2019 - ftrace: Where modifying a running kernel all started
Kernel Recipes 2019 - ftrace: Where modifying a running kernel all startedAnne Nicolas
 
Testing real-time Linux. What to test and how
Testing real-time Linux. What to test and how Testing real-time Linux. What to test and how
Testing real-time Linux. What to test and how Chirag Jog
 

Was ist angesagt? (20)

Red Hat Enterprise Linux OpenStack Platform on Inktank Ceph Enterprise
Red Hat Enterprise Linux OpenStack Platform on Inktank Ceph EnterpriseRed Hat Enterprise Linux OpenStack Platform on Inktank Ceph Enterprise
Red Hat Enterprise Linux OpenStack Platform on Inktank Ceph Enterprise
 
Rman duplicate-database-on-the-same-host1
Rman duplicate-database-on-the-same-host1Rman duplicate-database-on-the-same-host1
Rman duplicate-database-on-the-same-host1
 
Redundancy for Big Hadoop Clusters is hard - Stuart Pook
Redundancy for Big Hadoop Clusters is hard  - Stuart PookRedundancy for Big Hadoop Clusters is hard  - Stuart Pook
Redundancy for Big Hadoop Clusters is hard - Stuart Pook
 
An introduction and evaluations of a wide area distributed storage system
An introduction and evaluations of  a wide area distributed storage systemAn introduction and evaluations of  a wide area distributed storage system
An introduction and evaluations of a wide area distributed storage system
 
Stabilizing Ceph
Stabilizing CephStabilizing Ceph
Stabilizing Ceph
 
Ceph Day Melbourne - Ceph on All-Flash Storage - Breaking Performance Barriers
Ceph Day Melbourne - Ceph on All-Flash Storage - Breaking Performance BarriersCeph Day Melbourne - Ceph on All-Flash Storage - Breaking Performance Barriers
Ceph Day Melbourne - Ceph on All-Flash Storage - Breaking Performance Barriers
 
Netbackup 6.5 backup process
Netbackup 6.5 backup processNetbackup 6.5 backup process
Netbackup 6.5 backup process
 
LISA18: Hidden Linux Metrics with Prometheus eBPF Exporter
LISA18: Hidden Linux Metrics with Prometheus eBPF ExporterLISA18: Hidden Linux Metrics with Prometheus eBPF Exporter
LISA18: Hidden Linux Metrics with Prometheus eBPF Exporter
 
LizardFS-WhitePaper-Eng-v3.9.2-web
LizardFS-WhitePaper-Eng-v3.9.2-webLizardFS-WhitePaper-Eng-v3.9.2-web
LizardFS-WhitePaper-Eng-v3.9.2-web
 
Hdfs high availability
Hdfs high availabilityHdfs high availability
Hdfs high availability
 
Oow2007 performance
Oow2007 performanceOow2007 performance
Oow2007 performance
 
LISA2019 Linux Systems Performance
LISA2019 Linux Systems PerformanceLISA2019 Linux Systems Performance
LISA2019 Linux Systems Performance
 
Kernel Recipes 2017: Performance Analysis with BPF
Kernel Recipes 2017: Performance Analysis with BPFKernel Recipes 2017: Performance Analysis with BPF
Kernel Recipes 2017: Performance Analysis with BPF
 
ATO Linux Performance 2018
ATO Linux Performance 2018ATO Linux Performance 2018
ATO Linux Performance 2018
 
Security Monitoring with eBPF
Security Monitoring with eBPFSecurity Monitoring with eBPF
Security Monitoring with eBPF
 
Analysis of interrupt latencies in a real-time kernel
Analysis of interrupt latencies in a real-time kernelAnalysis of interrupt latencies in a real-time kernel
Analysis of interrupt latencies in a real-time kernel
 
A study of our DNS full-resolvers
A study of our DNS full-resolversA study of our DNS full-resolvers
A study of our DNS full-resolvers
 
Memory, Big Data, NoSQL and Virtualization
Memory, Big Data, NoSQL and VirtualizationMemory, Big Data, NoSQL and Virtualization
Memory, Big Data, NoSQL and Virtualization
 
Kernel Recipes 2019 - ftrace: Where modifying a running kernel all started
Kernel Recipes 2019 - ftrace: Where modifying a running kernel all startedKernel Recipes 2019 - ftrace: Where modifying a running kernel all started
Kernel Recipes 2019 - ftrace: Where modifying a running kernel all started
 
Testing real-time Linux. What to test and how
Testing real-time Linux. What to test and how Testing real-time Linux. What to test and how
Testing real-time Linux. What to test and how
 

Andere mochten auch

Derecho laboral asignacion uno
Derecho laboral asignacion unoDerecho laboral asignacion uno
Derecho laboral asignacion unoPedro Morales
 
Factores causantes de la homosexualidad y curación
Factores causantes de la homosexualidad y curaciónFactores causantes de la homosexualidad y curación
Factores causantes de la homosexualidad y curaciónJessica Lopez M
 
Sum conference powerpoint
Sum conference powerpointSum conference powerpoint
Sum conference powerpointsusan70
 
Economic environment unit4
Economic environment unit4Economic environment unit4
Economic environment unit4UNBFS
 
The weeknd sound cloud
The weeknd sound cloudThe weeknd sound cloud
The weeknd sound cloudsupreet223
 
Economic environment unit7
Economic environment unit7Economic environment unit7
Economic environment unit7UNBFS
 
Economic environment unit6
Economic environment unit6Economic environment unit6
Economic environment unit6UNBFS
 
Economic environment unit2
Economic environment unit2Economic environment unit2
Economic environment unit2UNBFS
 
Ruta 66 informe
Ruta 66 informe Ruta 66 informe
Ruta 66 informe olgueesi
 
A Turbocharger for Digestion: Thermal Hydrolysis at Davyhulme, UK
A Turbocharger for Digestion: Thermal Hydrolysis at Davyhulme, UKA Turbocharger for Digestion: Thermal Hydrolysis at Davyhulme, UK
A Turbocharger for Digestion: Thermal Hydrolysis at Davyhulme, UKBlack & Veatch
 
Economic environment unit5
Economic environment unit5Economic environment unit5
Economic environment unit5UNBFS
 
Economic environment unit8
Economic environment unit8Economic environment unit8
Economic environment unit8UNBFS
 
El síndrome de burnout
El síndrome de burnoutEl síndrome de burnout
El síndrome de burnoutLuis Eduardo
 

Andere mochten auch (14)

Derecho laboral asignacion uno
Derecho laboral asignacion unoDerecho laboral asignacion uno
Derecho laboral asignacion uno
 
Factores causantes de la homosexualidad y curación
Factores causantes de la homosexualidad y curaciónFactores causantes de la homosexualidad y curación
Factores causantes de la homosexualidad y curación
 
Sum conference powerpoint
Sum conference powerpointSum conference powerpoint
Sum conference powerpoint
 
Economic environment unit4
Economic environment unit4Economic environment unit4
Economic environment unit4
 
The weeknd sound cloud
The weeknd sound cloudThe weeknd sound cloud
The weeknd sound cloud
 
Economic environment unit7
Economic environment unit7Economic environment unit7
Economic environment unit7
 
Economic environment unit6
Economic environment unit6Economic environment unit6
Economic environment unit6
 
Economic environment unit2
Economic environment unit2Economic environment unit2
Economic environment unit2
 
Ruta 66 informe
Ruta 66 informe Ruta 66 informe
Ruta 66 informe
 
A Turbocharger for Digestion: Thermal Hydrolysis at Davyhulme, UK
A Turbocharger for Digestion: Thermal Hydrolysis at Davyhulme, UKA Turbocharger for Digestion: Thermal Hydrolysis at Davyhulme, UK
A Turbocharger for Digestion: Thermal Hydrolysis at Davyhulme, UK
 
Economic environment unit5
Economic environment unit5Economic environment unit5
Economic environment unit5
 
Economic environment unit8
Economic environment unit8Economic environment unit8
Economic environment unit8
 
El síndrome de burnout
El síndrome de burnoutEl síndrome de burnout
El síndrome de burnout
 
Cmc3
Cmc3Cmc3
Cmc3
 

Ähnlich wie Rt disk (20)

Viknesh
VikneshViknesh
Viknesh
 
Operating Systems
Operating SystemsOperating Systems
Operating Systems
 
What is the future of disk drives?
What is the future of disk drives?What is the future of disk drives?
What is the future of disk drives?
 
CH10.pdf
CH10.pdfCH10.pdf
CH10.pdf
 
unit-4.pdf
unit-4.pdfunit-4.pdf
unit-4.pdf
 
DownloadClassSessionFile (44).pdf
DownloadClassSessionFile (44).pdfDownloadClassSessionFile (44).pdf
DownloadClassSessionFile (44).pdf
 
Disk scheduling algorithms
Disk scheduling algorithms Disk scheduling algorithms
Disk scheduling algorithms
 
Ch10
Ch10Ch10
Ch10
 
Oracle Performance Tuning Fundamentals
Oracle Performance Tuning FundamentalsOracle Performance Tuning Fundamentals
Oracle Performance Tuning Fundamentals
 
Storage Management
Storage ManagementStorage Management
Storage Management
 
Mass Storage Structure
Mass Storage StructureMass Storage Structure
Mass Storage Structure
 
Disk structure
Disk structureDisk structure
Disk structure
 
Mass storage systemsos
Mass storage systemsosMass storage systemsos
Mass storage systemsos
 
operating system
operating systemoperating system
operating system
 
Operation System
Operation SystemOperation System
Operation System
 
ISR UNIT2.ppt
ISR UNIT2.pptISR UNIT2.ppt
ISR UNIT2.ppt
 
Kavi
KaviKavi
Kavi
 
Kavi
KaviKavi
Kavi
 
Ch12
Ch12Ch12
Ch12
 
Os
OsOs
Os
 

Kürzlich hochgeladen

Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 

Kürzlich hochgeladen (20)

Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 

Rt disk

  • 1. Using Hard Disks in Real-Time Systems Mark Stanovich
  • 2. Context  Real-time systems  Raw disk I/O  Hard disks with built-in scheduler/queue  Mixed Workload  Disk requests with deadline/response time requirements  Background/best effort requests  Want to guarantee real-time deadlines
  • 3. Difficulties  Real-time schedulability analysis generally relies on knowing worst-case execution times (WCET)  Non-preemption makes guarantees even more difficult  Variability of disk service times is extreme (tens of milliseconds to several seconds)  Result is that hard disks are not prevelant in the critical path of a real-time system  Meeting guarantees vs optimizing disk utilization
  • 4. Value of Research  Provides more information to provide schedulability analysis  Large capacity of hard disks can be utilized in the critical path of a real-time system  Less burden on other resources  Lower latencies
  • 5. Applications  Multimedia  Data Logging  Webservers  Data Analysis
  • 6. Disk Scheduling  Allow internal scheduler to schedule requests  less burden on the CPU  device driver can be at a lower priority  fine-grained internal state does not have to be maintained  disk specific characteristics can be utilized  All scheduling performed inside the OS  more control over request service order  scheduling policy can be changed
  • 7. Disk Scheduling  Rotational-Position-Aware Real-Time Disk Scheduling Using a Dynamic Active Subset (DAS)  A Real-Time Disk Scheduler for Multimedia Integrated Server Considering the Disk Internal Scheduler
  • 8. Dynamic Active Subset  upon each scheduling decision, the calculation of a subset of the outstanding disk requests such that all service guarantees can be enforced under worst-case assumptions  schedule the subset based on the rotational position of requests in order to improve scheduling decision
  • 11. Worst-Case Execution Time  seek time  rotional delay * number of rotations to settle  access time for some number of sectors  time per sector varies depending on the zone  overhead time  disk controller processing  data transfer between disk and host system  skew time * v  time to switch next cylinder and next disk head  v depends on maximum request size and minimum size of a single track
  • 12. Number of Rotations to Settle  Rare cases the disk head needs some additional rotations to settle on the destination track  Provoke worst-case by alternately issuing requests to the innermost and outermost region of the disk
  • 14. Hiding Overhead Times  substantial amount of time communicating with the disk without media access  use TCQ to minimize these times  send 2 requests so that as one request is transferred to or from the disk the other will be executing
  • 15. Real-Time Disk Scheduling  Execute all real-time requests at the beginning of each period  limits the scope of scheduling optimizations to request classes  DAS  construct a subset of the outstanding requests such that no service guarantee will be violated regardless of which request is executed  all scheduling algorithms can be used while ensuring deadlines  dynamic nature of DAS does not allow scheduling inside the disk controller's hardware
  • 16. DAS
  • 18. Autonomous disk head location 345 468 589 642 = data locations to retrieve
  • 19. Autonomous Worst-case Rotational Latencies 5400 RPM = 11.1 msec 7200 RPM = 8.3 msec 10K RPM = 6 msec disk head location
  • 20. Autonomous  cons  without detailed knowledge of hard disk internals, service times are difficult to predict for real-time requests
  • 21. Lack of Preemption Capablility  Real-timerequests must wait for current request to finish  if current request takes too long, even if we start the real-time request immediately, it may fail to meet its deadline  NCQ does not allow requests to be pushed to the head of the queue  now we may have to wait for all requests on the disk to be processed first
  • 22. Response Time  Simplistic Bound  rotation latency + full stroke seek time  Example: Maxtor 73G 10K RPM drive  worst case latency: 6 msec + 11 msec = 17 msec
  • 25. RT I/O Scheduler application  simple user space  no merging kernel space  no sorting VFS  accomodates I/O priorities elevator block I/O device driver
  • 27. Response Times  Problems  disk unaware of request priorities  starvation of requests  new background requests sent to the disk are serviced before older requests  better performance to keep disk head in a certain region, less disk head movement
  • 29. Response Times  Solutions  use round based scheduling with ordered tag to prevent background requests from being serviced before real-time requests [Kim 2003]  rely on disk starvation prevention algorithm  draining of disk queue  limiting on disk queue depth
  • 31. Draining  allow disk to service request already on the disk without sending any new requests  drain_time(n)  maximum time to service n disk requests with no subsequent requests being sent to the disk  condition to send new request: if (current time + drain_time(x)) <= earliest deadline, where x is the size of the on-disk queue depth
  • 32. Draining  determing drain_time(n)  on-disk scheduling logic unknown, therefore makes analytical analysis difficult  can empirically determine  send n number of requests to the disk and measure the time to completion  how to know when the worst case response time has been reached
  • 34. Limiting On-Disk Queue Depth  max_depth  maximum number of outstanding requests permitted to be sent to the disk  condition to send new request: if number of outstanding requests < max_depth
  • 35. Implementation application user space kernel space VFS elevator block I/O device driver
  • 36. Experimental Verification  periodic real-time task requests data from disk  period = deadline = 250 msec  256KB request size  450constant background asynchronous requests sent to same disk
  • 39. Conclusion  more intelligent, autonomous hard drives increase the complexity of scheduling requests  command queuing provides some assistance, but does not address all real-time disk I/O issues  draining and limiting the on-disk queue can be used to maintain deadline constraints  several aspects of disk behavior is still unexplained and until these are resolved, no absolute guarantees can be made
  • 40. Previous Work  Pro's  takes advantage of drives internal mechanisms  can guarantee most requests in a round  uses Linux, a commodity OS  uses an admission controller for the real-time requests  Con's  constrained to the time interval of a round  all requests of one round are treated as equal priority  does not mention about priority of disk device driver
  • 41. Work in progress  constrain the internal features of a disk in order to provide some idea of reserved bandwidth  start with periodic requests (benefit from the knowledge of upcoming requests)  as time gets close to the real-time request reduce admission of best-effort requests to the disk (gradually lower on-disk requests)  may also want to constrain the region in which the disk can do work if the region of the real-time request is known  reserve bandwidth for some time interval
  • 42. Work in progress  disk drive has a worst-case bandwidth  admission control can allocate up to this parameter  after that cannot guarantee anything else for hard real-time constraints  best-effort requests can fit before real-time requests as long as the requests do not jeopardize the upcoming real-time request (worst-case service time)  real-time requests usually will not fill the entire time allocated for the worst case bandwidth therefore time will be available for best-effort requests  use ordered tag to send best-effort requests after ALL known real-time requests are issued to the disk
  • 43. Work in progress  Differences between read/writes  writes normally require a longer settle time  time for head position to stabilize on the selected track
  • 44. Work in progress  Metrics  extent to which real-time request exceeded deadline (for hard real-time this should be 0)  average response time of real-time request in comparison with calculated worst-case time  bandwidth of best-effort requests  average/min/max of on-disk queue depth used  NCQ allows for only 32 on-disk requests  are more really needed such as the SAS drives with 256 requests (SCSI TCQ has a maximum queue length of 2^64)  stress an actual implementation  displaying video with best-effort applcations in the background (compile kernel, copy large files, etc.)
  • 45. Constraining the Disk Reduces Efficiency  Not necessary to send ordered tag right away  sending the ordered tag may put unnecessary constraints on the internal scheduler  may be better to stop future requests until the real- time request is completed or to some minimum internal disk queue length

Hinweis der Redaktion

  1. Take your pick of FSU logos… just some suggestions.
  2. Each device driver’s code may run in multiple execution contexts which makes resource accounting difficult - Some traditional device driver scheduling methods tend to present problems in RTOSs. A true RTOS must be amenable to schedulability analysis - Move to threads - Introduce OSes (Linux and Timesys)‏
  3. Each device driver’s code may run in multiple execution contexts which makes resource accounting difficult - Some traditional device driver scheduling methods tend to present problems in RTOSs. A true RTOS must be amenable to schedulability analysis - Move to threads - Introduce OSes (Linux and Timesys)‏
  4. Trying to apply sched analysis in presence of device drivers
  5. Trying to apply sched analysis in presence of device drivers
  6. Each device driver’s code may run in multiple execution contexts which makes resource accounting difficult - Some traditional device driver scheduling methods tend to present problems in RTOSs. A true RTOS must be amenable to schedulability analysis - Move to threads - Introduce OSes (Linux and Timesys)‏