• 검색 결과가 없습니다.

Objected-Oriented Real-Time System Design

N/A
N/A
Protected

Academic year: 2024

Share "Objected-Oriented Real-Time System Design"

Copied!
10
0
0

로드 중.... (전체 텍스트 보기)

전체 글

(1)

Objected-Oriented Real-Time System Design

Motivations

• Next-Generation real-time systems become

– Complicated – Distributed – Networked

• Examples

– Military unmanned command/control system

– City-wide disaster monitoring and management system – Hospital patient monitoring system

– Assisted-living

• System specification is very difficult in traditional way

(2)

Time-Driven vs Event-Driven(OO)

cruiseControlTask() {

while(1){

read current speed;

check brake pedal;

if (brakePressed) braking…

else{

compute control law;

write throttleValue;

}

sleep (100ms);

} }

speed sensor

Brake

Engine

speed sensor module

Brake module

Engine module

Control module

Time-Driven SW Design

Event-Driven (OO) SW Design

Object-Oriented Real-Time Design Approach

• OO-design more naturally reflect the actual system

• Easy to think

• We can focus on each component and specify event-driven operations with a stateChart

• Reusable

• Portable

• Flexible

• Extendable

(3)

Emerging RT designs use OO paradigm

• Real-Time OO design support languages and tools

– Chaos (Honeywell)

– Cadena (Kansas State Univ.) – Geodesic (CMU)

– ROOM: Real-Time Object Oriented Modeling – UML (Universal Modeling Language) – RT – Real-Time JAVA

– Real-Time CORBA

• Even a small system follow OO paradigm

– TinyOS (Set of commonly used object modules)

Cruise control system example

-Start with manual mode -When Cruise lever set, goto automaticControl mode

- In automaticControl mode, regularly check the current speed and actuate the engine accordingly to maintain the setSpeed.

- In automaticControl mode, goto manual mode when brakePressed, accelPressed, cruiseOff

(4)

State Description of the cruiseControl object

Transactions and timing constraints

At each rotation of drive shaft

(at every rotation of the wheels) Periodically invoked an calculate the speed using the number of shaft rotations in the previous period

When 6000rpm

(5)

Message Sequence for Entering Cruise mode

Periodically calculate the speed by counting the shaft-rotation interrupts

Message Sequence for Cruise Control Loop

Periodically calculate the speed by counting the shaft-rotation interrupts

(6)

Message Sequence for Leaving Cruise Mode

Challenge is

how to implement the system and validate the timing

• Real-Time theory (including schedulability analysis) is built on Time-Driven Model

• Real-Time Operating Systems have been evolved with Time-Driven Model in mind

• Mapping is required from OO-design to Time-driven implementation over RTOS platform

(7)

Mapping Objects to RTOS threads

• Map a group of objects into an RTOS thread

– For example

• map speedometer object to a RTOS thread

• map all other objects to another RTOS thread – Optimal mapping is a challenging problem

• Priority

– Transaction priority is determined based on e2e deadline. We give higher priorities to the aborting transactions (BP,CO,AP > CL) – Event priority is determined by the highest priority of the

transactions that it belongs to

– Thread priority: dynamically determined by the priority of event currently being handled (RTOS will dispatch a thread according to the thread priority)

– This is just heuristic. The optimal priority assignment is an open issue.

Priorities of Cruise Control Transactions

(8)

Schedulability Analysis

• Calculate the worst case response time of each transaction

• High-priority transaction can be blocked by low- priority event handling

– Blocking due to Run-To-Completion of a thread

– Sharing message queue (Mutual exclusion)

• Revised response time equation for transaction i

( )j ( )i

C

B eventj

j RTC

i =

max

::Thread =Thread

RTC i i i

hp

j j i

i

C C B

T R R

j

+

⎟ +

⎜ ⎜

⎥ ⎥

⎢ ⎢

= ∑ ⎡

( ) τ

Worst case event processing time that belongs to transaction j

A high priority thread will not be delayed by a low priority thread due to preemptive thread scheduling

However, it may blocked by the event handling procedure of the same thread but belonging to a different transaction.

Response times for transactions

3 3 10 2 :

Speed) (Determine

DS

3 2 : Interrupt) (Shaft

SI

+

⎥⎥ +

⎢⎢ ⎤

=⎡ +

R R

(9)

Automate the Overall Design Flow

OO-based system specification

Thread mapping and

Priority Assignment

Schedulability Analysis

Feasible Infeasible

Code

Application Code

(10)

References

• M. Saksena, P. Freedman, and P. Rodziewicz, “Guidelines for Automated Implementation of Executable Object Oriented Models for Real-Time Embedded Control Systems, IEEE RTSS 1997

• Z. Gu and Z. He, “Real-Time Scheduling Techniques for Implementation Synthesis from Component-Based Software Models, ACM SIGSOFT 2005

• W. Deng, M. B. Dwyer, J. Hatcliff, G. Jung, Robby, and G.

Singh, “Model-checking Middleware-based Event-driven Real-Time Embedded Software”, The 1stInternational Symposium on Formal Methods for Components and Objects, 2003

• T. E. Bihari and P. Gopinath, “Object-Oriented Real-Time Systems: Concepts and Examples, Computer 1992

Still open problems ...

• Component chains in distributed resources?

• Communication costs?

참조

관련 문서

With these architectures we implement the real time process management system of eight main functions that are comprehensive process status monitoring function,

If main controller requests some data using real-time adapter, message management block sends the data to main controller immediately.. This block can communicate with

Abstract In this paper, we design and implement a real time IoT messaging system that can collect location information of moving vehicles and pedestrians in real time

The current study suggested and realized depth-based real-time 3D virtual image composition system to reduce the ratio of remaking the film, shorten

In this paper, we proposed a system design that detects abnormal behavior in video in real time through CCTV, automatically notifies users, and

The IoT respirator is equipped with sensors that measure physiological information and a communication module that can transmit the measured data to the server in real

In this paper, a multi-node real-time diagnostic and management system based on zigbee sensor network is proposed, which is to monitor and diagnose multiple

In this paper, we propose a Micro Real-Time Control System (MRTCS) for decreasing the delay during interrupts processing and data transfer on sensor nodes.. The