ABOUT ME

-

Today
-
Yesterday
-
Total
-
  • What is Swap Memory in Linux?
    서버 2021. 6. 3. 11:37
    반응형

    For every operating system, there is a dedicated amount of RAM available that makes the processing of a program possible. However, the amount of this RAM is limited which is why RAM cannot hold a bulk of data in it. Therefore, there should be a backup option available which can support RAM whenever it runs out of memory.

    This concept holds for the Windows operating system as well as for Linux. In Windows OS, whenever RAM has an insufficient amount of memory to hold a process, it borrows some amount of memory from the secondary storage. This borrowed memory is known as Virtual Memory. Similarly, whenever RAM runs out of memory in Linux, it borrows some memory from the secondary storage to store its inactive content.

    In this way, the RAM finds sufficient space to hold a new process within it. Here, the borrowed space from the hard disk is called Swap Memory. In this article, we will try to learn the concept of swap memory in detail.

    Working of Swap Memory:

    As explained above, swap memory is the dedicated amount of hard drive that is used whenever RAM runs out of memory. There is a memory management program in Linux that takes care of this process. Whenever RAM is short of memory, the memory management program looks for all those inactive blocks of data present in RAM that have not been used for a long time.

    When it successfully finds those blocks, it shifts them into the swap memory. In this way, the space of RAM is freed up and hence it can be utilized for some other programs that need processing on an urgent basis. The concept of swapping is very much similar to the concept of paging used in the Windows operating system.

     

    https://linuxhint.com/swap_memory_linux/

    반응형
Designed by Tistory.