What is the difference between contiguous and noncontiguous memory allocation
The contiguous memory allocation fastens the execution of a process by reducing the overheads of address translation. The Non-contiguous memory allocation allows a process to acquire the several memory blocks at the different location in the memory according to its requirement.
The noncontiguous memory allocation also reduces the memory wastage caused due to internal and external fragmentation. As it utilizes the memory holes, created during internal and external fragmentation. In non-contiguous memory allocation, the process is divided into blocks pages or segments which are placed into the different area of memory space according to the availability of the memory.
The noncontiguous memory allocation has an advantage of reducing memory wastage but, but it increases the overheads of address translation.
As the parts of the process are placed in a different location in memory, it slows the execution of the memory because time is consumed in address translation.
Here, the operating system needs to maintain the table for each process which contains the base address of the each block which is acquired by the process in memory space. Contiguous memory allocation does not create any overheads and fastens the execution speed of the process but increases memory wastage.
In turn noncontiguous memory allocation creates overheads of address translation, reduces execution speed of a process but, increases memory utilization. So there are pros and cons of both allocation methods. Your email address will not be published. Key Differences Between Contiguous and Noncontiguous Memory Allocation The basic difference between contiguous and noncontiguous memory allocation is that contiguous allocation allocates one single contiguous block of memory to the process whereas, the noncontiguous allocation divides the process into several blocks and place them in the different address space of the memory i.
In contiguous memory allocation, the process is stored in contiguous memory space; so there is no overhead of address translation during execution. But in noncontiguous memory allocation, there is an overhead of address translation while the process execution, as the process blocks are spread in the memory space.
Process stored in contiguous memory executes faster in comparison to process stored in noncontiguous memory space. The solution for contiguous memory allocation is to divide the memory space into the fixed-sized partition and allocate a partition to a single process only.
Advanced Data Structure. Operating System. Computer Network. Computer Architecture. Android Development. Game Development. GO Language. Spring Framework. Go to Tutorials Library. Interactive Courses, where you Learn by doing. Available for FREE! Tutorials Library. MCQ Tests. In contiguous allocation, it might sometimes be difficult to find a memory block large enough to fit a process.
However, in noncontiguous memory allocation, it is easier to find memory blocks at various locations as it does not require consecutive memory blocks. In contiguous memory allocation, a single contiguous section of the memory block is assigned to a process. Therefore, a single process exists in one block of the contiguous memory block. To achieve contiguous memory allocation, the memory can be divided into fixed size partitions. Each partition gets a single process.
In internal fragmentation , if a memory allocated for a process is larger than required, then the remaining portion is unused. It cannot be used for some other process. Contiguous memory allocation can cause this internal fragmentation. Contiguous memory allocation can speed up the execution of the process because it minimizes the overheads of address translation.
However, it may be difficult to find a contiguous block of memory that is large enough to fit a process. In non-contiguous memory allocation, the process is allocated to several memory blocks at different memory locations in the memory. In internal fragmentation, the memory block assigned to a process is large, so the remaining portions cannot be used for some other process; thus, it remains unused.
0コメント