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
  • Interrupt inhibit
  • Preemption inhibiting
  • Semaphores
  1. Exclusive Access to Shared Resources

Techniques for allowing exclusive access

PreviousThe priority inversion problemNextPriority Inheritance Protocol

Last updated 2 years ago

Possible synchronization approaches:

  • Disable Interrupts

    • disable()/enable() or cli()/sti()

  • Inhibit preemption

    • no preemp()/preempt()

  • Locks or atomic

    • lock()/unlock()

  • Use of semaphores

    • Counter + task list.

    • P()/V (), wait()/signal(), take()/give(), ...

Interrupt inhibit

All other system activities are blocked, not just other tasks, but also interrupt service routines, including the system tick handler.

Very easy to implement but should only be used with very short critical regions (e.g. access to a few HW registers, read-modify-write of a variable).

Each task can only be blocked once and for the maximum duration of the critical region of lower priority tasks (or smaller relative deadline for EDF), even if they don’t use any shared resource!!

Preemption inhibiting

All other tasks are blocked. However, contrarily to disabling the interrupts, in this case the interrupt service routines , including the system tick, are not blocked !

Very easy to implement but not efficient, as it causes unnecessary blocking.

Each task can only be blocked once and for the maximum duration of the critical region of lower priority tasks (or smaller relative deadline for EDF), even if these don’t use any shared resource!!

Semaphores

More complex and costly to implement.

In general much more efficient resource management.

However, the blocking duration depends on the specific protocol used to manage the semaphores.

These protocols should prevent:

  • Indeterminate blocking.

  • Chain blocking.

  • Deadlocks.