What is swap space on a disk used for?
2005
What is swap space on a disk used for?
Answer: B. Storing process data — ConceptVirtual memory allows an operating system to use secondary storage as a backing store for memory pages that are not currently kept in physical RAM.…
- A.
Storing temporary HTML pages
- B.
Storing process data
- C.
Storing the filesystem superblock
- D.
Storing device drivers
Attempted by 202 students.
Show answer & explanation
Correct answer: B
Concept
Virtual memory allows an operating system to use secondary storage as a backing store for memory pages that are not currently kept in physical RAM. Swap space is the disk area reserved for those displaced pages; it extends memory backing but is much slower than RAM.
Application
Here, “process data” means memory pages belonging to processes. When memory pressure rises, the operating system may write selected pages from RAM to swap and later read them back. Therefore, the matching value is “Storing process data.”
Contrast
Temporary HTML pages are browser-cache or temporary-directory files, not virtual-memory pages.
A filesystem superblock records filesystem metadata rather than process-memory pages.
Device drivers are kernel components or modules loaded to control hardware rather than a purpose for reserving swap space.
Cross-check
Moving process pages to disk can release physical frames for active work, which is exactly the role of swap. Storing web cache, filesystem metadata, or driver files would not perform that paging function.
Result: swap space is used for storing process data pages that are moved out of RAM.