无线传感器操作系统动态内存管理机制实现及性能分析外文翻译资料

 2022-11-14 04:11

英语原文共 34 页,剩余内容已隐藏,支付完成后下载完整资料


1.Memory Management in MIROS

1.MIROS内存管理

Memory management is important for the WSN as it can help to utilize memory resources more efficiently. Static allocation has been used in several WSN OSes, such as the TinyOS and the openWSN. This approach has low execution overhead. However, it is not flexible to adapt to the varied WSN contexts. Moreover, the memory resources cannot be utilized efficiently. To improve the allocator flexibility as well as the memory utilization efficiency, the dynamic allocation needs to be implemented.

内存管理对于WSN很重要,因为它可以帮助更有效地利用内存资源。静态分配已经在几个WSN操作系统中使用,如TinyOS和openWSN。这种方法具有较低的执行开销。然而,适应不同的WSN环境是不灵活的。而且,存储资源不能有效利用。为了提高分配器的灵活性和内存利用效率,需要实现动态分配。

Buddy memory allocation [19,20] is a popular representative of the dynamic allocation. This approach is relatively easy to be implemented and has fast allocation response time. Moreover, it supports efficient splitting and coalescing of the memory blocks. However, it has the drawback of producing large internal fragmentation. In the article [21], it is concluded that the fragmentation percentage of the buddy systems can be up to 50%. As a result, this approach is not fit for use in memory-constrained WSN nodes. Besides the buddy systems, the sequential fits (SF) and the segregated free lists (SFL) are the two basic dynamic allocation mechanisms, and they are commonly realized in the current WSN OSes.

好友记忆分配是动态分配的热门代表。这种方法比较容易实现,具有快速的分配响应时间。此外,它支持高效的内存块分割和聚合。然而,它具有产生大的内部碎裂的缺点。在文章[21]中,得出结论,伙伴系统的分裂百分比可以达到50%。因此,这种方法不适用于内存受限的WSN节点。除了好友系统,顺序拟合(SF)和隔离自由列表(SFL)是两种基本的动态分配机制,它们通常在当前的WSN操作系统中实现。

1.1. Dynamic Memory Allocators in the Current WSN OSes

1.1. 当前WSN操作系统中的动态内存分配

Segregated free list (SFL) allocator has been used in Contiki, SOS and uCOS. It divides the memory heap into segregated partitions. Each partition holds a set of fixed-size blocks, and a free list is used for the block allocation. Upon allocation, a block is deleted from the header of the matched free list. Upon releasing, the released block is added to the header of the matched free list. In Figure 6a, the SOS SFL allocation mechanism is depicted.

在Contiki,SOS和uCOS中已经使用了分离的自由列表(SFL)分配器。它将内存堆分为隔离分区。每个分区保存一组固定大小的块,并且空闲列表用于块分配。在分配时,从匹配的免费列表的头部中删除块。释放后,释放的块被添加到匹配的自由列表的头部。在图6a中,示出了SOS SFL分配机制。

Sequential fit (SF) allocator is different from the segregated free list (SFL) allocator in that the memory heap is not divided into segregated partitions. Instead, all the allocations are performed inside the heap in a sequential way, and only one free list rather than several segregated free lists is used to manage the free memory. Upon allocation, the free list is searched to find a suitable free entry, and the searching algorithm can be the best fit, the first fit, the next fit or the good fit [22]. In Figure 6b, the mantisOS SF allocation mechanism is depicted.

顺序拟合(SF)分配器与分离的空闲列表(SFL)分配器不同,因为内存堆不分成隔离分区。相反,所有的分配是以顺序方式在堆内执行的,只有一个空闲列表而不是几个独立的空闲列表来管理可用内存。在分配后,搜索空闲列表以找到合适的空闲条目,并且搜索算法可以是最佳拟合,第一拟合,下一个拟合或良好拟合。在图6b中,描绘了mantisOS SF分配机制。

The SFL allocator shows its advantage in the short and deterministic allocation time. This feature is significant for the real-time systems. However, each SFL partition needs to be pre-reserved. If the pre-reserved size is too small, the memory overflow problem will occur. If it is too large, the memory utilization efficiency will be low and the memory insufficiency problem can occur. Due to these reasons, the SFL allocator is not flexible to adapt to the varied application contexts.

SFL分配器在短期和确定性分配时间中显示出其优势。该功能对于实时系统是重要的。 但是,每个SFL分区需要预先保留。如果预留大小太小,会出现内存溢出问题。如果它太大,则内存利用效率将会很低,并且可能会发生内存不足问题。由于这些原因,SFL分配器不能灵活地适应各种应用环境。

The key advantages of the SF allocator are that no memory area needs to be pre-reserved and no internal memory fragmentation exists. However, the allocation time is not deterministic as an appropriate entry needs to be searched upon the allocation. Moreover, the external memory fragmentations exist, e.g., in Figure 6b, if a 30-byte object needs to be allocated, the allocation will fail although the total size of the free memory is larger than 30 bytes. Currently in the mantisOS, no mechanism is implemented to solve this fragmentation problem, and this will decrease the utilization efficiency of the memory resources.

SF分配器的关键优点是不需要预存储内存区域,并且不存在内部内存碎片。然而,分配时间不是确定性的,因为在分配时需要搜索适当的条目。而且,例如在图6b中存在外部存储器碎片,如果需要分配30字节的对象,尽管可用存储器的总大小大于30字节,但是分配将失败。 目前在mantisOS中,没有实现解决这个分片问题的机制,这将降低内存资源的利用效率。

1.2. Dynamic Memory Allocators in MIROS

1.2 MIROS中的动态内存分配器

To address the challenges presented above, the heap-extendable SFL allocator and the defragmented SF allocator are developed in MIROS. With these allocators, the flexibility problem of the SFL allocator can be eased, and the fragmentation problem of the SF allocator can also be solved.

为了解决上述挑战,在MIROS中开发了可扩展的SFL分配器和碎片整理的SF分配器。 利用这些分配器,可以缓解SFL分配器的灵活性问题,也可以解决SF分配器的分片问题。

1.2.1. MIROS Heap-Extendable Segregated Free List Allocation

1.2.1 MIROS堆可扩展分离的免费列表分配

To improve the flexibility and ease the pre-reservation problem, the heap extending mechanism is applied in the MIROS SFL allocator. With this mechanism, no partition needs to be reserved to the maximum size, but to a moderate size which will be enough for most run-time contexts. In case that a partition overflows, the allocation will not fail but continues in the extended heap area, as seen in Figure 7. In so doing, the MIROS SFL allocator becomes flexible. This flexibility feature is important for the WSN as the WSN contexts are diverse and it is impossible to find an ideal pre-reserved solution which will be suitable for all the diverse WSN contexts, e.g., if a WSN node is configured to be a router, the size required by the packet buffering partition will be greatly different from the case when this node is conf

剩余内容已隐藏,支付完成后下载完整资料


资料编号:[137062],资料为PDF文档或Word文档,PDF文档可免费转换为Word

原文和译文剩余内容已隐藏,您需要先支付 30元 才能查看原文和译文全部内容!立即支付

以上是毕业论文外文翻译,课题毕业论文、任务书、文献综述、开题报告、程序设计、图纸设计等资料可联系客服协助查找。