(1) To replace pages or segments of data in memory. Swapping is a useful technique that enables a computer to executeprograms and manipulate data files larger than main memory. The operating systemcopies as much data as possible into main memory, and leaves the rest on the disk. When the operating system needs data from the disk, it exchanges a portion of data (called a page or segment ) in main memory with a portion of data on the disk.
DOS does not perform swapping, but most other operating systems, including OS/2, Windows, and UNIX, do.