SIZ EDUCATION: MEMORY SWAPPING AND PAGING | 20% Post payout to @siz-official | by @vectorshore

in Steem Infinity Zone3 years ago

Hello everyone, today, I'll be writing on memory Swapping and Paging. In my previous post, I wrote on two types of memory programming: Monoprogramming and Multiprogramming and how they function. You can find these information here https://steemit.com/hive-181430/@vectorshore/siz-education-monoprogramming-multiprogramming-or-20-post-payout-to-siz-official-or-by-vectorshore

image.png
source

WHAT IS MEMORY SWAPPING


Memory Swapping is a memory management technique used by the Operating System to move or swap temporary processes from the main or primary memory (RAM) to the secondary memory (Hard Disk) in order to provide more memory to other running processes.

The organising of memory into fixed partitions is simple and effective in batch systems. The program is loaded into a partition in the memory until it has finished it's purpose, but with time-sharing systems, the situation is different. At times, the memory might not be enough to hold all the currently active processes, so processes must be kept on the disk and brought in to run dynamically.

Two general approaches can be used for memory management. These include;

  • Swapping: It is the technique which consists of putting processes in the main memory and then after running it for a while, puts them into the disk.

  • Virtual memory: This allows to run when they are only partially in main memory. The concept about this is that the combined size of both the program, data, and stack may be more than the actual amount of physical memory available for it.

The Operating System (OS) keeps the parts of the program currently in use in the main memory (RAM) and the rest on the disk. The Operating System then swaps pieces if the program between disk and main memory as needed.

WHAT IS PAGING


Memory Paging is another memory management technique used by the Operating System to read and write data from the secondary memory (Hard Disk) to the main or primary memory (RAM).

This is also a technique used by most virtual memory systems. One every computer, there is a set of memory addresses that programs produce, they are called virtual addresses and they form the virtual address space.

When virtual memory is used, the virtual addresses do not go directly to the main memory, but instead they go to the Memory Management Unit (MMU) which maps virtual addresses unto the physical memory addresses. In essence, the MMU sends physical addresses to the memory.

The virtual address space is divided into units called pages and these units in the physical memory are called page frames.

In my next post, I will be writing on Page Fault and Page Replacement Algorithms.

I hope you like my content. Thank you for stopping by and for your continuous support.

Cc:
@siz-official
@faran-nabeel
@suboohi

Sort:  
 3 years ago 

Good post dear friend keep it up bro and keep learn with our steem fellows and friends and newcomers.

Regards, Faran Nabeel

Thank you @faran-nabeel. I really appreciate your kind words and support.

Coin Marketplace

STEEM 0.16
TRX 0.15
JST 0.027
BTC 60063.85
ETH 2313.06
USDT 1.00
SBD 2.46