By Syed Ishtiaq Hussain Supervised by Dr. Humma Javed
Total Page:16
File Type:pdf, Size:1020Kb
RESOURCE AWARE PROCESS MIGRATION IN WIRELESS SENSOR NETWORKS By Syed Ishtiaq Hussain Supervised By Dr. Humma Javed DEPARTMENT OF COMPUTER SCIENCE UNIVERSITY OF PESHAWAR SESSION 2009-2010 RESOURCE AWARE PROCESS MIGRATION IN WIRELESS SENSOR NETWORKS By Syed Ishtiaq Hussain Dissertation Submitted to the University of Peshawar in partial fulfillment of the requirement for the degree of DOCTOR OF PHILOSOPHY Supervised By Dr. Humma Javed DEPARTMENT OF COMPUTER SCIENCE UNIVERSITY OF PESHAWAR SESSION 2009-2010 DEDICATION Dedicated to my beloved parents, and my kids… iv STATEMENT OF SOURCES DECLARATION I, the undersigned, author of this thesis, declare that this thesis is my own work and has not been submitted in any form for another degree at any university or institution. Information derived from published or unpublished work of others has been acknowledged in the text and a list of references is given. __________________ ______________ Syed Ishtiaq Hussain 28th September 2018 v RIGHTS OF THESIS All parts of this dissertation are reserved by the author, any part of this research shall not be produced or transmitted in any form or by any means, without formal permission from the author. Syed Ishtiaq Hussain vi ABSTRACT This thesis presents a novel architecture for native process migration (PM) in wireless sensors networks (WSN) without the use of virtual execution environment. Resources in WSN are scarce, therefore creating a virtual execution environment for processes so that they can be migrated, put an extra burden on already constrained resources. The proposed architecture for process migration allows live native processes to be migrated during execution. The process migration architecture takes migration decisions by continuously monitoring resources including remaining battery life and free memory space on a node. The architecture is suitable for networks with fewer expensive sensor nodes as it allows for better utilization of network resources. Transferring a live executing process helps in meeting processing demands dynamically, improves fault tolerance and resource utilization, and allows easier network management in WSN. The proposed architecture supports resourcing monitoring, request broadcasting and response collection, target node selection, process code and state transfer, and restoration of native process at the target node. Implementation of proposed architecture has been successfully tested on COOJA simulator and a test-bed of TelosB motes. The final implementation has been compared to agent based systems and virtual machine architectures. It shows a remarkable improvement in runtime energy efficiency and executable code size. vii ACKNOWLEDGEMENTS First and foremost, I would like to thank the source of all the wisdom, the ALLAH Almighty for bestowing me with the capabilities to accomplish this gigantic task. Next, I have no words to express my deepest sense of gratitude to my supervisor, Dr. Huma Javed for her encouragement and outstanding supervision. I am highly obliged to her for her untiring efforts and patience in reviewing numerous drafts of this thesis. I am also highly indebted to Prof. Dr. Shah Khusro, Prof. Dr. Saeed Mahfooz, Prof. Dr. Muhammad Abid as they have been very kind at all the time during the course of my PhD. Their cooperation was instrumental in overcoming some of the insurmountable problems without which this task would not have been possible. I would also thank Dr. Murad, Dr. Bilal, Muhammad Tehseen Khan and Saqib Muhammad Khawaja for their support and encouragement. Syed Ishtiaq Hussain viii TABLE OF CONTENTS Chapter 1. Introduction ............................................................ 1 1.1 Preamble .............................................................................................. 1 1.2 Middleware ........................................................................................... 5 1.2.1 WSNs Middleware .................................................................... 6 1.3 Process Migration ................................................................................ 7 1.3.1 Process Migration Scenarios .................................................... 8 1.3.2 Issues in Process Migration .................................................... 10 1.4 Problem Statement ............................................................................ 12 1.5 Design Goals ....................................................................................... 15 1.6 Novel Contributions ........................................................................... 16 1.6.1 Process Migration Middleware Architecture ......................... 16 1.7 Thesis Structure ................................................................................. 19 1.8 Summary ............................................................................................ 19 Chapter 2. Overview of Wireless Sensor Networks ...................... 21 2.1 Structure of Wireless Sensor Networks ............................................. 22 2.1.1 Components of Wireless Sensor Nodes ................................. 22 2.2 Wireless Sensor Network Characteristics .......................................... 25 2.2.1 Wireless Sensor Network Topology and Software ................. 28 2.3 Physical Constraints on Wireless Sensor Networks .......................... 30 2.4 Programming Paradigms for WSNs .................................................. 31 2.5 Operating System for Wireless Sensor Networks .............................. 32 2.5.1 Mobile Agent based Systems for WSNs ................................. 32 2.5.2 Contiki Operating System for Wireless Sensor Networks ..... 33 ix 2.6 Summary ............................................................................................ 33 Chapter 3. Overview of Process Migration ............................... 35 3.1 Process Migration Types .................................................................... 35 3.2 Process Migration in Conventional Operating Systems .................... 36 3.2.1 Check-point and Restore ........................................................ 37 3.3 Existing Process Migration Middleware Architectures for WSNs .... 38 3.3.1 Native Process Migration ....................................................... 39 3.3.2 Agent Based Systems .............................................................. 39 3.3.3 Process migration in Java ....................................................... 40 3.4 Homogeneous Process Migration ...................................................... 42 3.5 Heterogeneous Process Migration ..................................................... 44 3.6 Advantages of Process Migration in WSNs ....................................... 45 3.6.1 General Advantages of Process Migration ............................. 46 3.6.2 Ubiquitous Computing ........................................................... 48 3.7 Load Balancing ................................................................................... 49 3.7.1 Fault Tolerance in Wireless Sensor Networks ....................... 49 3.8 Initiation of Process Migration in WSNs ........................................... 50 3.9 Functional and Deployment Constraints in Process Migration on WSNs 51 3.10 Types of Processes on Wireless Sensor Nodes .................................. 53 3.11 Summary ............................................................................................ 54 Chapter 4. Process Migration Architecture for WSN ............... 55 4.1 Steps of Process Migration................................................................. 55 4.2 Proposed Process Migration Architecture for WSNs ............................ 58 x 4.2.1 Components of Process Migration Architecture for WSNs ... 58 4.2.2 Core Services ............................................................................ 61 4.3 Performance Measurements for Process Migration .......................... 62 4.4 Process Migration Implementation ................................................... 63 4.5 Overview of the Sender and Receiver Algorithms ............................. 63 4.5.1 Submodules ............................................................................ 65 4.5.2 Overview of process migration between two nodes ............... 65 4.6 Sender Node Algorithm ..................................................................... 67 4.7 Receiver Node Algorithm ................................................................... 69 4.8 Details of helper algorithms ............................................................... 71 4.8.1 Energy Consumption Estimation ........................................... 71 4.8.2 Battery Voltage Estimation .................................................... 71 4.8.3 Free Memory Estimation........................................................ 72 4.8.4 Node Proximity Estimation .................................................... 73 4.8.5 Load Balancing ....................................................................... 74 4.8.6 Process Selection .................................................................... 74 4.8.7 Processor Load Estimation .................................................... 75 4.9 Summary ............................................................................................ 76 Chapter 5. Evaluation.............................................................. 78 5.1 Comparison between Native and Non-native Code Execution ......... 78 5.2 Comparison to other Architectures .................................................