用户模式内存页分配:内存分配的银弹?
User Mode Memory Page Allocation: A Silver Bullet For Memory Allocation?
摘要:
本文提出了一种新的解决方案:消除分页虚拟内存和部分外包的内存页面分配和操作从操作系统内核到个人进程的用户空间-用户模式页面分配器-这允许应用程序有直接的,裸金属访问的页面映射所使用的硬件存储管理单元(MMU)的一部分,整个地址空间。然后,在一系列合成Monte-Carlo和真实世界应用程序设置中,对dlmalloc的mmap()抽象层的基于用户模式页面分配器的仿真与传统内核模式实现的mmap()进行基准测试。考虑到所进行的分析的极好的合成和积极的现实世界结果,本文提出,通过适当的操作系统和API支持,可以再次获得更高的性能,同时保持分配器性能不随分配或释放的内存量而变化,即在某些常见用例中性能提高100倍或更多。很少有通过简单易行的API和操作系统结构改变就能获得第二个银弹的可能性。
英文摘要:
This paper proposes a novel solution: the elimination of paged virtual memory and partial outsourcing of memory page allocation and manipulation from the operating system kernel into the individual process' user space - a user mode page allocator - which allows an application to have direct, bare metal access to the page mappings used by the hardware Memory Management Unit (MMU) for its part of the overall address space. A user mode page allocator based emulation of the mmap() abstraction layer of dlmalloc is then benchmarked against the traditional kernel mode implemented mmap() in a series of synthetic Monte-Carlo and real world application settings. Given the superb synthetic and positive real world results from the profiling conducted, this paper proposes that with proper operating system and API support one could gain a further order higher performance again while keeping allocator performance invariant to the amount of memory being allocated or freed i.e. a 100x performance improvement or more in some common use cases. It is rare that through a simple and easy to implement API and operating system structure change one can gain a Silver Bullet with the potential for a second one.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。