Real Time Operating Systems Lecture 10 - PowerPoint PPT Presentation

1 / 14
About This Presentation
Title:

Real Time Operating Systems Lecture 10

Description:

Small Numbers of Programs. Virtual Memory Will Not be Required For ... Countdown. System Time. IPC. Synch. Asynch. File Mgt. Virtual Mem. Cache. Task Taxonomy ... – PowerPoint PPT presentation

Number of Views:48
Avg rating:3.0/5.0
Slides: 15
Provided by: DAnd81
Category:

less

Transcript and Presenter's Notes

Title: Real Time Operating Systems Lecture 10


1
Real Time Operating SystemsLecture 10
  • David Andrews
  • dandrews_at_eecs.ukans.edu

2
What We Will Cover Today
  • Operating Systems Services
  • Base Components
  • Real Time Considerations
  • Task Management
  • Time Triggered
  • Event Triggered
  • Interprocess Communications
  • Blocking
  • Non-Blocking
  • Time Management
  • Services
  • Maintenance

3
Operating Systems Functionality
  • Considerations
  • Footprint An Issue
  • Small Numbers of Programs
  • Virtual Memory Will Not be Required For Our Study

4
Task Taxonomy
  • Simple Task (S-task)
  • No synchronization within task
  • Executes from beginning to end, subject only
    to pre-emption by interrupts
  • Might be triggered by some other task
    initially
  • Might communicate results to some other task
  • But, no internal synchronization with other
    tasks
  • Complex Task (C-task)
  • Has some synchronization with other tasks
  • May have to wait for another task to process
    a request
  • May have to wait for I/O to complete
  • May have to wait for resource to become
    available (memory, network)
  • Timing depends on the rest of the system
  • So, C-tasks are bad because they increase
    complexity
  • And, C-tasks make it more difficult to
    analyze system timing properties

5
C-Task Execution time
  • S-Task execution time plus
  • Waiting for other processes
  • Not so bad if other tasks are S-Tasks and it
    is just a remote procedure call
  • General case can be impractical to handle
  • General solution
  • Break C-tasks into S-tasks separated by
    interactions
  • Then, make sure that S-tasks are scheduled far
    enough apart for interaction to complete
  • Great when it works...

6
Task Management
  • Key component is scheduler
  • Static Schedule Built up Prior To Running
  • Scheduler Develops Time Triggered Schedule
  • Periodic/Predictable
  • Dynamic Schedule Built During Run Time
  • Can Be Based on Worst Case Execution Time (WCET)
  • Scheduler Invoked by events
  • Timer, Interrupts, suspend, resume, etc.

7
Worst Case Execution Time (simple version)...
  • Assume a simple task (S-task) that just executes
    its own code without coordinating with other
    threads or I/O
  • How hard could it be to determine timing?
  • Timing is once through the code jitter due to
  • Non-fixed loop iteration count
  • Non-fixed number of recursive calls
  • Garbage collection
  • Conditional statement execution asymmetry
    (if/else path timings)
  • Effects of hardware non-determinism
  • Cache
  • Data-dependent instruction execution time

8
Plus S-Task Context Swapping
  • Overhead from task switching OS Hardware
  • multiply by number of pre-emptions
  • Gives WCAO (Worst-Case Administrative
    Overhead) due to pre-emptions

9
Plus Effects From Nested Interrupts
  • What if you have multiple prioritized interrupts
  • Worst case execution time for interrupt at
    Priority X is Execution time for interrupt at
    Priority 1 (perhaps multiple times)
  • Execution time for interrupt at Priority 2
    (perhaps multiple times)
  • Execution time for interrupt at Priority 3
    (perhaps multiple times)
  • Execution time for interrupt at Priority X
    (perhaps multiple times)
  • You can bound this as long as the period of each
    interrupt is bounded
  • Same algorithm as for computing worst case CAN
    message latency(!)
  • Scheduling on a CPU is a dual problem to
    scheduling on a network

10
Task Management
  • Time Triggered
  • A priori build Task-Descriptor Table (TADL)

11
Interprocess Communications
  • IPC can support Messages, or Common Data Regions
  • Messages
  • We have already discussed synch/asynch
  • Asynchronous can be implemented in S-Tasks
  • Synchronous (suspend) can be implemented in
    C-Tasks
  • Common Data Regions
  • Implemented via shared memory
  • Introduces critical regions
  • Semaphore Operations needed
  • Test and Set

12
Time Management
  • Time Management provides
  • Clock synchronization
  • Time stamping
  • Watchdog Timers
  • User Accessible
  • Operating System

13
Real Time Operating Systems
  • Unix feel
  • QNX
  • LinxOS
  • Smaller RTOSs
  • OS9, Microware
  • VxWorks (be sure to get the memory protection
    extension)
  • pSOS
  • RTX, VenturCom
  • A few research/freeware RTOS systems
  • KURT (KU real Time)
  • RT-Mach, CMU
  • others
  • Windows WinCE embedded NT, Windows RT add-on
    products

14
Questions To Ask Your RTOS Vendor
  • Real Time Operating System
  • Purports to ensure timeliness of task
    execution
  • Uses task priorities and a scheduling
    algorithm
  • Hard questions
  • What is the tasking model (preemptive or
    non-preemptive)? Scheduler?
  • What is the longest task switch latency?
  • Function of interrupt masking time
  • How big is the footprint for a real system?
    (Not a stripped-down toy system)
  • Does it have inter-task memory protection?
  • How much of POSIX does it really support?
  • How long does the system take to reboot?
  • What is the runtime license fee?
  • How robust is it (and what is the exception
    handling model?)
Write a Comment
User Comments (0)
About PowerShow.com