Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS 443 Advanced OS Fabián E. Bustamante, Spring 2005 Implementing Software on Resource-Constrained Mobile Sensors: Experiences with Impala and ZebraNet.

Similar presentations


Presentation on theme: "CS 443 Advanced OS Fabián E. Bustamante, Spring 2005 Implementing Software on Resource-Constrained Mobile Sensors: Experiences with Impala and ZebraNet."— Presentation transcript:

1 CS 443 Advanced OS Fabián E. Bustamante, Spring 2005 Implementing Software on Resource-Constrained Mobile Sensors: Experiences with Impala and ZebraNet Ting Liu, Christopher M. Sadler, Pei Zhang and Margaret Martonosi Princeton Univ. Appears in MobiSYS’04 Presented by: Lei Yang

2 2 Outline About ZebraNet Hardware & constraints Impala layers and interfaces Impala operation scheduling Impala event handling model Impala network interface Conclusions

3 3 Princeton ZebraNet Project Energy-aware mobile sensor network Track zebra migrations in Africa Status –January, 2004: 7 test collars deployed on zebras in Kenya. First data received: 1/19/2004 Next Step Refine collar design; switch to lower-energy GPS, merge Impala software update code into final collars

4 4 ZebraNet System Hardware Microcontroller TI MSP430F bit RISC 2KB RAM 60KB ROM 8MHz/32KHz dual clockFLASH ATMEL AT45DB041B 4Mbit 78 days data capacity GPS µ-blox GPS-MS1E 10-20s position fix timeRadio MaxStream 9Xstream MHz 19.2Kbps over-the-air 0.5-1mile transmit range Power supplies SPI 667Kbps USART 38.4Kbps USART 38.4Kbps Solar modules 5V3.3V Charging circuits

5 5 Hardware-Imposed Constraints on Software Components power consumption Constrains on system software –Memory constraint –Energy constraint –Device access constraint –Radio packet size constraint –FLASH storage constraint –GPS sensing time constraint System ModePower CPU at 32KHz9.6 mW CPU at 8MHz19.32 mW 8MHz w/ GPS568 mW 8MHz w/ radio transmit780 mW 8MHz w/ radio receive312.4 mW measured at 4.0 V

6 6 –Software adaptation for sensor network performance –Software update for sensor network deployment –Operation scheduling for regular operations –Event handling for irregular events –Network support for sensor network communications This Paper Implemented on ZebraNet PPoPP 2003 Prototyped on iPAQs Impala Overview ZebraNet’s middle layer, light weight OS Must support: AdapterUpdater Network Support Operation Scheduler Event Filter

7 7 Async. Network Transmission Protected FLASH Access Application Timer Control System Clock Time Read Impala Layers and Interfaces RadioGPSFLASHTimerCPUWDT Access and Control to All Devices Application 1Application 2Application 3Application 4 GPS Data Event Radio Packet Event Timer Event GPS Data Event Handler Application Timer Event Handler Network Packet Event Handler Network Send Done Event Handler AdapterUpdater Network Support Operation Scheduler Event Filter

8 8 Static Memory Requirement Each node has 2 KB RAM and 60 KB Flash, internal 4 Mbit (500KB) Flash, external

9 9 Impala Regular Operation Scheduling Use timers to trigger operations Node iterates through a cycle of send/receive data -> obtain GPS position -> sleep Networking Period GPS Sensing Period Sleep Period 1 CPU wake up/Radio, FLASH power on 2 Radio transmitting / receiving start 3 Network communication time 4 Radio power off/FLASH power off 5 GPS power on 6 GPS sensing time 7 GPS power off / FLASH power on 8 CPU sleep / FLASH power off

10 10 Hardware attributes & constraints –GPS-aided time calibration Simplifies operation synchronization –Prohibited simultaneous device operations Voltage regulation GPS and radio operations MUST alternate –Non-trivial radio wake-up time Affects network communication schedule –Potentially long GPS sensing time Async. Sensing operation –Components port sharing GPS and Flash can’t simultaneously –Stringent energy budget Battery can support 1 to 3 days Solar cell limited Low-energy, sleep phase Scheduling skips networking/GPS if low on energy Impala Regular Operation Scheduling, Cont.

11 11 Scheduling Overhead Scheduling TypeImpala Activity Time (cycles) CPU Scheduling To put CPU on the full-speed clock3127 To put CPU on the slow clock38 Radio and FLASH Scheduling To set up the first transmission time and turn on radio and FLASH 50 ms To set up the next transmission time260 To set up the network cleanup time265 To clean up incomplete network messages, power off radio and FLASH, and set up the next networking period 11 ms GPS Scheduling To initiate GPS sensing and set up its finish time1247 To format GPS data, power off GPS, signal an GPS data event, and set up the next GPS sensing period 2550

12 12 Impala (Irregular) Event Handling Impala Abstract Application Events Miscellaneous Hardware Interrupts Issue One: Event Abstraction High Priority Events Low Priority Events EventSignalerEventHandler Issue Three: Event Prioritization Short / atomic hardware interrupts Long / preemptive software events Idle Issue Two: Concurrency

13 13 Impala (Irregular) Event Handling Four types of abstract events

14 14 Impala (Irregular) Event Handling Cont. Impala Abstract Application Events Miscellaneous Hardware Interrupts Issue One: Event Abstraction High Priority Events Low Priority Events EventSignalerEventHandler Issue Three: Event Prioritization Short / atomic hardware interrupts Long / preemptive software events Idle Issue Two: Concurrency

15 15 Impala (Irregular) Event Handling Cont. Impala Abstract Application Events Miscellaneous Hardware Interrupts Issue One: Event Abstraction High Priority Events Low Priority Events EventSignalerEventHandler Issue Three: Event Prioritization Short / atomic hardware interrupts Long / preemptive software events Idle Issue Two: Concurrency

16 16 Event Handling Overhead Impala Activity in Event HandlingTime To deliver and remove a network packet event88 cycles To deliver and remove an application timer event16 cycles To deliever and remove a GPS data event17 cycles

17 17 Impala Network Interface P2P communication Pairwise store-n-forward routing Session-based message model –Session-based transport control –A session can be 1 to 32KB –Unicast, multicast, broadcast –Data from FLASH or RAM –Acknowledgment or not –Connectionless –Asynchronous –Send session queue –Receive session queue

18 18 Impala Network Interface, Cont. MAC & Transport control –MAC: round-robin timeslots (w/ GPS-aided time synchronization) –Transport control: detect packet loss and retransmit –Unified: reduce data copy and overhead across protocol layers A sends packet 1-8 ABCDABC D ABC D A sends packet 1-8 to B, C, and D B acks packet 1-8 C acks packet 1-4 D silent B acks packet 1-8 C acks packet 1-4 D acks packet 1-8 A gives up C and sends packet 9-16 B acks packet 9-16 C acks packet 1-4 D acks packet 9-16

19 19 Network Interface Performance Packet reception processing overhead Packet transmission processing overhead By system components

20 20 Network Interface Performance Communication overhead by packet headers Header size and payload size for different packet types

21 21 Network Interface Performance Communication latency in reliable multicast Observed data delivery latencies for different number of destinations and different packet loss rates

22 22 Conclusions Hardware -> Impala middle layer -> applications Regular operation scheduling, –Achieve maximum energy conservation Irregular event handling, –Ensure activity concurrency and prioritization Efficient network interface –Large messages transferred over small radio packets –Support multiple message models Concrete experience with real system and application –Software design challenges with hardware constraints –Valuable to other wireless sensor network research


Download ppt "CS 443 Advanced OS Fabián E. Bustamante, Spring 2005 Implementing Software on Resource-Constrained Mobile Sensors: Experiences with Impala and ZebraNet."

Similar presentations


Ads by Google