Computing Reviews
Today's Issue Hot Topics Search Browse Recommended My Account Log In
Review Help
Search
SenSmart: adaptive stack management for multitasking sensor networks
Chu R., Gu L., Liu Y., Li M., Lu X. IEEE Transactions on Computers62 (1):137-150,2013.Type:Article
Date Reviewed: Jul 29 2013

The ever-growing field of sensor network technology will continue to play a profound role in our lives. These sensors are our hands, eyes, and ears for investigating places ranging from our own bodies (bloodstream, organs, and limbs) to nature (mountains, oceans, forests, and so on). They are deployed in a vast number of critical civil and military applications, many of which are life-saving: blood pressure and sugar level monitors, heartbeat regulators, early natural disaster detectors, intrusion detection equipment, troop position tracking, fighter jet systems, and guidance systems, to name just a few.

The key factor in the advancement of sensor network technology and applications is the balancing of multiple challenging design issues: power, computation, cost, and scalability. Designers may aim at a high number of sensor nodes per network (wider coverage area and better fault tolerance), but cost becomes a problem. Hence, lower cost units are more desirable, but that imposes a limitation on sensor node power (for example, the MICA and IRIS node families use two AA batteries) and computational capability (smaller memory and lower-end central processing units (CPUs)). At the core of sensor network research is the increase of node (mote) computational power (software applications and operating systems (OSs)) and hardware (transceivers and processing units).

The authors of this paper present a step forward in the advancement of sensor network soft computational power, without any additional increase of the power-consuming hardware. They describe an OS that dynamically allows for a multiple concurrent tasking capability in the sensor node, a feature that facilitates the running of multiple tasks concurrently via a secure and efficient virtual memory mechanism. The novelty of their design lies in smart shifting some of the multitasking implementation overhead from the limited resources of field sensor motes (as others have done) to the resource-rich base station. In the process, they end up utilizing the small mote memory size much better than other techniques can, albeit with a cost of some delay. In the sensor network domain, better memory utilization is more significant than speed in most applications. The authors design and implement a new OS prototype called SenSmart (TinyOS compatible), which includes several new design features, such as “base-station-side binary rewriting, logical address translation, and stack relocation.” Their design combines binary translation and a lightweight kernel to reduce runtime and provide strong stack adaptivity and multitasking capability: “These new designs reduce memory overhead, minimize the external fragmentation, and provide new level[s] of stack adaptivity on strictly resource[-]constrained sensor nodes.”

Code is rewritten at the base station, and compiler-generated binaries for all of the application programs are rewritten as naturalized programs; these are linked together with the precompiled system kernel (which includes the kernel runtime). Finally, the executable image is loaded (or wirelessly disseminated) onto sensor nodes to support their multitasking capability. This code rewriting process virtualizes the CPU and memory to allow multiple developed application programs to be instantiated as application tasks on one sensor node, while sharing the CPU and memory resources. The rewriter modifies specific program instructions. CPU control flow instructions (including commands such as branch and sleep) are “rewritten in a way to ensure that the OS frequently takes over [the] CPU to run system services.” Direct or indirect memory can access instructions, and stack pointer operations are rewritten to cooperate with the new virtual memory management mechanism. The instructions that access some OS-reserved resources are also rewritten, hence intercepting accesses to the input/output (I/O) registers. The rewriting process on the base station side strikes a balance between reliability and cost, with the advantages of fully analyzing the program, and identifying or separating the code and data sections for future use in the virtual memory access. Some other techniques pay dearly to accomplish a process like that (for example, the t-kernel) on the sensor side (physical memory access). Moreover, rewriting on the base station side (instead of the small sensor node space) will provide more memory. It also shifts the complexity away from the sensor node kernel, making its size smaller, which allows more applications/programs to run.

SenSmart has a very simple yet effective and efficient software-based logical address translation that does not involve any extra hardware overhead (unlike others). The physical memory is divided into three regions: at the top, an I/O mapping to I/O registers; at the bottom, the kernel space for SenSmart; and in between, a space divided into equal size independent partitions (one for each loaded task). Each partition is subdivided into a fixed-size heap area and a variable-sized stack area. Instructions that access either the heap or the stack will invoke virtual address translation to physical memory by simply adding an offset to the original virtual address. An offset on the lower bound indicates heap access, while memory size M minus the upper bound of the stack region indicates stack access. This forms the effective physical memory address and performs boundary checking. The virtual addressing mechanism allows tasks to share data areas via a special application programming interface (API), which explicitly maps multiple logical address blocks to the same physical address block, at the upper address region of the logical memory.

The paper tackles the dynamic expansion of a task’s stacks and presents some solutions to their dynamic change when any one of them runs out of its pre-allocated space. One solution involves simply relocating task partitions by shifting their memory portion, starting from the top of the problematic stack to the middle of the largest surplus space stack (in other words, borrowing half of its free space). To alleviate the shifting overhead, all stacks are aggregated together, as is the case with the heaps in memory; thus, the shifting process won’t involve any of the heap bytes.

The authors present an extensive performance evaluation of the SenSmart prototype. They measured the overhead of key operations; evaluated typical sensor network code via kernel benchmark programs and TinyOS applications; and assessed the multitask scheduling performance when multiple concurrent tasks execute. The results show that “SenSmart has a feasible stack adaptivity in accommodating concurrent tasks.” The authors professionally and scientifically present the pros and cons of SenSmart, and it is very clear that they are aware of every factor involved in the design process. When they accept a tradeoff, they weigh the involved factors and are willing to accept overhead for better achievement. As an example, they admit (based on their obtained results):

SenSmart is suitable for the applications with a CPU utilization lower than 30 percent, which is the common case in current [sensor] applications. For the computational-intensive applications, there is a tradeoff between stack adaptivity, multitasking capability, and power consumption.

The authors admit that SenSmart may not be a suitable solution for such computational-intensive applications. Their recognition of the application domain limitations for their OS is to be highly respected and ethically appreciated.

Table 4 lists other results related to the scheduling error of the kernel benchmark program. The authors meticulously analyzed their OS model with a thorough justification of every obtained result, whether it supported their system or not, which is also something to recognize.

One drawback about the presentation of their work is when they quickly suggest solutions to some problems without any real evaluation, just hand-waving. For example, they introduce a solution to the stack relocation failure by simply terminating the recent task that caused the problem. Then, they suggest that it is “technically feasible to extend this work to prioritize tasks and terminate the lowest priority task first under insufficient stack allocation space.” Introducing priority is not an easy task, and the overhead needs to be investigated first before considering it.

In conclusion, the novel SenSmart OS is a step toward increasing the soft computational power of sensor networks via the support of preemptive multitask scheduling, secure and isolated task memory spaces, and adaptive stack management. Performance analysis shows that SenSmart wins out over other techniques, considering all factors of operability.

Reviewer:  Hamdy Soliman Review #: CR141406 (1310-0906)
Bookmark and Share
  Featured Reviewer  
 
Sensor Networks (C.2.1 ... )
 
 
Memory Management (Garbage Collection) (D.3.4 ... )
 
Would you recommend this review?
yes
no
Other reviews under "Sensor Networks": Date
Performance analysis of opportunistic broadcast for delay-tolerant wireless sensor networks
Nayebi A., Sarbazi-Azad H., Karlsson G. Journal of Systems and Software 83(8): 1310-1317, 2010. Type: Article
Nov 8 2010
Heartbeat of a nest: using imagers as biological sensors
Ko T., Ahmadian S., Hicks J., Rahimi M., Estrin D., Soatto S., Coe S., Hamilton M. ACM Transactions on Sensor Networks 6(3): 1-31, 2010. Type: Article
Jan 10 2011
Efficient clustering-based data aggregation techniques for wireless sensor networks
Jung W., Lim K., Ko Y., Park S. Wireless Networks 17(5): 1387-1400, 2011. Type: Article
May 8 2012
more...

E-Mail This Printer-Friendly
Send Your Comments
Contact Us
Reproduction in whole or in part without permission is prohibited.   Copyright 1999-2024 ThinkLoud®
Terms of Use
| Privacy Policy