arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2106.12995cs.PLcs.SE
收藏

Userfault对象:透明可编程存储器

Userfault Objects: Transparent Programmable Memory

Konrad Siek, Colette Kerr

摘要:

Userfault Object(UFO)框架探索了与操作系统协作以非传统方式使用内存的途径。我们实现了一个框架,该框架使用Linux内核的userfault机制来按需填充运行时对象的内容。当一个对象的内存被访问时,框架执行一个用户定义的函数来生成对象的一个切片。后端可以凭空生成数据,根据公式计算数据,或者从持久性存储、网络或其他来源(有或没有后处理)检索数据。UFO遵循标准运行时对象的内存布局,因此可以安全地进行内省和写入。该框架管理对象段的加载和卸载,以确保根据需要回收内存,并且数据永远不会丢失。这允许UFO框架实现比内存大的数据结构,这些数据结构永远不会完全具体化为内存。将对象实现为UFO也会影响性能,因为填充内存的开销是通过一次加载整个数据页来分摊的。主机运行时还可以依赖于对userfault对象的直接内存访问,从而避免了对特殊调度机制的需要。我们为R语言提供了UFO框架的概念验证实现。

英文摘要:

The Userfault Object (UFO) framework explores avenues of cooperating with the operating system to use memory in non-traditional ways. We implement a framework that employs the Linux kernel's userfault mechanism to fill the contents of runtime objects on demand. When an object's memory is accessed the framework executes a user-defined function that generates a slice of the object. The back-end can generate data from thin air, calculate it from a formula, or retrieve it from persistent storage, the network, or other sources (with or without post-processing). UFOs follow the memory layout of standard runtime objects, so they can be introspected and written to safely. The framework manages the loading and unloading of object segments to ensure that memory is reclaimed as needed and data is never lost. This allows the UFO framework to implement larger-than-memory data structures that never materialize into memory in full. Implementing objects as UFOs also impacts performance, since overhead of populating memory is amortized by loading entire pages of data at a time. The host runtime can also rely on direct memory accesses into userfault object obviating the need for a special dispatch mechanism. We provide a proof-of-concept implementation of the UFO framework for the R language.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑