登录

  • 登录
  • 忘记密码?点击找回

注册

  • 获取手机验证码 60
  • 注册

找回密码

  • 获取手机验证码60
  • 找回
毕业论文网 > 毕业论文 > 计算机类 > 物联网工程 > 正文

无线传感器操作系统动态内存管理机制实现及性能分析毕业论文

 2021-03-23 09:03  

摘 要

无线传感器网络技术(WSN)在智能交通、智慧医疗、精准农业、智能家居等领域广泛发挥了重要作用,与之配套的WSN操作系统已较为成熟,但针对操作系统底层的研究较少,尤其是内存管理机制十分不完善,这非常不利于无线传感技术的广泛普及应用。目前,无线传感技术存在无线传感节点软硬件资源有限、无线传感应用复杂多样、操作系统底层内存利用率低等诸多问题亟待解决。本文结合相关问题及国内外研究现状提出并实现了三种具有较高适用价值和意义的无线传感器网络操作系统动态内存管理机制,并参考行业中的相关机制进行效能评估对比研究。

本文主要针对无线传感网络软件、硬件资源,以及无线传感网络操作系统底层展开研究,选择基于Atmega128微处理器的DMAVR-L单片机及配套的编译调试平台,构思设计并成功实现了相关动态内存管理的机制策略。首先,针对无线传感网络软件、硬件及底层操作系统存在的问题进行研究,结合国内外基本研究现状,提出本文研究的总体方案及思路。然后详细介绍了本文使用的微处理器、单片机等硬件设备及软件平台。其次,详细描述了固定大小块机制、主动式碎片回收的顺序适应机制和被动式碎片回收顺序的适应机制三种动态内存管理机制的策略及实现代码,在各动态内存管理机制中实现了链表化管理、碎片整理等功能。最后,通过严谨的效能评估证实,本文提出的三种无线传感器网络动态内存管理机制可以有效减少无线传感节点内存碎片、提高内存利用率并更好地支持无线传感节点应用,对推进无线传感技术发展、完善无线传感技术底层研究有着重要的意义。

关键字:无线传感器网络;操作系统;内存管理;嵌入式

Abstract

Wireless sensor network technology (WSN) has played an important role in intelligent transportation, intelligent medical care, precision agriculture, intelligent home and so on. The WSN operating system is more mature, but the research on the bottom of the operating system is less, especially Memory management mechanism is very imperfect, which is very detrimental to the wide range of wireless sensor technology applications. At present, there are wireless sensor technology wireless sensor node hardware and software resources are limited, wireless sensor applications are complex and diverse, the operating system, the underlying memory utilization is low and many other issues to be solved. In this paper, three kinds of dynamic memory management mechanisms of wireless sensor network operating system with high applicable value and significance are proposed and implemented according to the related problems and the research status quo at home and abroad, and the performance evaluation of the wireless sensor network is compared with the relevant mechanism in the industry.

This paper mainly focuses on the research of wireless sensor network software, hardware resources and wireless sensor network operating system. It chooses DMAVR-L single chip microcomputer based on Atmega128 microprocessor and its supporting compiling platform, and designs and successfully implements the relevant dynamic memory Management mechanism strategy. Firstly, this paper studies the existing problems of wireless sensor network software, hardware and the underlying operating system, and puts forward the overall scheme and ideas of this paper, combining with the basic research status at home and abroad. And then introduced in detail the use of the microprocessor, microcontroller and other hardware and software platform. Secondly, it describes the strategy and implementation code of three kinds of dynamic memory management mechanisms, such as fixed size block mechanism, active fragmentation recovery order adaptation mechanism and passive debris recovery order, and implements chain management in each dynamic memory management mechanism , Defragmentation and other functions. Finally, through the rigorous performance evaluation confirmed that the proposed three kinds of wireless sensor network dynamic memory management mechanism can effectively reduce the wireless sensor node memory fragmentation, improve memory utilization and better support wireless sensor node applications, to promote wireless transmission Sense of technology development, improve the bottom of the wireless sensor technology research has important significance.

Keywords: Wireless Sensor Network; operating system; memory management; Embedded

目录

第一章 绪论 1

1.1研究背景及研究意义 1

1.2相关研究现状 2

1.2.1常见内存管理机制 3

1.2.2相关研究工作的不足 4

1.3本文主要研究内容 4

1.4本文组织结构 5

第二章 软硬件平台的设计开发 6

2.1 硬件开发平台 6

2.1.1 Atmega128微处理器 6

2.1.2 DMAVR-L单片机 6

2.2 软件开发平台 7

2.3本章小结 9

第三章 系统原理及方案设计 10

3.1固定大小块分配方法 10

3.1.1空闲块链表管理 10

3.1.2内存块的分配与释放 10

3.2主动式碎片整理的顺序适应机制 12

3.2.1内存空间的分配与释放 12

3.2.2内存空间间接寻址 13

3.3被动式碎片整理的顺序适应机制 13

3.3.1内存空间的分配与释放 14

3.3.2相邻空闲块合并与碎片整理 14

3.4本章小结 16

第四章 方案实现及性能评估 17

4.1固定大小块内存管理机制实现 17

4.1.1分区及内存块的数据结构 17

4.1.2空闲块链表初始化 18

4.1.3内存块分配函数 18

4.1.4内存块释放函数 19

4.2主动式碎片整理顺序适应机制实现 20

4.2.1主动式SF机制分配函数 20

4.2.2主动式SF机制释放函数 22

4.3被动式碎片整理顺序适应机制实现 23

4.3.1被动式SF机制内存块分配函数 24

4.3.2被动式SF机制的内存碎片整理 26

4.3.3被动式SF机制内存块释放函数 27

4.4性能评估 28

4.5本章小结 30

第五章 总结与展望 31

5.1总结 31

5.2展望 31

  1. 绪论

1.1研究背景及研究意义

无线传感器网络(Wireless Sensor Network,WSN)是由安装部署在监测区域内大量传感节点相互通信而形成的多跳自组织网络系统,是物联网底层网络的重要技术形式。随着无线通信、嵌入式应用和微电子技术的日趋成熟,WSN可以在任何时间、地点、环境条件下获取内容,为为物联网(Internet of Things,IoT)的发展奠定了基础[1]。传统的传感器信息获取技术从独立采集信息向网络化发展,从而形成无线传感器网络这一全新的技术,更成为下一代互联网关键组成部分。

无线传感器网络技术在国际上备受关注,它同时也被认为是21世纪最重要的科技技术之一。无线传感网络操作系统是无线传感网络的支撑技术之一,是无线传感网络基本的平台和环境,也是开发WSN平台应用程序的基础[2]。无线传感网络操作系统底层平台又是操作系统的关键技术,它是操作系统及其应用软件与操作系统硬件之间的重要链接部分,故研究无线传感网络操作系统底层平台有着重要的意义。

近几年,微电子技术、计算技术及无线通信技术飞速发展,促使无线传感器网络节点的制造成本不断下降,其物理体积也越来越小,从而使得无线传感器网络技术在越来越多的领域(军事、农业、工业、交通、家居等)得到了快速应用。无线传感器网络高度面向应用,其节点操作系统面临着很多难点和挑战。

内存是影响操作系统运行效率的关键因素,RAM(Random Access Memory,随机存取存储器)作为WSN操作系统最重要的系统资源,传感器节点的内核和所有系统、用户进程通过共享有限的物理内存来运行,其分配和释放策略对系统的运行效率起着至关重要的作用。同时,在无线传感器网络操作系统中,内存资源十分宝贵,例如常用的Atmega128芯片的内存仅有4KB,因此必须提供有效的内存管理机制对内存资源进行合理高效的管理,才能提高内存资源的利用率。

目前,内存分配的机制主要有两类:静态分配和动态分配[3];静态内存分配机制下,程序在编译时已经分配好所需的内存空间,因此采用这种内存分配方式的系统具有实时、响应快和内存管理结构简单的特点。但这种分配方式是在最坏情况下进行内存分配,未灵活考虑到实际使用时多变的情况,内存利用率很低。采用动态内存分配方式的系统则是将按照用户的实际需求进行内存分配,则使用该内存分配方式的系统的内存利用率比静态分配的高得多。传感器网络结点操作系统是硬实时系统和软实时系统的综合,若系统中实时任务要求完成得越快越好,则采用静态分配算法;对于可靠性和实时性要求不那么高的非实时任务,采用动态内存分配算法。对动态分配因其按需分配的灵活性使得众多学者对其进行深入研究,在现在的程序中也被广泛使用。

内存管理机制需要解决内存碎片问题,目前使用中的无线传感器网络操作系统在内存管理时均会产生内存碎片。内存碎片分为内部碎片和外部碎片[4];内部碎片指已被分配出去(属于已知任务),却不能被利用的内存空间,直到此块内存被该任务释放,系统才可能重新利用此块内存空间;外部碎片指未被分配(不属于任何对象),但由于占用空间太小而无法分配给申请内存空间的新任务的内存空闲区域。所以在内存管理中需要对内存碎片进行控制,使其对内存申请和释放的干扰降到最低。

您需要先支付 80元 才能查看全部内容!立即支付

企业微信

Copyright © 2010-2022 毕业论文网 站点地图