Managing discardable pages
暂无分享,去创建一个
This thesis introduces discardability as a page attribute and demonstrates significant performance benefits from exploiting this attribute when doing page replacement.
Not all modified pages need be saved and later restored. An application may modify one or more pages and, later, may not care about their contents. I refer to these pages as discardable dirty pages. When paging out such a page, the OS can simply remove the page from the application's address space and place it on the free list. When faulting in a previously discarded page, the OS can remove a page from the free list and map it to the application's address space after zerofilling.
Two classes of applications create and access memory pages that alternate between being discardable and non-discardable: those written in languages that support copying garbage collection and those that use memory as a scratch-pad. If there is OS support for exploiting discardability, another type of application can take advantage of it, by marking pages containing recomputable data as discardable. I refer to these pages as recomputable discardable pages.
Existing operating systems do not support the user in specifying pages as discardable. In addition, even though an application can use available functionality to prevent some OSs from saving and restoring discardable pages, such functionality is inadequate and inefficient.
My thesis presents a design, implementation, and evaluation of user-level and kernel algorithms for managing discardable pages. In a test application, when the system is paging, reducing disk access by giving preference to discardable pages improved performance threefold. When the system is not paging, a lazy approach to freeing discardable pages improved performance by 8% over an eager approach. In the kernel implementation, about 75% of pages did not require zerofilling when servicing page faults on previously discarded pages.
I conclude that the discardability attribute is versatile and support for lazy freeing of discardable pages offers significant performance benefits. Furthermore, the lazy approach encourages applications to communicate discardability of recomputable pages thereby making significant reduction in secondary storage access possible.