Introduction - WordPress.com · 2014. 6. 20. · POK An ARINC653-compliant operating system...

24
POK An ARINC653-compliant operating system released under the BSD licence Julien Delange, European Space Agency <[email protected]> Laurent Lec, MakeMeReach <[email protected]>

Transcript of Introduction - WordPress.com · 2014. 6. 20. · POK An ARINC653-compliant operating system...

Page 1: Introduction - WordPress.com · 2014. 6. 20. · POK An ARINC653-compliant operating system released under the BSD licence Julien Delange, European Space Agency

POK An ARINC653-compliant operating system released under the BSD licence

Julien Delange, European Space Agency <[email protected]>

Laurent Lec, MakeMeReach <[email protected]>

Page 2: Introduction - WordPress.com · 2014. 6. 20. · POK An ARINC653-compliant operating system released under the BSD licence Julien Delange, European Space Agency

Introduction

Page 3: Introduction - WordPress.com · 2014. 6. 20. · POK An ARINC653-compliant operating system released under the BSD licence Julien Delange, European Space Agency

Problems

Safety-critical systems must grant:

¤  isolation;

¤  code analysis;

¤  automatic system configuration.

Page 4: Introduction - WordPress.com · 2014. 6. 20. · POK An ARINC653-compliant operating system released under the BSD licence Julien Delange, European Space Agency

Approach

POK was designed to provide:

¤  a configuration and validation tool (1);

¤  an analysis framework (2);

¤  time and space isolation (3).

AADL models

Code generator

Configuration Plate-forme (POK)

Implementation

Specifications validation (1)

(2)

(3)

Page 5: Introduction - WordPress.com · 2014. 6. 20. · POK An ARINC653-compliant operating system released under the BSD licence Julien Delange, European Space Agency

1 – The POK execution platform

Page 6: Introduction - WordPress.com · 2014. 6. 20. · POK An ARINC653-compliant operating system released under the BSD licence Julien Delange, European Space Agency

Services of kernel and partitions

Hardware Abstraction Layer

FaultHandling

TimeManagement

MemoryManagement

Timeisolation

Spaceisolation

Inter-partitionscommunication

Kern

el le

vel

Kernelinterface

Tasking Intra-partitioncommunications

Maths functions libc POSIX ARINC653

Cipher algorithms Device drivers code

Parti

tion

Leve

l(li

bpok

)

Page 7: Introduction - WordPress.com · 2014. 6. 20. · POK An ARINC653-compliant operating system released under the BSD licence Julien Delange, European Space Agency

Kernel services

¤  Hardware abstraction layer

¤  Memory management

¤  Time management

¤  Fault handling

¤  Time isolation

¤  Space isolation

¤  Inter-partition communication

Page 8: Introduction - WordPress.com · 2014. 6. 20. · POK An ARINC653-compliant operating system released under the BSD licence Julien Delange, European Space Agency

Partition services

¤  Kernel interface

¤  Tasking (threads, locking primitives…)

¤  Libc, POSIX, ARINC653, maths libraries

¤  Device drivers

¤  Cipher algorithms

¤  Intra-partition communication

¤  C and Ada support

Page 9: Introduction - WordPress.com · 2014. 6. 20. · POK An ARINC653-compliant operating system released under the BSD licence Julien Delange, European Space Agency

Time isolation

¤  Partitions are allocated time slices.

¤  POK offers both partition (RR) and threads scheduling (FIFO, RMS, EDF, LLF).

¤  Data is flushed at major time frame and is available for the next cycle.

Page 10: Introduction - WordPress.com · 2014. 6. 20. · POK An ARINC653-compliant operating system released under the BSD licence Julien Delange, European Space Agency

Space isolation

¤  Partitions are located in their own memory segment, with the help of the MMU.

¤  Each segment has its properties (address, size, location) defined at configuration time, which cannot be changed at run time.

¤  Attention is paid to context-switching: all data is either hidden or flushed.

Page 11: Introduction - WordPress.com · 2014. 6. 20. · POK An ARINC653-compliant operating system released under the BSD licence Julien Delange, European Space Agency

Device drivers

¤  Device drivers are running in dedicated partitions.

¤  They must be granted access to hardware by the kernel.

¤  Partitions can share a device without sharing data (data isolation).

Page 12: Introduction - WordPress.com · 2014. 6. 20. · POK An ARINC653-compliant operating system released under the BSD licence Julien Delange, European Space Agency

Configuration flexibility

¤  Some parts of the code must or may not be included (device drivers, tasking primitives, etc.).

The more precise the code:

¤  the smaller the memory footprint;

¤  the faster the execution.

¤  This requires « #ifdef beaconing » that is, luckily, completely handled – as we’ll see later.

Page 13: Introduction - WordPress.com · 2014. 6. 20. · POK An ARINC653-compliant operating system released under the BSD licence Julien Delange, European Space Agency

2 – Partitioned system modeling

Page 14: Introduction - WordPress.com · 2014. 6. 20. · POK An ARINC653-compliant operating system released under the BSD licence Julien Delange, European Space Agency

System design

¤  Specifications are written in a real (ie. not C or plain text file) modeling language: AADL.

¤  These models can be checked against security policies.

¤  Most of the code for the system is automatically generated from these models; no written code but what the partitions are exactly doing.

Page 15: Introduction - WordPress.com · 2014. 6. 20. · POK An ARINC653-compliant operating system released under the BSD licence Julien Delange, European Space Agency

What AADL can do

¤  Define what the system is made of (processor, virtual processor, process, memory, thread, data, subprogram).

¤  Change their properties (size, permissions, scheduling options…).

¤  Detect syntax and semantic errors.

¤  Enforce specifications requirements.

Page 16: Introduction - WordPress.com · 2014. 6. 20. · POK An ARINC653-compliant operating system released under the BSD licence Julien Delange, European Space Agency

AADL design example Graphical representation

Page 17: Introduction - WordPress.com · 2014. 6. 20. · POK An ARINC653-compliant operating system released under the BSD licence Julien Delange, European Space Agency

3 – Code generation

Page 18: Introduction - WordPress.com · 2014. 6. 20. · POK An ARINC653-compliant operating system released under the BSD licence Julien Delange, European Space Agency

Generation of the system

¤  Code is generated from models.

¤  Automated, just run make!

¤  POK takes care of the deployment of the system (compile binaries, install them on a device, can run an emulator, attach a debugger…)

Page 19: Introduction - WordPress.com · 2014. 6. 20. · POK An ARINC653-compliant operating system released under the BSD licence Julien Delange, European Space Agency

From AADL to C

/*****************************************************/ /* This file was automatically generated by Ocarina */ /* Do NOT hand-modify this file, as your */ /* changes will be lost when you re-run Ocarina */ /*****************************************************/ #define POK_GENERATED_CODE 1 #define POK_NEEDS_CONSOLE 1 #define POK_NEEDS_LIBC_STDIO 1 #define POK_CONFIG_NB_THREADS 3 ...

Page 20: Introduction - WordPress.com · 2014. 6. 20. · POK An ARINC653-compliant operating system released under the BSD licence Julien Delange, European Space Agency

4 – Demonstration

Page 21: Introduction - WordPress.com · 2014. 6. 20. · POK An ARINC653-compliant operating system released under the BSD licence Julien Delange, European Space Agency

Conclusion

Page 22: Introduction - WordPress.com · 2014. 6. 20. · POK An ARINC653-compliant operating system released under the BSD licence Julien Delange, European Space Agency

To put it in a nutshell

POK is a developing environment for safety-critical hardware which provides:

¤  numerous kernel and partition ready-to-use services (communication primitives, libc, ARINC and POSIX APIs, fault handling…);

¤  static analysis on AADL models to check for potential errors and verify the design of the system;

¤  automatic code generation and deployment from the AADL models and the already provided POK environment.

Page 23: Introduction - WordPress.com · 2014. 6. 20. · POK An ARINC653-compliant operating system released under the BSD licence Julien Delange, European Space Agency

How to create your own system?

1.  Write the specifications of the system in AADL.

2.  Write the C code your partitions should run.

3.  $ make run

Page 24: Introduction - WordPress.com · 2014. 6. 20. · POK An ARINC653-compliant operating system released under the BSD licence Julien Delange, European Space Agency

Contact

Information, sources, documentation:

¤  http://pok.safety-critical.net/

General questions:

¤  [email protected]

Technical mailing-list:

¤  [email protected]