首页 | 官方网站   微博 | 高级检索  
相似文献
 共查询到20条相似文献,搜索用时 31 毫秒
1.
Dynamic storage allocation is an important part of a large class of computer programs written in C and C + +. High-performance algorithms for dynamic storage allocation have been, and will continue to be, of considerable interest. This paper presents detailed measurements of the cost of dynamic storage allocation in 11 diverse C and C + + programs using five very different dynamic storage allocation implementations, including a conservative garbage collection algorithm. Four of the allocator implementations measured are publicly available on the Internet. A number of the programs used in these measurements are also available on the Internet to facilitate further research in dynamic storage allocation. Finally, the data presented in this paper is an abbreviated version of more extensive statistics that are also publicly available on the Internet.  相似文献   

2.
The allocation and disposal of memory is a ubiquitous operation in most programs. Rarely do programmers concern themselves with details of memory allocators; most assume that memory allocators provided by the system perform well. Yet, in some applications, programmers use domain-specific knowledge in an attempt to improve the speed or memory utilization of memory allocators. In this paper, we describe a program (CustoMalloc) that synthesizes a memory allocator customized for a specific application. Our experiments show that the synthesized allocators are uniformly faster and more space efficient than the Berkeley UNIX allocator. Constructing a custom allocator requires little programmer effort, usually taking only a few minutes. Experience has shown that the synthesized allocators are not overly sensitive to properties of input sets and the resulting allocators are superior even to domain-specific allocators designed by programmers. Measurements show that synthesized allocators are from two to ten times faster than widely-used allocators.  相似文献   

3.
Automatic garbage collection relieves programmers from the burden of managing memory themselves and several techniques have been developed that make garbage collection feasible in many situations, including real time applications or within traditional programming languages. However, optimal performance cannot always be achieved by a uniform general purpose solution. Sometimes an algorithm exhibits a predictable pattern of memory usage that could be better handled specifically, delaying as much as possible the intervention of the general purpose collector. This leads to the requirement for algorithm specific customisation of the collector strategies. We present a dynamic memory management framework which can be customised to the needs of an algorithm, while preserving the convenience of automatic collection in the normal case. The Customisable Memory Manager (CMM) organises memory in multiple heaps. Each heap is an instance of C++ class which abstracts and encapsulates a particular storage discipline. The default heap for collectable objects uses the technique of mostly copying garbage collection, providing good performance and memory compaction. Customisation of the collector is achieved exploiting object orientation by defining specialised versions of the collector methods for each heap class. The object-oriented interface to the collector enables coexistence and coordination among the various collectors as well as integration with traditional code unaware of garbage collection. The CMM is implemented in C++ without any special support in the language or the compiler. The techniques used in the CMM are general enough to be applicable also to other languages. The performance of the CMM is analysed and compared to other conservative collectors for C/C++ in various configurations. © 1998 John Wiley & Sons, Ltd.  相似文献   

4.
The two most common approaches to managing shared-access memory-free lists and buddy systems-have significant drawbacks. Free list algorithms have poor memory access characteristics, and buddy systems utilize their space inefficiently. In this paper, we present an alternative approach to parallel-access memory management based on the fast-fits algorithm. A fast-fits memory manager stores free blocks in a tree structure, providing fast access and efficient space use. Since the fast-fits algorithm accesses fewer blocks than a free list algorithm, it reduces the amount of cache invalidation overhead due to the memory manager. Our performance experiments show that the parallel-access fast-fits memory manager allows significantly greater access rates than a serial-access fast-fits memory manager does. We note that shared-memory multiprocessor systems need efficient dynamic storage allocators, both for system purposes and to support parallel programs.  相似文献   

5.
雷兵兵  严华 《计算机应用》2017,37(4):1149-1152
针对现有的NAND闪存垃圾回收算法中回收性能不高,磨损均衡效果差,并且算法内存开销大的问题,提出了一种基于逻辑区间热度的垃圾回收算法。该算法重新定义了热度计算公式,把连续逻辑地址的NAND内存定义为一个热度区间,以逻辑区间的热度来代替逻辑页的热度,并将不同热度的数据分开存储到不同擦除次数的闪存块上,有效地实现了数据冷热分离,并且节约了内存空间。同时,算法还构造了一种新的回收代价函数来选择回收块,在考虑回收效率的同时,还兼顾了磨损均衡的问题。实验结果表明,该算法与性能优异的FaGC算法相比,总的擦除次数减少了11%,总的拷贝次数减少了13%,擦次数最大差值减少了42%,内存消耗能减少了75%。因此,该算法有利于增加闪存可用空间,改善闪存系统的读写性能,延长闪存使用寿命。  相似文献   

6.
针对Android存储系统在闪存管理上存在较差的磨损均衡效果和较高的垃圾回收额外开销的缺陷,引入冷热数据分离策略,将文件按照不同热度写入对应热度的物理存储单元,同时改进垃圾回收策略,以达到良好的磨损均衡效果并减少垃圾回收额外开销。基于Android平台的实验结果表明,改进后的策略在有效减少NAND闪存垃圾回收额外开销的同时,还能有效改善其磨损均衡效果。  相似文献   

7.
考虑操作时间局部性的NAND闪存脏块回收算法   总被引:1,自引:1,他引:0  
在闪存存储系统的脏块回收过程中,按照对数据操作的时间,将脏块中的有效数据分拣成"热"数据和"冷"数据,分别写入到当前"热"写入块和"冷"写入块中,减少在回收过程中多次对"冷"数据的无意义重复拷贝;同时在挑选脏块进行回收时,利用脏块中的有效数据量、块的最近更新时间、以及块的磨损程度构造代价函数,选整体效果最优的脏块进行回收操作.实验表明,与当前各种主要脏块回收算法相比,有较好的回收操作效率,降低了总体的块磨损程度,并有较好的块磨损均衡度.  相似文献   

8.
即时编译器辅助的垃圾收集技术结合显式和自动内存管理的优点,在编译阶段由即时编译器分析应用程序并在其中插桩显式释放内存的指令,以便垃圾收集器及时回收死亡对象所占用的内存空间,从而减轻垃圾收集器的负担.提出一种应用于该项技术的插桩算法,它基于控制流中的支配关系并提供不同的插桩策略,保证插桩的正确性和灵活性;它能够主动获得域引用从而释放对象及其域引用的内存空间.实验表明基于该插桩算法的垃圾收集器能够回收大量的内存空间,提高Java程序的执行效率.  相似文献   

9.
NAND flash memory is a promising storage media that provides low-power consumption, high density, high performance, and shock resistance. Due to these versatile features, NAND flash memory is anticipated to be used as storage in enterprise-scale systems as well as small embedded devices. However, unlike traditional hard disks, flash memory should perform garbage collection that consists of a series of erase operations. The erase operation is time-consuming and it usually degrades the performance of storage systems seriously. Moreover, the number of erase operations allowed to each flash memory block is limited. This paper presents a new garbage collection scheme for flash memory based storage systems that focuses on reducing garbage collection overhead, and improving the endurance of flash memory. The scheme also reduces the energy consumption of storage systems significantly. Trace-driven simulations show that the proposed scheme performs better than various existing garbage collection schemes in terms of the garbage collection time, the number of erase operations, the energy consumption, and the endurance of flash memory.  相似文献   

10.
由于Flash具有擦除次数有限、先擦后写的特点,会带来使用寿命有限的缺陷。为延长其预期使用寿命,普遍采用磨损均衡算法对各存储单元进行管理。该算法核心在每次写操作时将新数据写入到最少被使用的物理块中。本文对该算法在垃圾回收策略和对静态文件管理方式做出改进。垃圾回收时在遵照磨损均衡原则的前提下提高写入数据效率,同时增强该算法对不同类型的文件存储单元管理能力,从而达到更加有效的磨损均衡。  相似文献   

11.
基于类型的运行时环境存储管理算法   总被引:1,自引:0,他引:1  
张武生  杨广文  郑纬民 《软件学报》2005,16(8):1506-1512
基于类型进行分类管理堆空间的垃圾回收算法通过废弃对象复用来降低运行时环境创建对象所需时间开销,同时还通过线程缓存、租赁等技术进一步增强运行时系统的存储管理效率.运行实验表明,该算法能够在回收线程和工作线程之间实现细粒度的并行性并缩短对象申请和回收时间,进而能够减少工作线程的停顿现象,增加服务器应用的平滑性以及提高堆空间的使用效率.  相似文献   

12.
持久性内存具有非易失性、可字节寻址、随机读写速度快、能耗低以及可扩展性强等优良特性,为大数据存储和处理提供了新的机遇.然而,持久性内存系统的故障一致性问题为其广泛推广应用带来挑战.现有一致性保证的研究工作通常以增加额外读写为代价,对持久性内存系统的性能和寿命在时间和空间维度产生了一定的影响.为了降低该影响,提出一种耐久...  相似文献   

13.
方才华  刘景宁  童薇  高阳  雷霞  蒋瑜 《计算机应用》2017,37(5):1257-1262
由于NAND闪存的固有限制,写前擦除和擦除粒度较大,基于NAND Flash的固态硬盘(SSD)需要执行垃圾回收以重用失效页。然而垃圾回收带来的高开销会显著降低SSD的性能,也会直接影响SSD的寿命。特别是对于频繁使用的有数据碎片的SSD,垃圾回收带来的性能下降问题将更为严重,现有的垃圾回收(GC)算法各自侧重垃圾回收操作的某个步骤,并没有给出全面考虑各步骤对整体影响的综合方案。针对该问题,在详细剖析垃圾回收过程的基础上,提出了一种全程优化的垃圾回收方法WPO-GC,在数据初始放置、垃圾回收目标块的选择、有效数据的迁移、触发回收的时间点以及中断处理方式上,尽可能全面地考虑各步骤对SSD正常读写请求和寿命的影响。通过开源模拟器SSDsim上的WPO-GC的有效性验证表明,同典型GC算法相比,WPO-GC可以减少SSD读请求延迟20%~40%和写请求延迟17%~40%,均衡磨损近30%。  相似文献   

14.
Garbage collection algorithms for shared-memory multiprocessors typically rely on some form of global synchronization to preserve consistency. Such global synchronization may lead to problems on asynchronous architectures: if one process is halted or delayed, other, nonfaulty processes will be unable to progress. By contrast, a storage management algorithm is lock-free if (in the absence of resource exhaustion) a process that is allocating or collecting memory can be delayed at any point without forcing other processes to block. The authors present the first algorithm for lock-free garbage collection in a realistic model. The algorithm assumes that processes synchronize by applying read, write, and compare&swap operations to shared memory. This algorithm uses no locks, busy-waiting, or barrier synchronization, it does not assume that processes can observe or modify one another's local variables or registers, and it does not use inter-process interrupts  相似文献   

15.
FLSP:一个高效的系统级垃圾收集算法   总被引:1,自引:0,他引:1       下载免费PDF全文
垃圾收集是Java操作系统的核心功能,它直接影响到整个系统效率。现代Java操作系统中使用的垃圾收集算法普遍还是沿用应用程序级的垃圾收集算法。应用程序级垃圾收集算法的优化主要面向于普通的Java虚拟机。而Ja-va操作系统与Java虚拟机相比有更高的操作权限和更灵活的资源管理策略,如何利用这些特点和权限来提高垃圾收集算法的效率是以前的垃圾收集算法所没有考虑的。本文分析了操作系统下内存管理和垃圾收集的特点,在JUnicorn操作系统上,利用操作系统平台提供的便利,设计并实现了一个高效的系统级垃圾收集算法FLSP。测试数据表明,在操作系统级别,这种垃圾收集算法能够提高13%的系统性能,并且使垃圾收集的停顿时间缩短50%。  相似文献   

16.
We describe a technique for storage allocation and garbage collection in the absence of significant co-operation from the code using the allocator. This limits garbage collection overhead to the time actually required for garbage collection. In particular, application programs that rarely or never make use of the collector no longer encounter a substantial performance penalty. This approach greatly simplifies the implementation of languages supporting garbage collection. It further allows conventional compilers to be used with a garbage collector, either as the primary means of storage reclamation, or as a debugging tool. Our approach has two potential disadvantages. First, some garbage may fail to be reclaimed. Secondly, we use a ‘stop and collect’ approach, thus making the strategy unsuitable for applications with severe real-time constraints. We argue that the first problem is, to some extent, inherent in any garbage collection system. Furthermore, based on our experience, it is usually not significant in practice. In spite of the second problem, we have had favourable experiences with interactive applications, including some that use a heap of several megabytes.  相似文献   

17.
The memory intensive nature of object-oriented languages such as C++ and Java has created the need of a high-performance dynamic memory management. Object-oriented applications often generate higher memory intensity in the heap region. Thus, high-performance memory manager is needed to cope with such applications. As today's VLSI technology advances, it becomes more and more attractive to map software algorithms such as malloc(), free(), realloc(), and garbage collection into hardware.

This paper presents hardware designs of realloc function and sweeping function (for mark and sweep garbage collection) that fully utilize the advantages of combinational logic. In our scheme, the reallocation on the original block can be done in constant time. If the reallocation on the original block is not possible, the previously proposed malloc() and free() can be used to move the contents to a new location. For the sweeping function, the bit-sweeper can detect and sweep the garbage in constant time. Since the sweeping phase often consumes more time than the marking phase, the garbage collection time can be substantially improved. The hardware complexity of proposed scheme (i.e. X-Unit, RS-unit, ESG-unit, and bit-sweeper) is O(n), where n represents the size of bit-map.  相似文献   


18.
Andrew W. Appel 《Software》1989,19(2):171-183
Generational garbage collection algorithms achieve efficiency because newer records point to older records; the only way an older record can point to a newer record is by a store operation to a previously created record, and such operations are rare in many languages. A garbage collector that concentrates just on recently allocated records can take advantage of this fact. Such a garbage collector can be so efficient that the allocation of records costs more than their disposal. A scheme for quick record allocation attacks this bottleneck. Many garbage-collected environments do not know when to ask the operating system for more memory. A robust heuristic solves this problem. This paper presents a simple, efficient, low-overhead version of generational garbage collection with fast allocation, suitable for implementation in a Unix environment.  相似文献   

19.
A garbage collection algorithm that permits a reference count storage reclamation scheme to collect circularly linked inaccessible structures is presented. The algorithm requires no additional information beyond that required by a reference count scheme. In particular, it does not require the garbage collector to be able to find pointers outside the heap. The algorithm is most useful for augmenting reference count storage reclamation systems and for implementing storage management systems on top of languages that do not provide their own. It is, however, considerably less efficient in space and time than conventional garbage collection systems.  相似文献   

20.
张聪品  吴长茂  赵理莉 《计算机应用》2010,30(11):2876-2879
为了提高垃圾收集效率,减少用户程序等待时间,提出了一种在多核系统下基于LISP2算法的并行节点复制算法。该算法通过把LISP2算法的4个垃圾收集阶段分别并行化来实现并行垃圾收集。实验结果显示,该算法在多核系统下能有效提高垃圾收集效率。  相似文献   

设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司    京ICP备09084417号-23

京公网安备 11010802026262号