Static Checking for Dynamic Resource Management in Sensor Network Systems [Report]

NESL Technical Report #: 2006-11-2

Authors:

Abstract: Many sensor network systems expose general interfaces to system developers for dynamically creating and/or manipulating resources of various kinds. While these interfaces allow programmers to accomplish common system tasks simply and efficiently, they also admit the potential for programmers to mismanage resources, for example through leaked resources or improper resource sharing. These kinds of errors are particularly problematic for sensor networks, given the resource constraints and lack of memory protection on current sensor platforms. We describe a static analysis technique that brings the safety of static resource management to systems that dynamically manage resources. Our analysis is based on the observation that sensor network applications often manipulate resources in a producer-consumer pattern. In this style, each resource has a unique owner component at any given point in time, who has both the sole capability to manipulate the resource and the responsibility to properly dispose of the resource or transfer ownership to another component. Our analysis enforces this ownership discipline on components at compile time. We have instantiated our approach as a tool to ensure proper management of dynamically allocated memory in programs written on top of SOS, a sensor network operating system. We have evaluated the tool on all historical versions of all user modules in the SOS CVS repository, as well as on the SOS kernel itself. Our tool generated 25 warnings of which 8 were real errors when checking user modules and 35 warnings of which 2 were real errors when checking the kernel, demonstrating the practical utility of our approach for sensor network systems.

Local downloads:

Page (Count): 9

Date: 2006-11-19

Place: UCLA NESL

Public Document?: Yes

NESL Document?: Yes

Document category: Report

Projects:

Back