Disadvantages of Object-Oriented Paging

Grant Emery

In the virtual memory game, people are always searching for ways to squeeze a little more efficiency out of the system, be it though different caching policies or entirely new paging policies. In particular, a system where logical blocks of data are paged in and out of memory (a so-called "object-oriented paging system") can offer advantages over standard physical-block paging systems. These schemes, however, also come with some significant drawbacks, namely, that they can't efficiently handle large datastructures and the overhead for dealing with fragmentation and purging is extreme.

One drawback to using object-oriented paging schemes is the fact that they can't really handle huge data structures efficiently. In a situation where, say, we had six databases each of which took more than half of the available primary storage there would be no efficient way to page them, while a standard system could maintain the active chunks of each of the databases in memory at any given time. The object-oriented system is heavily constrained by the nature of the objects while the standard system doesn't care what form the data takes.

Another major drawback to an object-based system is the overhead involved in handling replacement and defragmentation. In a paging system with fixed page sizes, replacement is a simple linear algorithm to determine the least recently used page and flush it out to disk in necessary. In an object-oriented system one must continue flushing out objects until there's enough space to hold the new object. Flushing a single object is never faster than flushing a single page and several objects may need to be swapped to disk before sufficient storage is available for the new object. Additionally, after flushing the objects, the virtual memory manager must defragment the primary storage before the new object can be stored. While defragmentation is a linear operation, it is a costly one at best.

So while an object-oriented paging scheme may make more sense in the context of more logical use of locality of reference, those benefits come at significant cost in terms of algorithmic complexity and overhead.