An Efficient Differencing Algorithm for Reprogramming Wireless Sensor Networks
Biyuan Mo, Wei Dong, Chun Chen, Jia Jun Bu and Qiang Wang
Wireless reprogramming is a crucial technique for managing large-scale wireless sensor networks (WSNs). It is, however, energy intensive to disseminate the code to enable reprogramming. Incremental reprogramming is a promising approach to reduce the dissemination cost. In incremental reprogramming, only the delta between the new code and the old code needs to be disseminated, resulting much less energy consumption. The differencing algorithm plays a key role in incremental reprogramming. It takes inputs of two successive versions of codes and generates a small delta script for dissemination. Existing incremental algorithms have several limitations. First, they do not ensure the smallest delta size for dissemination. Second, some of them may incur a large overhead in terms of execution time and memory consumption. To address these issues, we propose DASA, an efficient differencing algorithm based on suffix array. DASA performs byte-level comparison and ensure the optimal result in terms of the delta size. Moreover, DASA has a low execution overhead. The time complexity and space complexity of DASA are O(n log n) and O(n), respectively. To the best of our knowledge, DASA is the optimal algorithm with the lowest time and space complexity for reprogramming WSNs.
Keywords: Reprogramming, wireless sensor networks