Dynamic Memory Management Evaluation for IoT-Based Operating Systems: A Case Study with Contiki-NG Using First-Fit, Best-Fit, and Worst-Fit Allocation Strategies
摘要
The Internet of Things (IoT) has become a pivotal technology, connecting resource-constrained heterogeneous devices across various domains, necessitating special-purpose operating systems with efficient memory management. As IoT devices are limited in memory, static memory allocation is usually used to improve memory utilization and reduce fragmentation. However, in some cases where the memory requirements are unpredictable, dynamic memory allocation is essential. The objective of this study is to evaluate the performance of dynamic memory management strategies in the Contiki-NG operating system as a case study. The methodology of this paper is to conduct experiments using three dynamic memory allocation strategies—first-fit, best-fit, and worst-fit—by modifying the heap memory module of the Contiki-NG operating system. We utilized the Cooja simulator to analyze memory fragmentation and utilization. The results revealed that the best-fit strategy achieved the lowest internal fragmentation and memory utilization. Despite the experiment being hindered by the set heap size and small network size employed in the tests, even though the results show how important it is to use a suitable dynamic memory allocation technique for improving IoT performance in constrained environments. In real-world IoT applications, such as healthcare monitoring systems, where effective resource usage is crucial, memory management optimization is crucial.