Combined Scheduling of Time-Triggered and Priority-Based Task Sets in Ravenscar

Similar documents
Combining Time-Triggered Plans with Priority-Scheduled Task Sets

Outline of the talk. The egg and the hen Or, Which comes first: the problem or the solution? Challenges (2/6) Challenges (1/6) Recall of basics


Integrated Schedulers for a Predictable Interrupt Management on Real-Time Kernels

Real-Time (Paradigms) (47)

Extending RTAI Linux with Fixed-Priority Scheduling with Deferred Preemption

Mission Modes for Safety Critical Java

Ensuring Schedulability of Spacecraft Flight Software

The Ravenscar Tasking Profile for High Integrity Real-Time Programs

Implementing Scheduling Algorithms. Real-Time and Embedded Systems (M) Lecture 9

AI Non-Preemptive Dispatching. A new dispatching policy is defined for the non-preemptive execution of Ada tasks.

AirTight: A Resilient Wireless Communication Protocol for Mixed- Criticality Systems

Department of Computer Science Institute for System Architecture, Operating Systems Group REAL-TIME MICHAEL ROITZSCH OVERVIEW

Precedence Graphs Revisited (Again)

Resource Access Control (2) Real-Time and Embedded Systems (M) Lecture 14

MaRTE-OS: Minimal Real-Time Operating System for Embedded Applications

Ada and Real-Time. Prof. Lars Asplund. Mälardalen University, Computer Science

TDDD07 Real-time Systems Lecture 10: Wrapping up & Real-time operating systems

REAL TIME AND EMBEDDED SYSTEMS (M)

Real-time Support in Operating Systems

Fast on Average, Predictable in the Worst Case

Subject Name: OPERATING SYSTEMS. Subject Code: 10EC65. Prepared By: Kala H S and Remya R. Department: ECE. Date:

Time Triggered and Event Triggered; Off-line Scheduling

Traditional Approaches to Modeling

Reducing Priority Inversion in Interprocessor Synchronization on a Fixed-Priority Bus

Introduction to Lab 2

Suggestions for Stream Based Parallel Systems in Ada

Resource-bound process algebras for Schedulability and Performance Analysis of Real-Time and Embedded Systems

Implementing Sporadic Servers in Ada

Embedded Systems: OS. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University

Exam Review TexPoint fonts used in EMF.

Introduction to Lab 2

Real-Time Java. Martin Schöberl

Tasks. Task Implementation and management

Overview. Sporadic tasks. Recall. Aperiodic tasks. Real-time Systems D0003E 2/26/2009. Loosening D = T. Aperiodic tasks. Response-time analysis

Real-Time Systems. Real-Time Operating Systems

Embedded Systems: OS

AUTOBEST: A United AUTOSAR-OS And ARINC 653 Kernel. Alexander Züpke, Marc Bommert, Daniel Lohmann

Copyright Notice. COMP9242 Advanced Operating Systems S2/2014 Week 9: Real-Time Systems. Real-Time System: Definition

The Ravenscar Tasking Profile for High Integrity Real-Time Programs

Operating system concepts. Task scheduling

REAL-TIME OVERVIEW SO FAR MICHAEL ROITZSCH. talked about in-kernel building blocks:

DISTRIBUTED REAL-TIME SYSTEMS

Workload model /2. Workload model /1. Protected objects /1. Ada code patterns for provable real-time programming. UniPD - LM Informatica /2015

An Approach to Task Attribute Assignment for Uniprocessor Systems

Efficient Implementation of IPCP and DFP

Issues in Programming Language Design for Embedded RT Systems

Priority Inversion in Multi Processor Systems due to Protected Actions

Multimedia Systems 2011/2012

ARTIST-Relevant Research from Linköping

NuttX Realtime Programming

Green Hills Software, Inc.

Efficient Throughput-Guarantees for Latency-Sensitive Networks-On-Chip

Analyzing Real-Time Systems

Speculative Locks. Dept. of Computer Science

ECE 612: Embedded and Real-Time Systems

Real-Time Systems and Programming Languages

A Predictable RTOS. Mantis Cheng Department of Computer Science University of Victoria

Real-Time Systems Hermann Härtig Real-Time Operating Systems Brief Overview

Concurrent activities in daily life. Real world exposed programs. Scheduling of programs. Tasks in engine system. Engine system

dit RMI-HRT: Remote Method Invocation for Hard Real Time Systems UPM D. Tejera, A. Alonso, M.A de Miguel Universidad Politécnica de Madrid

Task Scheduling of Real- Time Media Processing with Hardware-Assisted Virtualization Heikki Holopainen

Resource Reservation & Resource Servers

EMERALDS: a small-memory real-time microkernel

Response Time Analysis of Asynchronous Real-Time Systems

Implementing a High-Integrity Executive using Ravenscar

Final Examination. Thursday, December 3, :20PM 620 PM. NAME: Solutions to Selected Problems ID:

1.1 Explain the difference between fast computing and real-time computing.

Introduction to Real-Time Systems and Multitasking. Microcomputer Architecture and Interfacing Colorado School of Mines Professor William Hoff

Towards Principled OS-Level Temporal Isola?on

Distributed Embedded Systems and realtime networks

REAL-TIME OPERATING SYSTEMS SHORT OVERVIEW

The ASSERT Virtual Machine Kernel: Support for preservation of temporal properties

Computer System Overview. Chapter 1

Scheduling Algorithm and Analysis

Commercial Real-time Operating Systems An Introduction. Swaminathan Sivasubramanian Dependable Computing & Networking Laboratory

Empirical Approximation and Impact on Schedulability

Communication in Avionics

A Framework for Real-Time Utilities for Ada 2005

Scheduling Sporadic and Aperiodic Events in a Hard Real-Time System

Process Scheduling Part 2

15: OS Scheduling and Buffering

Asynchronous Event Handling and Safety Critical Java

Organic Self-organizing Bus-based Communication Systems

CS4514 Real Time Scheduling

Predictable Interrupt Management and Scheduling in the Composite Component-based System

Erlang. Types, Abstract Form & Core. Salvador Tamarit Muñoz. Universitat Politècnica de València

Introduction. Real Time Systems. Flies in a bottle. Real-time kernel

The Real-time Specification for Java

Time Handling in Programming Language

Computer System Overview

AADL Subsets Annex Update

Real-Time Internet of Things

Programming Languages for Real-Time Systems. LS 12, TU Dortmund

Ada Issue Support for Deadlines and Earliest Deadline First Scheduling

Real-Time Programming with GNAT: Specialised Kernels versus POSIX Threads

Mixed Criticality Scheduling in Time-Triggered Legacy Systems

CPSC 313, 04w Term 2 Midterm Exam 2 Solutions

THE ASSERT VIRTUAL MACHINE KERNEL: SUPPORT FOR PRESERVATION OF TEMPORAL PROPERTIES

Tuned Pipes: End-to-end Throughput and Delay Guarantees for USB Devices. Ahmad Golchin, Zhuoqun Cheng and Richard West Boston University

Transcription:

Combined Scheduling of Time-Triggered and Priority-Based Task Sets in Ravenscar Jorge Real, Sergio Sáez, Alfons Crespo Universitat Politècnica de València, Spain 23 rd International Conference on Reliable Software Technologies - Ada-Europe 2018 - Lisbon, Portugal, June 18-22, 2018

Outline Introduction System Model TT Scheduler TT Patterns Experimental Results Conclusion 2

Introduction 3

Introduction RT control & communication tasks need precise timing execute close to their intended start time In practice, release delays occur Actual_Start_Time - Intended_Start_Time Degrade performance of digital controllers Hinder synchronisation of communication tasks e.g. under Deadline Monotonic scheduling: d 1 d 2 d 3 4

Introduction Priority-based scheduling Time/logic separation, flexibility Potentially large release delays (interference, blocking) Techniques exist for PB scheduled systems Reduce periods/deadlines to gain priority Task decomposition (e.g., initial-final parts at high prio) Time-triggered scheduling Predictable timing, release delays determined a priori Building a schedule is complex (NP-complete) Problem gets worse with more/longer tasks 5

Introduction Our proposal (2016) was to combine a TT plan including only delay-sensitive tasks Typically, control and communication tasks a PB schedule for delay-tolerant tasks HMI, logging, sporadics Highest prio. of PB scheduler reserved for TT tasks Best of both worlds Fewer tasks lead to simpler TT plans PB benefits for the rest of tasks No need for off-line plan, no task splitting Proposal included TT model, Ada implementation and TT task patterns 6

Introduction Our proposal (2018) is to make the approach compatible with the Ravenscar tasking profile Take it closer to certifiable, embedded, HI systems, natural niches of Ravenscar and TT technology We have dropped soft real-time features that required non-ravenscar mechanisms Overrun avoidance at the task level (ATC) Overrun tolerance with priority demotion (dynamic priorities) But we have also added new features 7

System Model 8

System Model Two task subsets Delay-sensitive tasks: run according to a TT plan, using the top priority of a PB scheduler Delay-tolerant tasks: PB scheduled using rest of priorities TT plan = ordered sequence of time slots Each slot has a duration and starts right after previous Sequence repeated cyclically Actions during slot duration depend on slot type Run one TT task, under different regimes Other scheduler actions Schedulability: TT plan regarded as a high priority flow of tasks with offsets 9

System Model Slot types Regular [1,2] Run TT task n, with overrun check (fail Program_Error) Continuation [1c] Run TT task n, Hold/Resume for sliced execution of long tasks Optional [(3)] Run TT task n, if the task so requires Empty [ ] Spare time available for PB tasks Mode change [ ] Process pending mode change request 10

TT Scheduler 11

TT Scheduler Arbitrates execution of the TT plan Release TT workload at slot switch Check for overruns Apply Hold/Resume Driven by a Timing Event set to next slot switch Scheduler actions depend on type of slot Empty slot: nothing to do slot available for PB Mode change slot: empty + enforce new plan at slot end Regular, continuation and optional: apply the model 12

TT Scheduler Generic package on Nr_Of_Work_IDs Visible types for defining slots and building plans type Kind_Of_Slot is (TT_Work_Slot, Empty_Slot, Mode_Change_Slot); type Time_Slot (Kind : Kind_Of_Slot := TT_Work_Slot) is record Slot_Duration : Ada.Real_Time.Time_Span; case Kind is when TT_Work_Slot => Work_Id : TT_Work_Id; -- Range 1..Nr_Of_Work_IDs Is_Continuation : Boolean := False; Is_Optional : Boolean := False; when others => null; end case; end record; type Time_Triggered_Plan is array (Natural range <>) of Time_Slot; type Time_Triggered_Plan_Access is access all Time_Triggered_Plan; 13

TT Scheduler Generic package on Nr_Of_Work_IDs Visible types for defining slots and building plans Visible procedures Set_Plan (TTP) Set the next TT plan to run Wait_For_Activation (Work_Id) For TT tasks to wait for own slot Continue_Sliced, Leave_TT_Level (later) Internal data structure Work_Control_Block Has_Completed, Is_Waiting, Work_Thread_ID, Array of suspension objects for TT tasks to wait PO with TE handler 14

TT Patterns 15

TT Patterns Patterns using Regular slots Simple TT Task Initial - Final I-F Task 16

TT Patterns Patterns using Continuation slots Sliced TT Task Pattern looks like Simple TT Task, but plan is different One or more cont. slots, ending with a terminal regular slot Hold/Resume implemented using runtime thread ops 17

TT Patterns Early completion of sliced sequence Sliced TT Task Work_Control_Block has all needed flags for the TT scheduler to handle propagation 18

TT Patterns Hold deserves special consideration if sliced task is running a protected action (PA) Deferred Hold blocking time charged to next slot Use Ceiling at scheduler priority (Interrupt_Priority'Last) Only acceotable with granted very short PAs (not checkable) Annotate pending Hold and do it at end of PA runtime In both cases, blocking can be absorbed with empty slot Need to check that empty follows continuation Need to account potential interference to PB tasks Alternatively, forbid PAs while running sliced Not trivial to detect statically Can be detected at runtime (Program_Error) 19

TT Patterns Other patterns with sliced parts and motivation for Continue_Sliced I-Ms-F and IMs-F 20

TT Patterns Patterns with non-tt parts Initial - Priority_Based Final (I-P-F) Dynamic priorities, but in a restricted manner Changes only at instance of affected task Changes only between base and TT priorities Conceptually, like a ceiling inherited when running the TT parts 21

TT Patterns Pattern using Optional slot Priority_Based - Optional_Final (P-[F]) TT part is optional "No-show" is not an error with optional slots 22

Experimental Results 23

Experimental Results Measured release delays Release delay (ms) 24

Experimental Results Measured release delays with overhead correction Release delay (ms) 25

Conclusion TT scheduling transported to Ravenscar Dropped non-ravenscar features (ATC, dyn prio) Added optional and continuation slots Pursue standardisation All code available in GitHub 26

27