CREATE OWN LIBRARY

Contiguous Memory Allocation

 

What is contiguous memory allocation: 

The main memory must accommodate both the operating system and the various user processes. So, it is important to allocate the main memory inefficient way where the degree of multi-programming will be increased. 

 

The memory is usually divided into two partitions: one for the resident operating system and one for the user processes. 

 

We can place the operating system in either low memory or high memory. The major factor affecting this decision is the location of the interrupt vector. Since the interrupt vector is often in low memory, programmers usually place the operating system in low memory as well. Here we always consider that the operating system resides at low memory. 

 

We usually want several user processes to reside in memory at the same time. We, therefore, need to consider how to allocate available memory to the processes that are in the input queue waiting to be brought into main memory.

 

 

# The main concept of the contiguous memory allocation technique is that process is allocated a single contiguous area in memory. One process can be allocated at a particular contiguous space location in memory but not at a different location as part by part.

 

Still, the process needs a large enough area to accommodate the code, data, stack, and heap area of a process. So, sometimes it is not possible to allocate the process in the contiguous memory location, that’s why external fragmentation and  internal fragmentation have occurred. 

 

There are various memory allocation methods. Here explain one early method, contiguous memory allocation.

 

There are two types of contiguous memory allocation:

1)  Fixed partition

2)  Dynamic or variable partition