Memory Management And Its Techniques

Memory management is the basic concept of  OS, which manages the main memory.  Allocation and de-allocation of the process take place between main memory and secondary memory. Memory management keeps the record of each process in the main memory.

In this lecture, We will cover the basic concepts of Memory Management. Our basic goal is to load more and more processes in the main memory, which is also called the degree of multi-programming. First, look at the concept of the degree of multi-programming.

What Is The Degree Of Multi-Programming?

The degree of multi-programming describes the maximum number of processes a single-processor system can efficiently accommodate.

In simple words, Load more and more programs from secondary memory to main memory so that the efficiency of the system is increased. This is multi-programming or degree of multi-programming.

Goal: Memory utilization maximum

The basic purpose of the degree of multi-programming is the Maximum utilization of the CPU.

How to Improve Degree Of Multi-Programming?

The answer is by increasing the size of RAM.

Explain with Example:

As we know, every process is executed by CPU and I/O.

If K is the amount of time in which Process/program is executed by I/O event/operation, then

CPU utilization Time = 1- K (1 is the unit time to complete the entire process)

If there are different numbers of processes in the RAM, then CPU utilization time is given in the table below. Suppose I/O utilization is 70% (K=70%) of each process then CPU utilization is

Processes CPU utilization Time
If only 1 process is in RAM, then CPU utilization will be 1-K1 = 1-(0.70)1 = 0.30 = 30%
If 2 processes in RAM, then CPU utilization will be 1-K2= 1-(0.70)2 = 76%
If 5 processes in RAM, then CPU utilization will be 1-K5= 1-(0.70)5 = 83%
If 10 processes in RAM then CPU utilization will be 1-K10= 1-(0.70)10= 96%

Note: No of process=10 means that there are 10 processes in main memory.

Conclusion: Increase the size of RAM so that more and more processes can accommodate in main memory, then utilization of CPU becomes maximum.

So, the higher the degree of multi-programming, the higher the CPU utilization will be.

Memory Management Technique

 

1. Contiguous

i. Fixed memory Partitions
ii. Variable memory Partitions

2. Non Contiguous

i. Paging
ii. Multilevel Paging
iii. Inverted paging
iv. Segmentation
v. Segmented Paging

In upcoming lectures, we will see one by one all non-contiguous