tinygals: a programming model for event-driven embedded systems

11
TinyGALS: A Programming Model for Event-Driven Embedded Systems Elaine Cheong, Judy Liebman University of California, Berkeley Jie Liu, Feng Zhao Palo Alto Research Center ACM Symposium on Applied Computing Melbourne, FL, March 9-12, 2003

Upload: belden

Post on 22-Feb-2016

38 views

Category:

Documents


0 download

DESCRIPTION

TinyGALS: A Programming Model for Event-Driven Embedded Systems. Elaine Cheong, Judy Liebman University of California, Berkeley Jie Liu, Feng Zhao Palo Alto Research Center. ACM Symposium on Applied Computing Melbourne, FL, March 9-12, 2003. Embedded software architecture tomorrow - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: TinyGALS: A Programming Model for Event-Driven Embedded Systems

TinyGALS: A Programming Model for Event-Driven Embedded Systems

Elaine Cheong, Judy LiebmanUniversity of California, Berkeley

Jie Liu, Feng ZhaoPalo Alto Research Center

ACM Symposium on Applied ComputingMelbourne, FL, March 9-12, 2003

Page 2: TinyGALS: A Programming Model for Event-Driven Embedded Systems

Introduction Embedded software architecture today

Inherited from writing device drivers and optimizing assembly code.

Poor scalability. Poor common infrastructure. Poor resource management.

Embedded software architecture tomorrow

Reusable, reconfigurable components. Easy to use. Fast prototyping. Software synthesis

Page 3: TinyGALS: A Programming Model for Event-Driven Embedded Systems

Motivation

Application characteristicsAd-hoc networked embedded systemsLow-powerUnstructured, unsynchronized eventsCollaborative nodes

Local communication (peer-to-peer)Global communication (ad-hoc routing)

Page 4: TinyGALS: A Programming Model for Event-Driven Embedded Systems

Example: Sensor Networks

Base

Sensing motes

Page 5: TinyGALS: A Programming Model for Event-Driven Embedded Systems

TinyGALS

POT

Clock logic

CLOCK

Get sensor data

PHOTO

sensing

clock Send local data

GENERIC_COMM

Send BLESS mesg

BLESS send

Receive packets

GENERIC_COMM

receiving

Update local data

init

init

initinit

start

global_nodedata;global_parent_id;

BLESS receiveGENERIC_COMM

BLESS forward

GENERIC_COMM

Update Routing Table

Routing Table

Page 6: TinyGALS: A Programming Model for Event-Driven Embedded Systems

TinyGALS Architecture

initComponent

Module A

__________________________________________________________________________________________________________________ outportA1

SynchronousCommunication

Component

Module B

ComponentinportB1

AsynchronousCommunication

Scheduler

EventQueue

start

TinyGUYSglobal name

SynchronousRead

AsynchronousWrite

Guarded Variable

TinyGUYSlocal name

Globally Asynchronous Locally Synchronous

Guarded Yet Synchronous

Page 7: TinyGALS: A Programming Model for Event-Driven Embedded Systems

Software Synthesis

app_start()

app_init()

init

Module B

start

Module A

EventQueue

PARAM_PUT()

PARAM_GET()data

structures

A_out1()

B_in1_put()BCOMP1_INPUT()

data structures

Scheduler

Page 8: TinyGALS: A Programming Model for Event-Driven Embedded Systems

Target Tracking Example:Before and After…

MAIN

TARGET_TRACKING

CLOCK

GENERIC_COMM

BLESS

InitC

lockS

end

Send done

LEDS

Send

Send done

Receive channel 8S

end

Send done

Receive channel 7

Init

Init Start

InitFire event

On Off

PHOTO

InitG

et dataD

ata ready

POT

Clock logic

CLOCK

Get sensor data

PHOTO

sensing

clock Send local data

GENERIC_COMM

Send BLESS mesg

BLESS send

Receive packets

GENERIC_COMM

receiving

Update local data

init

init

initinit

start

global_nodedata;global_parent_id;

BLESS receiveGENERIC_COMM

BLESS forward

GENERIC_COMM

Update Routing Table

Routing Table

OS View (TinyOS) TinyGALS View

Page 9: TinyGALS: A Programming Model for Event-Driven Embedded Systems

Memory Usage

Scheduler code size

TinyOS TinyGALS

86 bytes 112 bytes

Sizes of generated functions (bytes)

app_init() 58

app_start() 6

A_out() 12

B_in_put() 160

BCOMP1_FIRE() 98

A_param_PARAM_GET() 10

A_param_PARAM_PUT() 16

Sizes of generated variables (bytes)

eventqueue_head 2

params 2

entrypoints 2

eventqueue_count 2

eventqueue 100

ports 104

params_buffer_flag 1

params_buffer 2

Page 10: TinyGALS: A Programming Model for Event-Driven Embedded Systems

Conclusions

TinyGALS provides a globally asynchronous, locally synchronous model of computation for event-driven embedded software.

Allows reuse of software components. TinyGUYS provides protected, quick access to

global data. Software synthesis tools created to generate

communication and scheduling code.

Page 11: TinyGALS: A Programming Model for Event-Driven Embedded Systems

Future Work

Blocking write: retry when queue is full.Priority scheduling algorithm with queue

insertions.Run-time reconfigurability of modules.Heterarchy: distributed multi-tasking.