1 / 17

Introduction to Real-Time Scheduling

Introduction to Real-Time Scheduling. Fred Kuhns Applied Research Laboratory Computer Science Washington University. Introduction. Considerations: schedulability analysis performed static or dynamic schedulability analysis analysis result includes schedule Scheduling Paradigms

mattox
Télécharger la présentation

Introduction to Real-Time Scheduling

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Introduction to Real-Time Scheduling Fred Kuhns Applied Research Laboratory Computer Science Washington University CS523S: Operating Systems

  2. Introduction • Considerations: • schedulability analysis performed • static or dynamic schedulability analysis • analysis result includes schedule • Scheduling Paradigms • static table-driven - static analysis and schedule • static priority driven - static analysis, no (explicit) schedule, priorities. • dynamic planning based - feasibility check at run-time, schedule produced • dynamic best effort - No feasibility check, attpemts to meet deadlines but no guarantee. CS523S: Operating Systems

  3. Scheduling Algorithms • Most instances, scheduling problem is intractable • Resource constrained scheduling is NP-complete. Precedence constraints agravate the problem. • Heuristics and approximation techniques used to handle tasks with complex requirements. CS523S: Operating Systems

  4. Static Table Driven • Typically applied to systems with safety critical requirements. • Resources preallocated to tasks • Periodic tasks: feasible schedule if and only if there exists a feasible schedule for the Hyperperiod (least common multiple of the periods) • RM or EDF used for relatively simple systems (simple characteristics) CS523S: Operating Systems

  5. Priority-driven Preemptive • Most famous analysis of the problem is Liu and Layland where they described RM and EDF. • single processor, periodic tasks, preemption • RM: static priorities based on period. Optimal among static-priority schemes. • EDF: dynamic priority based on deadline. • May assign priority based on laxity - LLF: Least Laxity First • May assign priority based on any of the tasks parameters CS523S: Operating Systems

  6. Priority Driven • Preemptive scheduling may simplify analysis but overhead needs to be considered. • scheduling algorithm • task dispatcher • context switch overhead CS523S: Operating Systems

  7. Dynamic Planning-based • Focus on dynamic feasibility checks • Must consider worst case execution times, resource requirements, timing constraints, periodic tasks, preemption, precedence constraints, importance levels and fault tolerance • If task arrival times are not known a priori, cannot guarantee performance • Various heuristic algorithms for scheduling tasks in a distributed environment. CS523S: Operating Systems

  8. Dynamic Best-Effort • Used by many systems: system computes task priorities and schedules accordingly. Extensive simulations are used to gain confidence in behavior • May compensate for other priority driven algorithms (EDF and RM) which perform poorly in overload conditions • May use a value function to schedule during overload: maximize sum of task values. May also discard low value tasks • Dynamic scheduling is optimal if it always produces a feasible schedule whenever a clairvoyant algorithm does. CS523S: Operating Systems

  9. Other Issues • Fault tolerance • static: primary and alternate tasks. • static: precomputed contingency schedules to speed recovery • fault-tolerance vs timeliness • Combine dynamic scheduling with imprecise computations to effect tradeoffs CS523S: Operating Systems

  10. Resource Reclaiming • Utilizing unused time: variance in task execution time may result in unused time. • Run time anomalies: when actual computation times of nonpreemptive tasks differ from expected causing unexpected behavior. • Resource reclamation algorithms can improve schedulability of dynamically arriving tasks. CS523S: Operating Systems

  11. RTOS • Primary function areas • Process management and synchronization • Memory management • Interprocess communication • I/O • Categories of RTOS • small proprietary • RT extensions to commercial timesharing systems • research operating systems CS523S: Operating Systems

  12. Small Proprietary OSes • Typically, kernel provides • fast context switch, small size, quick interrupt response time (predictable?), minimize interrupt disable times, memory partitions (no virtual memory, why?), special sequential files (why?) • Timing • bounded execution time of most primitives • real-time clock • priority scheduling mechanism • special alarms and timeout CS523S: Operating Systems

  13. RT Extensions to Commercial OSes • Advanced SW development environments • Problems: • optimized for average case • assigns resources on demand • ignore application specific information • independent CPU scheduling and resource allcoation CS523S: Operating Systems

  14. Research Operating System • Develop extended or new process models • RT synchronization mechanisms • facilitate timing analysis • fault tolerance • multiprocessor or distributed support • real-time micro-kernel CS523S: Operating Systems

  15. Clock Driven • Scheduling time instants: When scheduling decisions are made • clock-driven - instants predefined offline • table-driven - table precomputed offline Scheduling time instants CS523S: Operating Systems

  16. Weighted Round Roben • Round Robin Scheduling - time-sharing systems • Weighted Round Robin: associate weight with each job. • weight w = number of time slices • adjusting weight allocates CPU shares CS523S: Operating Systems

  17. Priority Driven • Work-conserving: The highest priority, runnable job is always dispatched to available CPU • resources are never idle while runnable jobs • Priority list, preemptions and other rules describe algorithm completly • Example algorithms: EDF, FIFO, LIFO etc. • preemption versus non-preemption CS523S: Operating Systems

More Related