Browse Prior Art Database

Packing Variable-Sized Segments in the Swap File of a Paging-Based Virtual Memory System

IP.com Disclosure Number: IPCOM000117556D
Original Publication Date: 1996-Mar-01
Included in the Prior Art Database: 2005-Mar-31
Document File: 2 page(s) / 106K

Publishing Venue

IBM

Related People

Christopher Jr, KW: AUTHOR [+2]

Abstract

Disclosed is a method to efficiently manage the swapping of variable-sized segments between physical memory and auxiliary storage in a paging-based virtual memory system or in a system implementing both segmentation and paging. For example, this method reduces the swap file size in disk storage when 16-bit, segment-based software is run with a 32-bit operating system using a paging-based virtual memory architecture.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 51% of the total text.

Packing Variable-Sized Segments in the Swap File of a Paging-Based
Virtual Memory System

      Disclosed is a method to efficiently manage the swapping of
variable-sized segments between physical memory and auxiliary storage
in a paging-based virtual memory system or in a system implementing
both segmentation and paging.  For example, this method reduces the
swap file size in disk storage when 16-bit, segment-based software is
run with a 32-bit operating system using a paging-based virtual
memory architecture.

      Without this method, paging-based memory management causes
all memory allocation to be performed with page-size granularity.
Physical memory and disk space for the swap file is inefficiently
used when there are many memory segments much smaller than a page,
since every segment must start on a page boundary.

      The presently-disclosed method uses multiple granularities
in swapping segments into and out of the swap file.  In an example
of OS/2* memory management, it is effective to use two distinct
granularities, with 2KB being used for 16-bit segments and for end
pages of large segments, and with the normal 4KB being used for full
or nearly full segment pages and 32-bit objects.  Two available bits
in the Virtual Page (VP) structure for a specific page, in physical
memory or in the swap file, are defined respectively as the SMALLSEG
bit, which indicates whether a page belongs to a segment less than
2KB in size, and as the POSITION bit, which indicates which half of
the 4KB page frame in the swap file is occupied by a small segment.
Other system structures remain as they are in a conventional paging
environment.  In memory, every segment, regardless of size, takes up
one or more full 4KB pages in the virtual and physical memory space,
with each segment starting on a page boundary.  However, when small
segments (less than 2KB in size) are swapped into the swap file, two
such segments are packed into a single 4KB page frame.

      When a segment-based program is loaded into memory, the loader
of the operating system determines which segments, or end pages, are
less than 2KB.  For each of these small segments, the loader passes a
flag to the page manager of the operating system so that the page
manager sets the SMALLSEG bit.

      As in a system having a conventional memory manager, after all
required segments are loaded into physical memory, the program
executes, with physical memory pages being allocated and freed as
needed.  The operating system periodically scans all pageable pages
in the system, placing pages which have not been referenced in a long
time onto a linked list, such as the idle list of OS/2.  When the
system needs one or more...