dynamic reconfiguration in the dcl · 2004-02-26 · 3 distributed control lab l2001 project start...

25
Dynamic Reconfiguration as Safeguard Mechanism in the Distributed Control Lab Workshop: Fault Tolerant Systems in Hard- and Software Dipl. Inf. Andreas Rasche

Upload: others

Post on 15-Mar-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: dynamic Reconfiguration in the DCL · 2004-02-26 · 3 Distributed Control Lab l2001 project start atHasso-Plattner-Institute lOnline access to physical experiments over the Web lPractice

Dynamic Reconfiguration as Safeguard Mechanism in the

Distributed Control Lab

Workshop: Fault Tolerant Systems in Hard- and Software

Dipl. Inf. Andreas Rasche

Page 2: dynamic Reconfiguration in the DCL · 2004-02-26 · 3 Distributed Control Lab l2001 project start atHasso-Plattner-Institute lOnline access to physical experiments over the Web lPractice

2

Outline

l The Distributed Control Lab– Motivation, Architecture

l Foucault's Pendulum Detailsl Dynamic Reconfiguration as safe-guard

mechanisml Evaluation of the approachl Other Experiments in the DCLl Conclusions

Page 3: dynamic Reconfiguration in the DCL · 2004-02-26 · 3 Distributed Control Lab l2001 project start atHasso-Plattner-Institute lOnline access to physical experiments over the Web lPractice

3

Distributed Control Lab

l 2001 project start at Hasso-Plattner-Institutel Online access to physical experiments over the Webl Practice of writing control algorithms for real-time

control problemsl Extensible architecture for hosting physical control

experimentsl Investigation of algorithms for user code observation

and replacement of control componentsl Experiment : physical installation and specific control

software

Page 4: dynamic Reconfiguration in the DCL · 2004-02-26 · 3 Distributed Control Lab l2001 project start atHasso-Plattner-Institute lOnline access to physical experiments over the Web lPractice

4

Distributed Control LabMotivation

l study of system predictability, availability and security in context of middleware-based dynamic control systems

l Reach a predictable system behaviour in unstable environments

l Study techniques to prevent malicious code damaging physical equipment

– Source code analysis– Compiler / Language based– Simulation– Online observation / Component replacement

l Foucault's Pendulum demonstrates usage of dynamic reconfiguration for online replacement of user control

Page 5: dynamic Reconfiguration in the DCL · 2004-02-26 · 3 Distributed Control Lab l2001 project start atHasso-Plattner-Institute lOnline access to physical experiments over the Web lPractice

5

The Distributed Control Lab

Page 6: dynamic Reconfiguration in the DCL · 2004-02-26 · 3 Distributed Control Lab l2001 project start atHasso-Plattner-Institute lOnline access to physical experiments over the Web lPractice

6

Page 7: dynamic Reconfiguration in the DCL · 2004-02-26 · 3 Distributed Control Lab l2001 project start atHasso-Plattner-Institute lOnline access to physical experiments over the Web lPractice

7

Problem : Malicious Code

l Investigation of Solution for malicious code detection– Source Code Analysis– Language limitations / special compiler– Simulation before execution on physical experiment– Analytic Redundancy

l Online observation of user programsl Replacement of user programs before reach of

uncontrollable statel Dynamic Reconfiguration of component-based control

applicationl Monitoring of environmental settings and component states

Page 8: dynamic Reconfiguration in the DCL · 2004-02-26 · 3 Distributed Control Lab l2001 project start atHasso-Plattner-Institute lOnline access to physical experiments over the Web lPractice

8

Foucault’s Pendulum

l First installation 1848 by Leon Foucault in the Pantheon in Paris

l Demonstrates earth rotationl Today many installation including one in UN-building in

New York l Problem : Pendulum must be kept swingingl Solution : electro magnet under an iron ball l Experiment: Find best control algorithm to keep the

pendulum swinging– Using minimum energy – Reaching the highest amplitude

Page 9: dynamic Reconfiguration in the DCL · 2004-02-26 · 3 Distributed Control Lab l2001 project start atHasso-Plattner-Institute lOnline access to physical experiments over the Web lPractice

9

Page 10: dynamic Reconfiguration in the DCL · 2004-02-26 · 3 Distributed Control Lab l2001 project start atHasso-Plattner-Institute lOnline access to physical experiments over the Web lPractice

10

Page 11: dynamic Reconfiguration in the DCL · 2004-02-26 · 3 Distributed Control Lab l2001 project start atHasso-Plattner-Institute lOnline access to physical experiments over the Web lPractice

11

Page 12: dynamic Reconfiguration in the DCL · 2004-02-26 · 3 Distributed Control Lab l2001 project start atHasso-Plattner-Institute lOnline access to physical experiments over the Web lPractice

12

USB Host-Controller

User-Controller

Safety-Controller

EventDuplication

Operating System I/OCheck HalfFull Flag

ConfigurationManager

Binary Reader / Filter, Smooth

Event Creation

Binary Writer

Binary Stream Generation

User Mode

Kernel Mode

Cypress EZ-USB

Read

Write

64 Byte

I/O request packetLight Sensor

Electro Magnet

FIFO-Memory 4 KBytes

ReadFile() WriteFile()

Pendulum Control – detailed

• Laser light barriers sampled into 4KByte FIFO-memorys with 23,4 kHz

• USB-Controller checks half-full-Flag

• 64 Byte blocks of data transferred via USB 1.1

• Real-Time OS-Threads process in-coming signals / produce out-going bit stream

Page 13: dynamic Reconfiguration in the DCL · 2004-02-26 · 3 Distributed Control Lab l2001 project start atHasso-Plattner-Institute lOnline access to physical experiments over the Web lPractice

13

Our Approach : Dynamic Reconfiguration as safe-guard mechanism

l Mapping of profiles to application configurations based on environmental conditions and component states

l Selection of application configuration according to conditions provides best service for a given situation

l Definition of– observer : monitoring of environmental settings and component

states – profiles : mapping of environmental conditions to application

configurations– configurations of component-based applications

l Online monitoring of environment and componentsl Change of application configuration using dynamic

reconfiguration if required (changed conditions)

Page 14: dynamic Reconfiguration in the DCL · 2004-02-26 · 3 Distributed Control Lab l2001 project start atHasso-Plattner-Institute lOnline access to physical experiments over the Web lPractice

14

Description of configurations of component-based applications

l “A Configuration of a component-based application denotes the set of its parameterized components and the connections among them.”

l XML-based description language l Configuration Description: List of components,

their attributes, and connectorsl Support for a variety of component connectors

Page 15: dynamic Reconfiguration in the DCL · 2004-02-26 · 3 Distributed Control Lab l2001 project start atHasso-Plattner-Institute lOnline access to physical experiments over the Web lPractice

15

Configuration Framework

l Configuration Manager– Selects matching app configuration based on observed conditions

and corresponding XML-configuration description– Instantiates/queries defined observers– Realizes distributed object activation– Enables adaptation of distributed applications using dynamic

reconfiguration if required

l Standard reusable Observer-components – Network Bandwidth, CPU Power, Memory Consumption,

Component State

l Components provide hooks for configuration management– Interface IConfigure must be implemented – can be automated

Page 16: dynamic Reconfiguration in the DCL · 2004-02-26 · 3 Distributed Control Lab l2001 project start atHasso-Plattner-Institute lOnline access to physical experiments over the Web lPractice

16

Architecture for Adaptive Systems

configuration manager

XML -document

IConfigure

IConfigure

IConfigureIConfigure

Page 17: dynamic Reconfiguration in the DCL · 2004-02-26 · 3 Distributed Control Lab l2001 project start atHasso-Plattner-Institute lOnline access to physical experiments over the Web lPractice

17

Our Reconfiguration Algorithm

l M.Wermelinger, J.Magee / J.Kramerl Applications follow Actor Execution Model by G.Agha

– Application consists of interconnected components– State of components changes only through interactions with

other components

l Transaction Concept– Sequence of message exchanges over one connection – Initiator of a transaction is informed about its completion– Finishes in finite time

l Model matches wide range of typical applications– Including Client/Server-style applications– Control applications

Page 18: dynamic Reconfiguration in the DCL · 2004-02-26 · 3 Distributed Control Lab l2001 project start atHasso-Plattner-Institute lOnline access to physical experiments over the Web lPractice

18

Dynamic Reconfiguration -Steps

l Start, Parameterization of new componentsl Turn application into reconfigurable state

– No pending requests – Block all connections involved in reconfiguration

l Prohibit new transactions over identified connections lWait for all ongoing transactions to complete

– Blocking has to be ordered because of dependent transactions

l Parameterization of changed componentsl Reconnect/Start all componentsl Remove old components

Page 19: dynamic Reconfiguration in the DCL · 2004-02-26 · 3 Distributed Control Lab l2001 project start atHasso-Plattner-Institute lOnline access to physical experiments over the Web lPractice

19

Pendulum Experiment Control Configurations

USB-Driver

Event Queuing

SafetyController

UserProgram

Event Duplicator

UserProgram

Configuration 1 : safety controller

Configuration 2 : user program (cold standby)

Configuration 3 : user program (warm standby)

USB

SafetyController

SafetyController

Page 20: dynamic Reconfiguration in the DCL · 2004-02-26 · 3 Distributed Control Lab l2001 project start atHasso-Plattner-Institute lOnline access to physical experiments over the Web lPractice

20

Measurements:Abnormal Termination of User Program

Page 21: dynamic Reconfiguration in the DCL · 2004-02-26 · 3 Distributed Control Lab l2001 project start atHasso-Plattner-Institute lOnline access to physical experiments over the Web lPractice

21

Configuration – a cross-cutting concern (AOP)

l Additional configuration-specific code has to be added to involved components

– Handling-/Blocking Transactions– Start / Stop of component processing– Connection handling– Implementation of the IConfigure interface

l This code cross-cuts functional component code!l We use aspect-oriented programming for automatic

addition of non-functional configuration specific code l Usage of LOOM.Net – Aspect Weaver for .NET

– based on (binary) components

Page 22: dynamic Reconfiguration in the DCL · 2004-02-26 · 3 Distributed Control Lab l2001 project start atHasso-Plattner-Institute lOnline access to physical experiments over the Web lPractice

22

Making a Component Configurable

l Automatic implementation of configuration hooksl Component programmer only has to mark

transactions and provide access to connection references

Page 23: dynamic Reconfiguration in the DCL · 2004-02-26 · 3 Distributed Control Lab l2001 project start atHasso-Plattner-Institute lOnline access to physical experiments over the Web lPractice

23

Future Work

l “Higher Striker” – Real Time Control Experiment– Running on a RTOS (Ce.Net, eCos, rtLinux)– Small buffers possible / short delay – Parallel Port I/O– Sampling rate 38 kHz

l Port of .Net Environment (parts) to Lego-Robotsl Additional experiments / simulations

Page 24: dynamic Reconfiguration in the DCL · 2004-02-26 · 3 Distributed Control Lab l2001 project start atHasso-Plattner-Institute lOnline access to physical experiments over the Web lPractice

24

Related Work

l “Verbund Virtuelles Labor” project at UniversityReutlingen / Germany

l iLab project (WebLab) at MIT l Virtual Lab at University of Hagen /Germanyl Tele-Laboratory at University of Pisal Tele-Lab / Simplex architecture

Page 25: dynamic Reconfiguration in the DCL · 2004-02-26 · 3 Distributed Control Lab l2001 project start atHasso-Plattner-Institute lOnline access to physical experiments over the Web lPractice

25

Conclusions

l DCL : environment for remote experiment access based on COTS Operating System and Middleware

l Safety against malicious code demonstratedl Analytic Redundancy / Runtime observation of

user control at Foucault‘s Pendulum applicablel Replacement of faulty control algorithms using

dynamic reconfigurationl Measured reconfiguration times highly

acceptable for control applications