The Mana Project Lars Asplund Kristina Lundqvist Uppsala University, Information Technology, Dept of Computer Systems.

Slides:



Advertisements
Similar presentations
Automated Theorem Proving Lecture 1. Program verification is undecidable! Given program P and specification S, does P satisfy S?
Advertisements

Chapter 7 - Resource Access Protocols (Critical Sections) Protocols: No Preemptions During Critical Sections Once a job enters a critical section, it cannot.
Real-Time Systems and Programming Languages © Alan Burns and Andy Wellings Chapter 12: Programming Schedulable Systems.
Priority INHERITANCE PROTOCOLS
Slide: 1 The Implementation of Ada 2005 Synchronized Interfaces in the GNAT Compiler Javier Miranda Hristian Kirtchev Edmond Schonberg Presentation cover.
CprE 458/558: Real-Time Systems (G. Manimaran)1 CprE 458/558: Real-Time Systems Resource Access Control Protocols.
Concurrency Important and difficult (Ada slides copied from Ed Schonberg)
Simulation Verification of Different Constraints in System Level Design in SystemC Piyush Ranjan Satapathy CS220 Class Project Presentation.
UPPAAL Introduction Chien-Liang Chen.
Ch. 7 Process Synchronization (1/2) I Background F Producer - Consumer process :  Compiler, Assembler, Loader, · · · · · · F Bounded buffer.
Copyright © 2001 Praxis Critical Systems Limited  New and Exciting Things in the World of SPARK Roderick Chapman Praxis Critical Systems.
Verification of Hybrid Systems An Assessment of Current Techniques Holly Bowen.
Adapted from A. Burns, B. Dobbing, T. Vardanega: Guide for the use of the Ada Ravenscar Profile in high integrity systems, Univ. of York Tech. Report YCS ,
From HRT-HOOD to ADA95 Real-Time Systems Lecture 5 Copyright, 2001 © Adam Czajka.
Tasks Periodic The period is the amount of time between each iteration of a regularly repeated task Time driven The task is automatically activated by.
Automatic Verification of Component-Based Real-Time CORBA Applications Gabor Madl Sherif Abdelwahed
Model for Supporting High Integrity and Fault Tolerance Brian Dobbing, Aonix Europe Ltd Chief Technical Consultant.
Transparent Environment for Replicated Ravenscar Applications Luís Miguel Pinho Francisco Vasques Ada-Europe 2002 Vienna, Austria June 2002.
Chapter 5 Processes and Threads Copyright © 2008.
Building Reliable Software Requirements and Methods.
Concurrency in Ada Programming Languages 1 Robert Dewar.
Concurrency in Ada What concurrency is all about Relation to operating systems Language facilities vs library packages POSIX threads Ada concurrency Real.
INTRODUCTION OS/2 was initially designed to extend the capabilities of DOS by IBM and Microsoft Corporations. To create a single industry-standard operating.
Scheduler Activations Effective Kernel Support for the User-Level Management of Parallelism.
Introduction to Operating Systems – Windows process and thread management In this lecture we will cover Threads and processes in Windows Thread priority.
Monitors CSCI 444/544 Operating Systems Fall 2008.
Verifying Distributed Real-time Properties of Embedded Systems via Graph Transformations and Model Checking Gabor Madl
Model-based Analysis of Distributed Real-time Embedded System Composition Gabor Madl Sherif Abdelwahed
November 18, 2004 Embedded System Design Flow Arkadeb Ghosal Alessandro Pinto Daniele Gasperini Alberto Sangiovanni-Vincentelli
CprE 458/558: Real-Time Systems
Describing Syntax and Semantics
MicroC/OS-II Embedded Systems Design and Implementation.
Timing analysis of an SDL subset in UPPAAL Anders Hessel Institution of Information Technology Department of Computer Systems Uppsala University M.Sc.
A case study System to Software Integrity Matteo Bordin Jérôme Hugues Cyrille Comar, Ed Falis, Franco Gasperoni, Yannick Moy, Elie Richa.
1 Embedded Computer System Laboratory RTOS Modeling in Electronic System Level Design.
Python quick start guide
ECE 720T5 Winter 2014 Cyber-Physical Systems Rodolfo Pellizzoni.
Experience with Processes and Monitors in Mesa
Dave Archer - CS533 - Spring On the Duality of Operating System Structures Hugh C. Lauer, Roger M. Needham.
12/1/98 COP 4020 Programming Languages Parallel Programming in Ada and Java Gregory A. Riccardi Department of Computer Science Florida State University.
Real-Time Java on JOP Martin Schöberl. Real-Time Java on JOP2 Overview RTSJ – why not Simple RT profile Scheduler implementation User defined scheduling.
Real Time Operating Systems Lecture 10 David Andrews
Real-Time Operating Systems for Embedded Computing 李姿宜 R ,06,10.
Chapter 101 Multiprocessor and Real- Time Scheduling Chapter 10.
1 Programming Languages and the Software Production Process Informal Cardelli’s metrics of programming languages fitness to real-time applications: Economy.
Vendor Presentation SigAda 2005 George Romanski
02/04/2008 A Concrete Syntax for UML 2.1 Action Semantics Using +CAL 13th IEEE International Conference on Engineering of Complex Computer Systems – ICECCS.
Using a simple Rendez-Vous mechanism in Java
ON THE DUALITY OF OPERATING SYSTEM STRUCTURES Hugh C. Lauer and Roger M. Needham Presented by: Ali R. Butt (adapted from many slides available online and.
Chapter 3 Part II Describing Syntax and Semantics.
System Components ● There are three main protected modules of the System  The Hardware Abstraction Layer ● A virtual machine to configure all devices.
MicroC/OS-II S O T R.  MicroC/OS-II (commonly termed as µC/OS- II or uC/OS-II), is the acronym for Micro-Controller Operating Systems Version 2.  It.
1 VxWorks 5.4 Group A3: Wafa’ Jaffal Kathryn Bean.
Real time scheduling G.Anuradha Ref:- Stallings. Real time computing Correctness of the system depends not only on the logical result of computation,
13-1 Chapter 13 Concurrency Topics Introduction Introduction to Subprogram-Level Concurrency Semaphores Monitors Message Passing Java Threads C# Threads.
CSCI1600: Embedded and Real Time Software Lecture 23: Real Time Scheduling I Steven Reiss, Fall 2015.
Ada Constructs Revisited 21 Oct Constructs to be Expanded Generics Tasking Elaboration.
1 Process Description and Control Chapter 3. 2 Process A program in execution An instance of a program running on a computer The entity that can be assigned.
Software Systems Division (TEC-SW) ASSERT process & toolchain Maxime Perrotin, ESA.
Undergraduate course on Real-time Systems Linköping University TDDD07 Real-time Systems Lecture 2: Scheduling II Simin Nadjm-Tehrani Real-time Systems.
Embedded Real-Time Systems Processing interrupts Lecturer Department University.
CS5270 Lecture 41 Timed Automata I CS 5270 Lecture 4.
Real-Time Operating Systems RTOS For Embedded systems.
PROCESS MANAGEMENT IN MACH
The Mach System Sri Ramkrishna.
Last Week Introduced operating systems Discussed the Kernel
Lecture 2 Part 2 Process Synchronization
System to Software Integrity
Chapter 3: Process Management
Presentation transcript:

The Mana Project Lars Asplund Kristina Lundqvist Uppsala University, Information Technology, Dept of Computer Systems

The Mana Project Lars Asplund Kristina Lundqvist Uppsala University, Information Technology, Dept of Computer Systems

Background Formal methods have been used in a number of safety critical systems –TGV –train signalling system in Paris Today's safety critical systems use cyclic executives. Research take for granted that a system consists of processes (scheduling, priorities), and that there is communications between these. Process based safety critical systems - formal methods (Raven, Enea …)

Ada-83 Tasking Rendez-vous Dynamic Hierarchy Termination... Ada83 For High Integrity Systems Subsets: SPARK (No tasking) Boeing... Complex Run-Time No Formal Proofs

Ada-95 Tasking Rendez-vous Dynamic Hierarchy Termination... Protected Objects ATC requeue delay until new interrupts task attributes... Ada95Subsets: GNORT (Gnat NO Run-Time) SPARK-95 Ravenscar Tasking Protected Objects delay until new interrupts task attribute

Ada 95 and Ravenscar The Ravenscar profile has been proposed as a possible standard runtime support system suitable for safety critical real-time Ada 95 applications. The subset provides enough functionality for targeted systems.

Ravenscar - tasking Library level No dynamic creation No unchecked deallocation Non-terminating No entries No user defined attributes Keep task discriminants No ATC

Ravenscar - Protected Objects Single Entry Barrier a single Boolean Only one task in the entry queue

Ravenscar - Communication No Rendez vous No requeue No select statement Interrupts are mapped only to PO procedures

Ravenscar - Real Time delay until for delays No Calendar Clock from Real-Time package No dynamic priorities Immediate Ceiling Priority

Ravenscar Key real-time features include: Fixed set of processes (tasks), with fixed priority scheduling. –No hierarchy of tasks. –Tasks are non-terminating. ‘Delay until’ operations, allowing the implementation of periodic tasks. Basic provision for releasing sporadic processes in response to interrupts.

Two approaches Build and test –Raven Formally verify –Mana

The Mana Project Project Aim: Develop and model a run-time system using formal development methodologies. Implement for the gnu Ada- 95 compiler. Target: Safety critical systems at the highest degree of safety, e.g. Nuclear power plants, ATC, aircraft,...

The Mana Project Chosen language: –Subset of Ada 95: Ravenscar Representation model: Timed Automata –FSAs extended with clocks and constraints Verification scheme: A Real-Time Model Checker –UPPAAL: Modelling, simulation, and verification tool

A System Model Scheduler PO T1 T2T3 Delay Queue Clock T0 Application Run-Time Kernel P E F Delay until Task dispatch Ready Queue

A Verification Session Design.Timed Automata Model of 1. An application (user code) 2. Run-time kernel (Mana) Simulation of design Verification by checking reachability properties

A System Model Scheduler PO T1 T2T3 Delay Queue Clock T0 Application Run-Time Kernel P E F Delay until Task dispatch Ready Queue

Simple application (T1) task body T1 is -- at priority 1 NextTime : Time := Clock ; begin loop Work (5); delay until NextTime; PO.P; -- releases the PO entry NextTime := NextTime ; end loop; end T1; Delay seq Prot Proc

Protected Procedure Calling Task Procedure Start Procedure begin Preemption Release of Entry

Task T2 task body T2 is -- at priority 2 Cond : Boolean := false; begin loop Work (10); if Cond then PO.E; else Cond := not Cond; Work (5); end if; Work (4); end loop; end T2; Prot Entry

Protected Entry Calling Task Entry Start Lock Free and no Barrier Barrier true Released by Procedure

Protected Entry Calling Task ExecutingPreemption ExceptionPreemption in exception Normal end

Task T3 task body T3 is -- at priority 3 NextTime : Time := Clock ; begin loop case Cmd is when Ack => for I in 1..4 loop Work (5); PO.P; end loop; when Connect => Work (15); when Disconnect => Work (20); when Send => Work (10); end case; delay until NextTime; NextTime := NextTime ; end loop; end T3; Prot Proc Delay

A view of the System F P E Prot Obj Scheduler T1 T2T3 Delay Queue Clock T0 Delay until Task dispatch Ready Queue

Miscellaneous Protected Function Delay Queue System Clock

The Run-Time System F P E Prot Obj

Task T1 task body T1 is -- at priority 1 NextTime : Time := Clock ; begin loop work (5); delay until NextTime; PO.P; -- releases the PO entry NextTime := NextTime ; end loop; end T1; Delay seq Prot Proc

Building the System F P E Prot Obj T1

Task T2 task body T2 is -- at priority 2 Cond : Boolean := false; begin loop work (10); if Cond then PO.E; else Cond := not Cond; work (5); end if; work (4); end loop; end T2; Prot Entry

A more Complete System F P E Prot Obj T1 T2

Task T3 task body T3 is -- at priority 3 NextTime : Time := Clock ; begin loop case Cmd is when Ack => for I in 1..4 loop work (5); PO.P; end loop; when Connect => work (15); when Disconnect => work (20); when Send => work (10); end case; delay until NextTime; NextTime := NextTime ; end loop; end T3; Prot Proc Delay

A Complete System F P E Prot Obj T1 T2 T3

Scheduler and Idle process Resume! Suspend! Resume! Preempt! Resume? Pcpu:= PLow Preempt? Start Idle Process is running Resume? Pcpu:= PMed Resume? Pcpu:= PHigh Medium Process available Medium Process running Idle Process Preempted High Process available High Process running Medium Process Preempted Idle Process Scheduler

Verifying Reachability Properties Statements format: Invariant(  )  Possible(  ) Where  (atomic-formula) |      |  ’ Examples: –Possible(CPU’Count > 1) At any point in time, there must be only one task executing –Invariant(P.Completed and E.Queue’Count > 0 and E.Barrier imply Exec(E.Code, P.Context))

Conclusions and future work Have today modelled a full Ravenscar compliant RTK –PO: priorities, preemption Procedure, Function and Entry Release on behalf –delay until –exception handling in PO –interrupt

Conclusions and future work Verified the Mana-RTK together with a small application Next step is to implement the Mana-RTK –Automatic translation from Ada into TA