# Software Defined Networking for Improved Wireless Sensor Network Management: A Survey
## 5 Management of WSNs Based on SDN
### Management of Enabling Technologies  
#### 5.6.1 Enabling Software  
A major part of WSNs based on SDN is software, which enables the management and control of sensor nodes and also forms the basis for sensor operations. The SDN-based architecture allows for the management and control of enabling software taking place at the application, control and data planes in a particular manner that enables application programmers to adjust the sensor functionalities by invoking different programs making the sensor node behave like a tiny computer. This also calls for the sensor nodes in the data plane to have an operating system however, a less complex one compared to personal computers because sensor nodes have limited processing power and memory [62]. There are several sensor operating systems that enable the integration of sensors into the architecture of an SDN-based WSN. Choice of operating system affects the memory management and protection of sensor nodes with memory management being classified into either static or dynamic memory management. Static memory management is fixed and simple hence useful for constrained memory nodes but is not flexible due to the unavailability of allocating memory at run-time. Dynamic memory management on the other hand is flexible as it provides for allocation and de-allocation of memory at run-time [132]. SDN-based WSNs provide for multiple execution of functions thus the need for memory protection to prevent the mix up of process address spaces. TinyOS [83; 133] written in \(\mathrm{nesC}\) has been structured for low-power wireless sensors and embedded systems that have limited resources. TinyOS provides for static memory management with memory protection. The use of TinyOS in WSNs based on SDN has been demonstrated in [69; 101; 117]. Contiki [81; 134] has been presented as a lightweight operating system with support for dynamic network loading and redefinition of node programs. Feasibility of dynamic loading and offloading of programs in a resource constrained network is demonstrated [81] based on Contiki. Contiki supports dynamic memory management and memory block functions but does not provide a management mechanism for memory protection between function executions [132]. Other available operating systems include MultimodAl system for NeTworks of In situ wireless Sensors (MANITS), Nano-RK and LiteOS [132] however there is little or no implementation of these operating systems in SDN-based management of WSNs but rather for ordinary WSNs. Table 4 compares the available sensor node operating systems for integration in SDN-based management of WSNs.  
An important feature of SDN in WSNs is to provide a global view of sensor nodes allowing for efficient program delivery when forwarding control data or updating node software for a new task. The architecture hence allows for this program delivery through Over The Air Programming (OTAP) Techniques which contribute to the efficient management of enabling software. Use of OTAP in downloading of roles to nodes via a multi-hop wireless link in a reconfigurable SDWSN has been demonstrated in [136]. Efficiency in OTAP has been further demonstrated by the use of SDN-WISE, an SDN solution for WSNs. A hands-on demonstration has been done using SDN-WISE to reprogramme WSNs allowing for various logical sensor networks to exist together while using the same node hardware [137].