What is the swap space in the disk used for?

2005

What is the swap space in the disk used for?

  1. A.

    Saving temporary html pages

  2. B.

    Saving process data

  3. C.

    Storing the super-block

  4. D.

    Storing device drivers

Attempted by 108 students.

Show answer & explanation

Correct answer: B

Answer: Saving process data

Explanation: Swap space is disk space used by the operating system to hold parts of a process's memory (pages) that are moved out of physical RAM. This allows the system to free RAM for active processes and provides virtual memory.

  • When it is used: when the system runs low on physical memory or during hibernation (the system may write RAM contents to disk).

  • Performance note: Accessing data from swap is much slower than from RAM, so heavy swapping degrades system performance.

  • Why the other choices are incorrect:

  • Saving temporary HTML pages is handled by browser cache or temporary directories, not by swap.

  • Storing the super-block is incorrect because the super-block is filesystem metadata stored within the filesystem structures on disk, not in swap.

  • Storing device drivers is incorrect because drivers are part of the OS (kernel or modules) and are kept on disk and loaded into memory as needed; they are not placed in swap.

Explore the full course: Gate Guidance By Sanchit Sir