GATE | GATE-CS-2005 | Question 21

What is the swap space in the disk used for?
(A) Saving temporary html pages
(B) Saving process data
(C) Storing the super-block
(D) Storing device drivers


Answer: (B)

Explanation:
Swap space in Linux is used to increase the amount of apparent memory available on the system or when the amount of physical memory (RAM) is full. If the system needs more memory resources and the RAM is full, inactive pages in memory are moved to the swap space. While swap space can help machines with a small amount of RAM, it should not be considered a replacement for more RAM. Swap space is located on hard drives, which have a slower access time than physical memory. At any rate, Linux supports swap space in two forms: as a separate disk partition or a file somewhere on your existing Linux file systems. If the system is thrashing because of lack of physical RAM and swap. Swap files are a good way to add swap on demand.

See question 2 of https://www.geeksforgeeks.org/operating-systems-set-16/

Reference:
https://www.centos.org/docs/5/html/5.1/Deployment_Guide/s1-swap-what-is.html



This solution is contributed by Nitika Bansal

Quiz of this Question



My Personal Notes arrow_drop_up


Article Tags :

Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.