A method and system for implementing transparent compressed memory paging within
a computer system. Data compression is performed in memory to increase resources
available to the computer system and to reduce disk accesses. The compression is
performed transparently to the operating system which requires no special software
interfaces to make use of the reclaimed memory. In a first embodiment, data compression
is performed in hardware to reclaim memory. This reclaimed memory is not made available
to the operating system but is rather used as a hardware controlled disk cache
to increase system performance. In this embodiment, a novel method is employed
to reduce duplicate memory pages in the disk cache and the operating system memory.
In another embodiment, the reclaimed memory is made available in a transparent
way to the operating system. Variable compression ratios can lead to varying physical
memory space available for the operating system. Therefore, if actual memory space
becomes near exhausted, a process is automatically triggered that exclusively allocates
blocks of physical memory to a driver thereby removing them from operating system
usage. In the second embodiment, a special cache table is used for uncompressed
physical memory pages.