tinygals: a programming model for event-driven embedded systems elaine cheong uc berkeley ptolemy...
Post on 19-Dec-2015
223 views
TRANSCRIPT
![Page 1: TinyGALS: A Programming Model for Event-Driven Embedded Systems Elaine Cheong UC Berkeley Ptolemy Group / PARC Judy Liebman (LLNL) Jie Liu, Feng Zhao (PARC)](https://reader035.vdocuments.net/reader035/viewer/2022062421/56649d3e5503460f94a17c80/html5/thumbnails/1.jpg)
TinyGALS: A Programming Model for Event-Driven Embedded Systems
Elaine CheongUC Berkeley Ptolemy Group / PARC
Judy Liebman (LLNL)Jie Liu, Feng Zhao (PARC)
Fifth Biennial Ptolemy MiniconferenceBerkeley, CA, May 9, 2003
![Page 2: TinyGALS: A Programming Model for Event-Driven Embedded Systems Elaine Cheong UC Berkeley Ptolemy Group / PARC Judy Liebman (LLNL) Jie Liu, Feng Zhao (PARC)](https://reader035.vdocuments.net/reader035/viewer/2022062421/56649d3e5503460f94a17c80/html5/thumbnails/2.jpg)
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 Elaine Cheong UC Berkeley Ptolemy Group / PARC Judy Liebman (LLNL) Jie Liu, Feng Zhao (PARC)](https://reader035.vdocuments.net/reader035/viewer/2022062421/56649d3e5503460f94a17c80/html5/thumbnails/3.jpg)
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 Elaine Cheong UC Berkeley Ptolemy Group / PARC Judy Liebman (LLNL) Jie Liu, Feng Zhao (PARC)](https://reader035.vdocuments.net/reader035/viewer/2022062421/56649d3e5503460f94a17c80/html5/thumbnails/4.jpg)
Example: Sensor Networks
Base
Sensing motes
![Page 5: TinyGALS: A Programming Model for Event-Driven Embedded Systems Elaine Cheong UC Berkeley Ptolemy Group / PARC Judy Liebman (LLNL) Jie Liu, Feng Zhao (PARC)](https://reader035.vdocuments.net/reader035/viewer/2022062421/56649d3e5503460f94a17c80/html5/thumbnails/5.jpg)
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 receive
GENERIC_COMM
BLESS forward
GENERIC_COMM
Update Routing Table
Routing Table
![Page 6: TinyGALS: A Programming Model for Event-Driven Embedded Systems Elaine Cheong UC Berkeley Ptolemy Group / PARC Judy Liebman (LLNL) Jie Liu, Feng Zhao (PARC)](https://reader035.vdocuments.net/reader035/viewer/2022062421/56649d3e5503460f94a17c80/html5/thumbnails/6.jpg)
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 Elaine Cheong UC Berkeley Ptolemy Group / PARC Judy Liebman (LLNL) Jie Liu, Feng Zhao (PARC)](https://reader035.vdocuments.net/reader035/viewer/2022062421/56649d3e5503460f94a17c80/html5/thumbnails/7.jpg)
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 Elaine Cheong UC Berkeley Ptolemy Group / PARC Judy Liebman (LLNL) Jie Liu, Feng Zhao (PARC)](https://reader035.vdocuments.net/reader035/viewer/2022062421/56649d3e5503460f94a17c80/html5/thumbnails/8.jpg)
Target Tracking Example:Before and After…
MAIN
TARGET_TRACKING
CLOCK
GENERIC_COMM
BLESS
Init
Clock
Send
Send done
LEDS
Send
Send done
Receive channel 8S
end
Send done
Receive channel 7
Init
Init Start
Init
Fire event
On Off
PHOTO
Init
Get data
Data 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 receive
GENERIC_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 Elaine Cheong UC Berkeley Ptolemy Group / PARC Judy Liebman (LLNL) Jie Liu, Feng Zhao (PARC)](https://reader035.vdocuments.net/reader035/viewer/2022062421/56649d3e5503460f94a17c80/html5/thumbnails/9.jpg)
Memory Usage
Code Size Scheduler Target counting application
TinyOS 86 bytes 19929 bytes
TinyGALS 112 bytes 24750 bytes
![Page 10: TinyGALS: A Programming Model for Event-Driven Embedded Systems Elaine Cheong UC Berkeley Ptolemy Group / PARC Judy Liebman (LLNL) Jie Liu, Feng Zhao (PARC)](https://reader035.vdocuments.net/reader035/viewer/2022062421/56649d3e5503460f94a17c80/html5/thumbnails/10.jpg)
Future Work
Port to NesC language (TinyOS).Implement as Ptolemy domain?
Compare to CI domain.Blocking write: retry when queue is full.Priority scheduling algorithm with queue
insertions.Run-time reconfigurability of modules.Heterarchy: distributed multi-tasking.
![Page 11: TinyGALS: A Programming Model for Event-Driven Embedded Systems Elaine Cheong UC Berkeley Ptolemy Group / PARC Judy Liebman (LLNL) Jie Liu, Feng Zhao (PARC)](https://reader035.vdocuments.net/reader035/viewer/2022062421/56649d3e5503460f94a17c80/html5/thumbnails/11.jpg)
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.
http://ptolemy.eecs.berkeley.edu/papers/03/TinyGALS/