KEMBAR78
Contiguous Memory Allocation | PDF | Software | Operating System Technology
0% found this document useful (0 votes)
35 views8 pages

Contiguous Memory Allocation

The document discusses memory management strategies, focusing on Contiguous Memory Allocation, which allocates a single continuous block of memory for each process. It outlines two types of contiguous allocation: Static Partitioning, which is simple but can waste space, and Dynamic Partitioning, which is flexible but can lead to external fragmentation. Additionally, it compares Contiguous Allocation with Non-Contiguous Allocation, highlighting their respective advantages and disadvantages.

Uploaded by

Ytber Upr
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views8 pages

Contiguous Memory Allocation

The document discusses memory management strategies, focusing on Contiguous Memory Allocation, which allocates a single continuous block of memory for each process. It outlines two types of contiguous allocation: Static Partitioning, which is simple but can waste space, and Dynamic Partitioning, which is flexible but can lead to external fragmentation. Additionally, it compares Contiguous Allocation with Non-Contiguous Allocation, highlighting their respective advantages and disadvantages.

Uploaded by

Ytber Upr
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Contiguous Unit-3

Memory
By
Allocation UMESH PRASAD ROUT
Memory Management Strategies
Memory allocation strategies can be classified into the
following two categories:
1. Contiguous Memory Allocation

2. Non-Contiguous Memory Allocation

2
Memory Management Strategies

3
Contiguous Allocation
Contiguous Memory Allocation is a memory management technique where each
process is allocated a single, continuous block of memory (RAM) for execution.
The entire process (code, data, stack) must fit into this contiguous space.

Types of Contiguous Allocation

1. Static Partitioning (Fixed Allocation)


2. Dynamic Partitioning (Variable Allocation)

4
Static Partitioning
● Memory is divided into fixed-size partitions at boot time.
● The number of partitions and size of partitions are fixed.
Advantages:
○ Simple to implement.
○ No external fragmentation.
Disadvantages:
○ Internal fragmentation- Free space within partition is wasted.
○ Limits process size to partition size.

5
Dynamic Partitioning
● Memory is allocated as per process size requirements.
● The number of partitions and size of partitions are not fixed.
Advantages:
○ No internal fragmentation.
○ Flexible memory use.
Disadvantages:
○ External fragmentation- Free memory gaps between processes are
wasted as non-contiguous chunks cannot be used for new processes.

6
Memory Allocation Strategies
1. First Fit

● Allocates the first available block large enough for the process.
● Fast, but may leave small unusable gaps.

2. Best Fit

● Allocates the smallest suitable block to minimize wastage.


● Reduces fragmentation but is slower (requires full memory scan).

3. Worst Fit

● Allocates the largest available block (to leave large remaining blocks).
● Rarely used; often increases fragmentation.
7
Contiguous Vs Non-Contiguous Allocation
Contiguous Allocation Non-Contiguous Allocation
1 Process allocated a single continuous block of Process divided into multiple blocks scattered across
memory. memory.
2 Allocation Methods- First Fit, Best Fit, Worst Fit. Allocation Methods-Paging , Segmentation.
3 No special hardware required. Requires Memory Management Unit (MMU).
4 Ideal for small, fixed-size processes. Ideal for large, dynamic processes.
5 Used in early OS like DOS and embedded systems. Used in modern OSes like Linux and Windows.
6 Less flexible-a process needs a single large hole. Highly flexible-a process can utilize scattered small
holes.
7 Generally faster during execution because data is Can be slightly slower due to the overhead of address
sequential, leading to better cache locality. translation.
8 Poor memory utilization (external/internal Better memory utilization (minimizes fragmentation).
fragmentation).
9 Simpler to manage (e.g., using base and limit Complex to manage( using page tables , segment
registers). tables, and handling virtual memory concepts).
8

You might also like