Notes - MIECT
Sistemas Operativos E De Tempo-real
Notes - MIECT
Sistemas Operativos E De Tempo-real
  • Sistemas Operativos e de Tempo-real
  • Basic Concepts About Real-Time Systems
    • Preliminaries
    • Definitions
    • Objective of the Study of RTS
    • Requirements of Real-Time Systems
  • Real Time Model
    • Real Time Model
    • Temporal Control
    • Task states and execution
    • Kernel/RTOS Architecture
      • Time Management Functions
    • Examples of RTOS
  • Practical Class 01
    • Real-Time Services in Linux
    • Using the Linux real-time services
  • Scheduling Basics
    • Basic concepts
    • Scheduling Algorithms
      • Basic algorithms
    • Static Cyclic Scheduling
    • Exercise
  • Fixed Priority Scheduling
    • Online scheduling with fixed priorities
    • Schedulability tests based on utilization
      • Deadline Monotonic Scheduling DM
    • Response-time analysis
  • Practical Class 2
    • Xenomai brief introduction
    • API
    • Developing an application
  • Dynamic Priority Scheduling
    • On-line scheduling with dynamic priorities
    • Analysis: CPU utilization bound
    • Analysis: CPU Load Analysis
    • Other deadline assignment criteria
  • Exclusive Access to Shared Resources
    • The priority inversion problem
    • Techniques for allowing exclusive access
    • Priority Inheritance Protocol
    • Priority Ceiling Protocol
    • Stack Resource Policy
    • Notes
  • Aperiodic Servers
    • Joint scheduling of periodic and aperiodic tasks
    • Aperiodic Servers
    • Fixed Priority Servers
    • Dynamic Priority Servers
  • Limited preemption, release jitter and overheads
    • Non-preemptive scheduling
    • Impact of Release Jitter
    • Accounting for overheads
    • Considerations about the WCET
  • Profiling and Code Optimization
    • Code optimization techniques
      • CPU independent optimization techniques
      • Cache impact
      • Optimization techniques dependent on memory architecture
      • Architecture-dependent optimization techniques
    • Profiling
  • Multiprocessor Scheduling, V1.2
    • Introduction
    • Definitions, Assumptions and Scheduling Model
    • Scheduling for Multicore Platforms
    • Task allocation
Powered by GitBook
On this page
  • System overheads
  • System tick cost
  • Context switch costs
  • Cost of ISR’s
  1. Limited preemption, release jitter and overheads

Accounting for overheads

PreviousImpact of Release JitterNextConsiderations about the WCET

Last updated 2 years ago

System overheads

When developing real applications, system overheads may not be always negligible.

In such cases it may be necessary to consider the impact of:

  • The processing cost of internal mechanisms (e.g. tick handler).

  • The overhead due to context switching.

  • Interrupt Service Routines.

System tick cost

Evaluating the computational cost of the system tick.

  • The service to the system tick uses CPU time (overhead), which is taken from the tasks’ execution.

  • It is the highest priority activity on the system and can be modeled by a periodic task.

  • The respective overhead (σ) may have a substantial impact on the system, as it is a part of the CPU availability that is not available to the application tasks.

Evaluating the computational cost of the system tick.

  • Can be measured either directly or via the timed execution of a long function, executed with and without tick interrupts (period Ttick) and measuring the difference on the execution times.

  • In this case the average value for σ is as follows:

Context switch costs

Evaluating the cost of context switches.

  • Context switches also require CPU time to save and restore the tasks’ context.

  • In this case, the average value for δ is:

  • A simple (but pessimistic) way of taking into account the overhead due to context switching (δ) consists in adding that time to the execution time of the tasks. This way it is taken into account not only the context switching overhead due to the task itself as well as the one relative to all context switches that may occur.

  • Simple but pessimistic, as the overhead is take into account twice.

Cost of ISR’s

Impact of Interrupt Service Routines.

  • Generally, the Interrupt Service Routines (ISR) execute with an higher priority level than all other system tasks.

  • Therefore, on a fixed priority system, the respective impact can be taken directly into account by including these ISR as tasks in the schedulability analysis.

  • In systems with dynamic priorities the situation is much more complex (e.g. how to assign deadlines?). In these cases it is usually considered that the time windows in which such ISR execute are not available for normal tasks execution. This can be taken into account in the CPU load analysis.

A simple way of measuring this overhead (δ) consists in using two tasks, a long one (τ1) and another one with higher priority (τ2), quicker period (T2) and empty (no code). Then it is only required measuring the execution time of the first task alone () and together with the second one ().