All Topics  
Paging

 

   Email Print
   Bookmark   Link






 

Paging



 
 
In computer
Computer

A computer is a machine that manipulates Data according to a list of Code .The first devices that resemble modern computers date to the mid-20th century , although the computer concept and various machines similar to computers existed earlier....
 operating system
Operating system

An operating system is an interface between hardware and applications; it is responsible for the management and coordination of activities and the sharing of the limited resources of the computer....
s that have their main memory divided into pages
Page (computing)

In a context of computer virtual memory, a page, memory page, or virtual page is a fixed-length block of main memory, that is contiguous in both physical memory addressing and virtual memory addressing....
, paging (sometimes called swapping) is a transfer of pages between main memory and an auxiliary store, such as hard disk drive. Paging is an important part of virtual memory
Virtual memory

Virtual memory is a computer system technique which gives an application program the impression that it has contiguous working memory , while in fact it may be physically fragmented and may even overflow on to disk storage....
 implementation in most contemporary general-purpose operating systems, allowing them to use disk storage for data that does not fit into physical RAM. Paging is usually implemented as architecture-specific
Computer architecture

Computer architecture in computer engineering is the conceptual design and fundamental operational structure of a computer system. It is a blueprint and functional description of requirements and design implementations for the various parts of a computer, focusing largely on the way by which the central processing unit performs internally an...
 code built into the kernel of the operating system.

Overview
The main functions of paging are performed when a program tries to access pages that are not currently mapped to physical memory (RAM
Ram

Ram, ram, or RAM as a non-acronymic wordAs a non-acronymic word Ram, ram, or RAM may refer to:...
).






Discussion
Ask a question about 'Paging'
Start a new discussion about 'Paging'
Answer questions from other users
Full Discussion Forum



Recent Posts









Encyclopedia


In computer
Computer

A computer is a machine that manipulates Data according to a list of Code .The first devices that resemble modern computers date to the mid-20th century , although the computer concept and various machines similar to computers existed earlier....
 operating system
Operating system

An operating system is an interface between hardware and applications; it is responsible for the management and coordination of activities and the sharing of the limited resources of the computer....
s that have their main memory divided into pages
Page (computing)

In a context of computer virtual memory, a page, memory page, or virtual page is a fixed-length block of main memory, that is contiguous in both physical memory addressing and virtual memory addressing....
, paging (sometimes called swapping) is a transfer of pages between main memory and an auxiliary store, such as hard disk drive. Paging is an important part of virtual memory
Virtual memory

Virtual memory is a computer system technique which gives an application program the impression that it has contiguous working memory , while in fact it may be physically fragmented and may even overflow on to disk storage....
 implementation in most contemporary general-purpose operating systems, allowing them to use disk storage for data that does not fit into physical RAM. Paging is usually implemented as architecture-specific
Computer architecture

Computer architecture in computer engineering is the conceptual design and fundamental operational structure of a computer system. It is a blueprint and functional description of requirements and design implementations for the various parts of a computer, focusing largely on the way by which the central processing unit performs internally an...
 code built into the kernel of the operating system.

Overview


The main functions of paging are performed when a program tries to access pages that are not currently mapped to physical memory (RAM
Ram

Ram, ram, or RAM as a non-acronymic wordAs a non-acronymic word Ram, ram, or RAM may refer to:...
). This situation is known as a page fault
Page fault

In computer storage technology, a page is a fixed-length block of memory that is used as a unit of transfer between physical memory and external storage like a hard disk, and a page fault is an interrupt to the software raised by the hardware, when a program accesses a page that is mapped in address space, but not loaded in physical memory....
. The operating system must then take control and handle the page fault, in a manner invisible to the program. Therefore, the operating system must:
  1. Determine the location of the data in auxiliary storage.
  2. Obtain an empty page frame in RAM to use as a container for the data.
  3. Load the requested data into the available page frame.
  4. Update the Page Table to show the new data.
  5. Return control to the program, transparently retrying the instruction
    Instruction (computer science)

    In computer science, an instruction is a single operation of a central processing unit defined by an instruction set architecture. In a broader sense, an "instruction" may be any representation of an element of an executable program, such as a bytecode....
     that caused the page fault.


The need to reference memory at a particular address arises from two main sources:
  • Processor
    Central processing unit

    A central processing unit is an electronic circuit that can execute computer programs. This broad definition can easily be applied to many early computers that existed long before the term "CPU" ever came into widespread usage....
     trying to load and execute a program's instructions itself.
  • Data being accessed by a program's instruction.


In step 2, when a page has to be loaded and all existing pages in RAM
Ram

Ram, ram, or RAM as a non-acronymic wordAs a non-acronymic word Ram, ram, or RAM may refer to:...
 are currently in use, one of the existing pages must be swapped with the requested new page. The paging system must determine the page to swap by choosing one that is least likely to be needed within a short time. There are various page replacement algorithm
Page replacement algorithm

In a computer operating system that utilizes paging for virtual memory memory management, page replacement algorithms decide which memory pages to page out when a page of memory needs to be allocated....
s that try to answer such issue.

Most operating systems use some approximation of the least recently used (LRU) page replacement algorithm (the LRU itself cannot be implemented on the current hardware) or working set
Working set

Peter_J._Denning defines ?the working set of information of a process at time to be the collection of information referenced by the process during the process time interval ?....
 based algorithm.

If a page chosen to be swapped has been modified since loading (if the page is dirty), it has to be written to auxiliary storage, otherwise it is simply discarded.

In addition to swapping in pages because they are necessary, in reaction to a page fault, there are several strategies for guessing what pages might be needed, and speculatively pre-loading them.

Demand paging


Demand paging refuses to guess. With demand paging, no pages are brought into RAM until necessary. In particular, with demand paging, a program usually begins execution with none of its pages pre-loaded in RAM. Pages are copied from the executable file into RAM the first time the executing code references them, usually in response to a page fault
Page fault

In computer storage technology, a page is a fixed-length block of memory that is used as a unit of transfer between physical memory and external storage like a hard disk, and a page fault is an interrupt to the software raised by the hardware, when a program accesses a page that is mapped in address space, but not loaded in physical memory....
. During a particular run of a program, pages of the executable file that implement functionality not used on that particular run are never loaded.

Loader paging

Loader paging guesses that the entire program will be used. Many operating systems (including those with a relocating loader
Loader (computing)

In computing, a loader is the part of an operating system that is responsible for loading programs from executables into memory, preparing them for execution and then executing them....
) load every page of a program into RAM before beginning to execute the program.

Anticipatory paging

This technique preloads a process's non-resident pages that are likely to be referenced in the near future (taking advantage of locality of reference
Locality of reference

In computer science, locality of reference, also known as the principle of locality, is the phenomenon of the same value or related computer storage locations being frequently accessed....
). Such strategies attempt to reduce the number of page faults a process experiences.

Swap prefetch


A few operating systems use anticipatory paging, also called swap prefetch. These operating systems periodically attempt to guess which pages will soon be needed, and start loading them into RAM. There are various heuristics in use, such as "if a program references one virtual address which causes a page fault, perhaps the next few pages' worth of virtual address space will soon be used" and "if one big program just finished execution, leaving lots of free RAM, perhaps the user will return to using some of the programs that were recently paged out".

Pre-cleaning


Unix operating systems periodically use sync
Sync (Unix)

sync is a standard system call in the Unix operating system, which commits to disk all data in the kernel filesystem buffer , i.e. data which has been scheduled for writing via low-level I/O system calls....
 to pre-clean all dirty pages, that is, to save all modified pages to hard disk. This makes starting a large new program run much faster, because it can be loaded into page frames that held clean pages that were dropped, rather than being loaded into page frames that were dirty and needed to be written back to disk before they were dropped.

Thrashing

Most programs reach a steady state in their demand for memory locality
Locality of reference

In computer science, locality of reference, also known as the principle of locality, is the phenomenon of the same value or related computer storage locations being frequently accessed....
 both in terms of instructions fetched and data being accessed. This steady state is usually much less than the total memory required by the program. This steady state is sometimes referred to as the working set
Working set

Peter_J._Denning defines ?the working set of information of a process at time to be the collection of information referenced by the process during the process time interval ?....
: the set of memory pages that are most frequently accessed.

Virtual memory systems work most efficiently when the ratio of the working set to the total number of pages that can be stored in RAM is low enough to minimize the number of page fault
Page fault

In computer storage technology, a page is a fixed-length block of memory that is used as a unit of transfer between physical memory and external storage like a hard disk, and a page fault is an interrupt to the software raised by the hardware, when a program accesses a page that is mapped in address space, but not loaded in physical memory....
s. A program that works with huge data structures will sometimes require a working set that is too large to be efficiently managed by the page system resulting in constant page faults that drastically slow down the system. This condition is referred to as thrashing
Thrash (computer science)

In computer science, thrash , is the term used to describe a degenerate situation on a computer where increasing resources are used to do a decreasing amount of work....
: pages are swapped out and then accessed causing frequent faults.

An interesting characteristic of thrashing is that as the working set grows, there is very little increase in the number of faults until the critical point (when faults go up dramatically and majority of system's processing power is spent on handling them).

An extreme example of this sort of situation occurred on the IBM System/360 Model 67
IBM System/360 Model 67

The IBM System/360 Model 67 was an important IBM mainframe model in the late 1960s. It first shipped in July 1966. Unlike the rest of the S/360 series, it included features to facilitate time-sharing applications, notably virtual memory hardware and 32-bit addressing....
 and IBM System/370 series mainframe computers, in which a particular instruction could consist of an execute instruction, which crosses a page boundary, that the instruction points to a move instruction, that itself also crosses a page boundary, targeting a move of data from a source that crosses a page boundary, to a target of data that also crosses a page boundary. The total amount of pages thus being used by this particular instruction is eight, and all eight pages must be present in memory at the same time. If the operating system will allocate less than eight pages of actual memory in this example, when it attempts to swap out some part of the instruction or data to bring in the remainder, the instruction will again page fault, and it will thrash on every attempt to restart the failing instruction.

To decrease excessive paging, and thus possibly resolve thrashing problem, a user can do any of the following:
  • Increase the amount of RAM in the computer (generally the best long-term solution).
  • Decrease the number of programs being concurrently run on the computer.


The term thrashing is also used in contexts other than virtual memory systems, for example to describe cache
Cache

In computer science, a cache is a collection of data duplicating original values stored elsewhere or computed earlier, where the original data is expensive to fetch or to compute, compared to the cost of reading the cache....
 issues in computing or silly window syndrome
Silly window syndrome

Silly window syndrome is a problem in computer networking caused by poorly-implemented Transmission Control Protocol flow control. If a Server with this problem is unable to process all incoming data, it requests that its Client s reduce the amount of data they send at a time ....
 in networking.

Terminology

Historically, paging sometimes referred to a memory allocation scheme that used fixed-length pages as opposed to variable-length segments
Segmentation (memory)

In computing, memory segmentation is one of the most common ways to achieve memory protection; another common one is paging. In a computer system using segmentation, an instruction operand that refers to a memory location includes a value that identifies a segment and an offset within that segment....
, without implicit suggestion that virtual memory technique were employed at all or that those pages were transferred to disk. Such usage is rare today.

Some modern systems use the term swapping along with paging. Historically, swapping referred to moving from/to secondary storage a whole program at a time, in a scheme known as roll-in/roll-out.

In the 1960s, after the concept of virtual memory was introduced—in two variants, either using segments or pages—the term swapping was applied to moving, respectively, either segments or pages, between disk and memory. Today with the virtual memory mostly based on pages, not segments, swapping became a fairly close synonym of paging, although with one difference.

In many popular systems, there is a concept known as page cache
Page cache

In computing, page cache, sometimes ambiguously called disk cache, is a "transparent" buffer of disk-backed pages kept in main memory by the operating system for quicker access....
, of using the same single mechanism for both virtual memory and disk caching
Cache

In computer science, a cache is a collection of data duplicating original values stored elsewhere or computed earlier, where the original data is expensive to fetch or to compute, compared to the cost of reading the cache....
. A page may be then transferred to or from any ordinary disk file, not necessarily a dedicated space. In some of such systems, notably Unix-like
Unix-like

A Unix-like operating system is one that behaves in a manner similar to a Unix system, while not necessarily conforming to or being certified to any version of the Single UNIX Specification....
 including Linux
Linux

Linux is a generic term referring to Unix-like computer operating systems based on the Linux kernel. Their development is one of the most prominent examples of free and open source software collaboration; typically all the underlying source code can be used, freely modified, and redistributed by anyone under the terms of the GNU GPL license...
, swapping only refers to virtual memory scope and paging to both. Page in is transferring a page from the disk to RAM. Page out is transferring a page from RAM to the disk. But swap in and out only refer to transferring pages between RAM and dedicated swap space or swap file, and not any other place on disk.

On the other hand, Microsoft
Microsoft

Microsoft Corporation is a multinational corporation computer technology corporation that develops, manufactures, licenses, and supports a wide range of computer software products for computing devices....
 systems from Windows NT
Windows NT

Windows NT is a family of operating systems produced by Microsoft, the first version of which was released in July 1993. It was originally designed to be a powerful high-level-language-based, processor-independent, multiprocessing, multiuser operating system with features comparable to Unix....
 line very rarely use the term swapping to differentiate from general paging, and call the dedicated secondary store just a page file.

Implementations


Windows 3.x and Windows 9x

Virtual memory has been a feature of Microsoft Windows
Microsoft Windows

Microsoft Windows is a series of software operating systems and graphical user interfaces produced by Microsoft. Microsoft first introduced an operating environment named Windows in November 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces ....
 since Windows 3.0
Windows 3.0

Windows 3.0 is the third major release of Microsoft Microsoft Windows, and was released on 22 May 1990. It became the first widely successful version of Windows and a powerful rival to Macintosh and the Commodore Amiga on the GUI front....
 in 1990. Microsoft introduced virtual memory in response to the failures of Windows 1.0
Windows 1.0

Windows 1.0 is a 16-bit graphical operating environment that was released on 20 November 1985. It was Microsoft's first attempt to implement a Computer multitasking graphical user interface-based operating environment on the personal computer platform....
 and Windows 2.0
Windows 2.0

Windows 2.0 was a 16-bit Microsoft Windows graphical user interface-based operating environment that superseded Windows 1.0. Windows 2.0 was supplemented by Windows 2.1x and Windows 2.1x in 1988....
, attempting to slash resource requirements for the operating system.

Confusion abounds about Microsoft's decision to refer to the swap file as "virtual memory". Novices unfamiliar with the concept accept this definition without question, and speak of adjusting Windows' virtual memory size. In fact every process has a fixed, unchangeable virtual memory size, usually 2 GB
GB

GB may stand for:...
. The user has only an option to change disk capacity dedicated to paging.

Windows 3.x creates a hidden file named 386SPART.PAR or WIN386.SWP for use as a swap file. It is generally found in the root directory
Root directory

In computing file systems, the root directory is the first or top-most directory in a hierarchy. It can be likened to the root of a tree - the starting point where all branches originate....
, but it may appear elsewhere (typically in the WINDOWS directory). Its size depends on how much swap space the system has (a setting selected by the user under Control Panel ? Enhanced under "Virtual Memory".) If the user moves or deletes this file, a blue screen
Blue Screen of Death

The Blue Screen of Death is a humorous term used for the error screen displayed by some operating systems, most notably Microsoft Windows, after encountering a critical system error which can cause the system to shut down to prevent damage....
 will appear the next time Windows is started, with the error message
Error message

An error message is a message displayed when an unexpected condition occurs, usually on a computer or other device. Error messages are often displayed using dialog boxes....
 "The permanent swap file is corrupt". The user will be prompted to choose whether or not to delete the file (whether or not it exists).

Windows 95
Windows 95

Windows 95 is a consumer-oriented graphical user interface-based operating system. It was released on August 24, 1995 by Microsoft, and was a significant progression from the company's previous Microsoft Windows products....
, Windows 98
Windows 98

Windows 98 is a graphical operating system released on 25 June 1998 by Microsoft and the successor to Windows 95. Like its predecessor, it is a hybrid 16-bit application/32-bit application monolithic product based on MS-DOS....
 and Windows Me
Windows Me

Windows Millennium Edition, or Windows Me , is a hybrid 16-bit/32-bit graphical operating system released on 14 September 2000 by Microsoft....
 use a similar file, and the settings for it are located under Control Panel ? System ? Performance tab ? Virtual Memory. Windows automatically sets the size of the page file to start at 1.5× the size of physical memory, and expand up to 3× physical memory if necessary. If a user runs memory-intensive applications on a system with low physical memory, it is preferable to manually set these sizes to a value higher than default.

Windows NT

In NT-based versions of Windows (such as Windows XP
Windows XP

Windows XP is a line of operating systems produced by Microsoft for use on personal computers, including home and business desktops, laptop, and media centers....
 and Windows Vista
Windows Vista

Windows Vista is one member in a family of operating systems developed by Microsoft for use on personal computers, including home and business Desktop computer, laptops, Tablet PCs, and media center PCs....
), the file used for paging is named pagefile.sys. The default location of the page file is in the root directory of the partition where Windows is installed. Windows can be configured to use free space on any available drives for pagefiles. It is required, however, for the boot partition (i.e. the drive containing the Windows directory) to have a pagefile on it if the system is configured to write either kernel or full memory dumps after a crash
Blue Screen of Death

The Blue Screen of Death is a humorous term used for the error screen displayed by some operating systems, most notably Microsoft Windows, after encountering a critical system error which can cause the system to shut down to prevent damage....
. Windows uses the paging file as temporary storage for the memory dump. When the system is rebooted, Windows copies the memory dump from the pagefile to a separate file and frees the space that was used in the pagefile.

Fragmentation
In Windows's default configuration the pagefile is allowed to expand beyond its initial allocation when necessary. If this happens gradually, it can become heavily fragmented
File system fragmentation

In computing, file system fragmentation, sometimes called file system aging, is the inability of a file system to lay out related data sequentially , an inherent phenomenon in computer storage-backed file systems that allow in-place modification of their contents....
 which can potentially cause performance problems. The common advice given to avoid this is to set a single "locked" pagefile size so that Windows will not expand it. However, the pagefile only expands when it has been filled, which, in its default configuration, is 150% the total amount of physical memory. Thus the total demand for pagefile-backed virtual memory must exceed 250% of the computer's physical memory before the pagefile will expand.

The fragmentation of the pagefile that occurs when it expands is temporary. As soon as the expanded regions are no longer in use (at the next reboot, if not sooner) the additional disk space allocations are freed and the pagefile is back to its original state.

Locking a page file's size can be problematic in the case that a Windows application requests more memory than the total size of physical memory and the pagefile. In this case, requests to allocate memory fail, which may cause applications and system processes to fail. Supporters of this view will note that the pagefile is rarely read or written in sequential order, so the performance advantage of having a completely sequential pagefile is minimal. However, it is generally agreed that a large pagefile will allow use of memory-heavy applications, and there is no penalty except that more disk space is used.

Defragmenting the page file is also occasionally recommended to improve performance when a Windows system is chronically using much more memory than its total physical memory. This view ignores the fact that, aside from the temporary results of expansion, the pagefile does not become fragmented over time. In general, performance concerns related to pagefile access are much more effectively dealt with by adding more physical memory.

Linux

Linux
Linux

Linux is a generic term referring to Unix-like computer operating systems based on the Linux kernel. Their development is one of the most prominent examples of free and open source software collaboration; typically all the underlying source code can be used, freely modified, and redistributed by anyone under the terms of the GNU GPL license...
 and other Unix-like
Unix-like

A Unix-like operating system is one that behaves in a manner similar to a Unix system, while not necessarily conforming to or being certified to any version of the Single UNIX Specification....
 operating systems use the term "swap" to describe both the act of moving memory pages between RAM and disk, and the region of a disk the pages are stored on. It is common to use a whole partition of a hard disk for swapping. However, with the 2.6 Linux kernel, swap files are just as fast as swap partitions, although Red Hat
Red Hat

In computing, Red Hat, Inc. is a company in the free and open source software sector, and a major Linux distribution vendor. Founded in 1995, Red Hat has its corporate headquarters in Raleigh, North Carolina with satellite offices worldwide....
 recommends using a swap partition. The administrative flexibility of swap files outweighs that of partitions; since modern high capacity hard drives can remap physical sectors, no partition is guaranteed to be contiguous.

Linux supports using a virtually unlimited number of swapping devices, each of which can be assigned a priority. When the operating system needs to swap pages out of physical memory, it uses the highest-priority device with free space. If multiple devices are assigned the same priority, they are used in a fashion similar to level 0 RAID arrangements. This provides improved performance as long as the devices can be accessed efficiently in parallel. Therefore, care should be taken assigning the priorities. For example, swaps located on the same physical disk should not be used in parallel, but in order ranging from the fastest to the slowest (i.e.: the fastest having the highest priority).

Recently, some experimental improvement to the 2.6 Linux kernel
Linux kernel

The Linux kernel is an operating system kernel used by a family of Unix-like operating systems. The term Linux distribution is used to refer to the various operating systems that run on top of the Linux Kernel....
 have been made by Con Kolivas
Con Kolivas

Con Kolivas is an Australian anaesthesiologist who is known on the Internet for his computer programming work on the Linux kernel in his spare time....
, published in his popular -ck patchset. The improvement, called "swap prefetch", employs a mechanism of prefetching previously swapped pages back to physical memory even before they are actually needed, as long as the system is relatively idle (so as not to impair performance) and there is available physical memory to use. This applies to a situation when a "heavy" application has been temporarily used, causing other processes to swap out. After it is closed, both freeing large areas of memory and reducing disk load, prefetch of other processes starts, reducing their initial user response time.

Mac OS X

Mac OS X
Mac OS X

Mac OS X is a line of computer operating systems developed, marketed, and sold by Apple Inc., and since 2002 has been included with all new Macintosh computer systems....
, like Linux, supports both swap partitions and the use of swap files, but the default and recommended configuration is to use multiple swap files.

Solaris

Solaris allows swapping to raw disk slices as well as files. The traditional method is to use slice 1 (ie. the second slice) on the OS disk to house swap. Swap setup is managed by the system boot process if there are entries in the "vfstab" file, but can also be managed manually through the use of the "swap" command. While it is possible to remove, at runtime, all swap from a lightly loaded system, Sun does not recommend it. Recent additions to the ZFS
ZFS

In computing, ZFS is a file system designed by Sun Microsystems for the Solaris Operating System. The features of ZFS include support for high storage capacities, integration of the concepts of filesystem and volume , Snapshot and copy-on-write clones, continuous integrity checking and automatic repair, RAID-Z and native NFSv4 ACLs....
 file system allow creation of ZFS Devices that can be used as swap partitions. Swapping to normal files on ZFS file systems is not supported.

AmigaOS 4

AmigaOS 4.0 "first update" revision introduced a new system for allocating RAM and defragmenting it on the fly, during system inactivities. It is based on slab allocation method
Slab allocation

Slab allocation is a memory management mechanism intended for more efficient memory allocation and to eliminate memory Fragmentation to a large extent....
 and paging memory that allows swapping.

AmigaOS 4.1 then introduced creation of Swap partition that enters in action when, even after a RAM defragmentation, the system still demands more memory. Swap memory could be activated and disactivated any moment allowing the user to choose to use only physical RAM.

Performance

The backing store for a virtual memory operating system is typically many orders of magnitude
Magnitude (mathematics)

The magnitude of a mathematical object is its size: a property by which it can be larger or smaller than other objects of the same kind; in technical terms, an ordering of the class of objects to which it belongs....
 slower than RAM. Therefore it is desirable to reduce or eliminate swapping, where practical. Some operating systems offer settings to influence the kernel's decisions.

  1. Linux offers the /proc/sys/vm/swappiness parameter, which changes the balance between swapping out runtime memory, as opposed to dropping pages from the system page cache
    Page cache

    In computing, page cache, sometimes ambiguously called disk cache, is a "transparent" buffer of disk-backed pages kept in main memory by the operating system for quicker access....
    .
  2. Windows 2000, XP, and Vista offer the DisablePagingExecutive registry setting, which controls whether kernel-mode code and data can be eligible for paging out.
  3. Mainframe computers frequently used head-per-track disk drives or drums for swap storage to eliminate the latency implicit in seeking a moveable head.
  4. Flash memory devices have an inherent life limitation which makes them inappropriate for general-purpose swapspace. However schemes such as ReadyBoost
    ReadyBoost

    ReadyBoost is a component of Microsoft's Windows Vista operating system. It works by using flash memory, USB flash drive, Secure Digital card, CompactFlash or any kind of portable flash mass storage system as a drive for disk cache....
     may be used to preload binaries or other read-only data into the virtual memory space.


Many Unix-like
Unix-like

A Unix-like operating system is one that behaves in a manner similar to a Unix system, while not necessarily conforming to or being certified to any version of the Single UNIX Specification....
 operating systems (for example AIX
AIX

AIX AIX is a three-letter abbreviation with multiple meanings, as described below:*Air India Express, the budget arm of Air India*Athens Internet Exchange, a European Internet exchange point...
, Linux
Linux

Linux is a generic term referring to Unix-like computer operating systems based on the Linux kernel. Their development is one of the most prominent examples of free and open source software collaboration; typically all the underlying source code can be used, freely modified, and redistributed by anyone under the terms of the GNU GPL license...
 and Solaris) allow using multiple storage devices for swap space in parallel, to increase performance.

Tuning swap space size

In some older virtual memory operating systems, space in swap backing store is reserved when programs allocate memory for runtime data. OS vendors typically issue guidelines about how much swap space should be allocated. Between 1.5 or 2 times the installed RAM is a typical number . With a large amount of RAM, the disk space needed for the backing store can be very large. Newer versions of these operating systems attempt to solve this problem: for example, some HP-UX
HP-UX

HP-UX 11i is Hewlett-Packard's proprietary software implementation of the Unix operating system, based on UNIX System V . It runs on the HP 9000 PA-RISC-based range of central processing unit and HP Integrity Intel's Itanium-based systems, and was also available for later Apollo/Domain systems....
 kernels offer a tunable swapmem_on that controls whether RAM can be used for memory reservations. In systems with sufficient RAM, this significantly reduces the needed space allocation for the backing store.

See also


  • Physical memory, a subject of paging
  • Virtual memory
    Virtual memory

    Virtual memory is a computer system technique which gives an application program the impression that it has contiguous working memory , while in fact it may be physically fragmented and may even overflow on to disk storage....
    , an abstraction that paging may create
  • Demand paging
    Demand paging

    In computer operating systems, demand paging is an application of virtual memory. In a system that uses demand paging, the operating system copies a disk paging into physical memory only if an attempt is made to access it ....
    , a "lazy" paging scheme
  • Page cache
    Page cache

    In computing, page cache, sometimes ambiguously called disk cache, is a "transparent" buffer of disk-backed pages kept in main memory by the operating system for quicker access....
    , a disk cache that utilizes virtual memory mechanism
  • Page replacement algorithm
    Page replacement algorithm

    In a computer operating system that utilizes paging for virtual memory memory management, page replacement algorithms decide which memory pages to page out when a page of memory needs to be allocated....
  • Segmentation (memory)
    Segmentation (memory)

    In computing, memory segmentation is one of the most common ways to achieve memory protection; another common one is paging. In a computer system using segmentation, an instruction operand that refers to a memory location includes a value that identifies a segment and an offset within that segment....
  • Page size
  • Page table
    Page table

    A page table is the data structure used by a virtual memory system in a computer operating system to store the mapping between virtual addresses and physical addresses....
  • Memory allocation


External links

  • from HowStuffWorks.com (in fact explains only swapping concept, and not virtual memory concept)
  • (outdated, as the author admits)
  • (outdated, and contradicts section 1.4 of this wiki page, and (at least) references 8, 9, and 11.)
  • driver that can be used to save the paging file of Windows on a swap partition of Linux.