wisemonkeys logo
FeedNotificationProfileManage Forms
FeedNotificationSearchSign in
wisemonkeys logo

Blogs

Memory Partitioning

profile
Prachi Bharadwa FY IT
Aug 14, 2024
0 Likes
0 Discussions
475 Reads

Memory partitioning in an operating system (OS) is a technique used to manage memory allocation by dividing the system's physical memory into distinct regions, or partitions. Each partition can be allocated to processes or the operating system itself. Memory partitioning is crucial for optimizing memory utilization and ensuring that multiple processes can run efficiently without interfering with each other. There are several memory partitioning schemes, and each has its advantages and disadvantages. Here's a detailed explanation of the key concepts:


1. Fixed Partitioning Definition: In fixed partitioning, the memory is divided into a fixed number of partitions at system startup. The size and number of partitions are predefined.

• Advantages: 

Simple to implement. 

Low overhead for partition management.

• Disadvantages: 

Inefficient use of memory because a process may be allocated a partition larger than its actual needs (internal fragmentation).

The number of partitions limits the number of processes that can be loaded into memory simultaneously.


Types:

1. Equal-size partitions: All partitions are of the same size.

2. Unequal-size partitions: Partitions vary in size, allowing for more flexible allocation but still suffer from internal fragmentation.


2. Dynamic partitioning Definition: Unlike fixed partitioning, dynamic partitioning creates partitions dynamically at runtime based on the needs of processes. When a process is loaded into memory, a partition is created that exactly matches its size.

• Advantages: 

Better memory utilization as partitions match the process size, reducing internal fragmentation.

• Disadvantages: 

Leads to external fragmentation, where free memory is scattered in small blocks, making it difficult to find contiguous space for large processes.

Requires complex management algorithms to keep track of free and allocated spaces.


3. Simple paging: Main memory is divided into a number of equal-size frames. Each process is divided into a number of equal-size pages of the same length as frames. A process is loaded by loading all of its pages into available, not necessarily contiguous, frames.

• Advantages:

No external fragmentation.

• Disadvantages: 

A small amount of internal fragmentation.


4. Simple segmentation: Each process is divided into a number of segments. A process is loaded by loading all of its segments into dynamic partitions that need not be contiguous.

• Advantages: 

No internal fragmentation; improved memory utilization and reduced overhead compared to dynamic partitioning. 

• Disadvantages:

External fragmentation.


5. Buddy System: The buddy system is a memory allocation algorithm that divides memory into partitions to minimize fragmentation. It works by dividing memory into blocks that are powers of two and pairs them as "buddies."

• Advantages: 

Efficient for dynamic memory allocation and deallocation.

Minimizes external fragmentation by combining free blocks (buddies).

• Disadvantages: 

Can still suffer from internal fragmentation, as processes may be allocated slightly larger memory blocks than needed.

Complexity in merging and splitting blocks.


6. Virtual Memory Paging: As with simple paging, except that it is not necessary to load all of the pages of a process. Nonresident pages that are needed are brought later automatically. 

• Advantages: 

No external fragmentation; 

higher degree of multiprogramming; large virtual address space. 

• Disadvantages: 

Overhead of complex memory management.


7. Virtual Memory Segmentation: As with simple segmentation, except that it is not necessary to load all of the segments of a process. Nonresident segments that are needed are brought in later automatically. 

• Advantages: 

No internal fragmentation, higher degree of multiprogramming; large virtual address space; protection and sharing support. 

• Disadvantages: 

Overhead of complex memory management.


Comments ()


Sign in

Read Next

HR Automation : Need of the hour

Blog banner

A Weekend of Wildlife, Rivers, and Relaxation in Southwest Florida

Blog banner

Ganpati Special: Exotic 51 Modak flavours by Mahavir Dryfruits

Blog banner

Preparing Students for Higher Education: How International Schools Shape Future Success

Blog banner

1 Dentist in Maroubra, Sydney and her 10 obsessions

Blog banner

Why Peace River Is Florida’s Most Underrated Outdoor Adventure Destination?

Blog banner

DIGITAL TECHNOLOGY

Blog banner

What is Spyware? and examples of them.

Blog banner

Music helps reduce stress

Blog banner

Computer Security

Blog banner

Body Image and Low Self Esteem: Understanding the Emotional Impact Beyond Appearance

Blog banner

SPAM

Blog banner

Constrains in service design

Blog banner

Ransomware

Blog banner

Uniprocessor scheduling

Blog banner

Importance of self defence for girls

Blog banner

FAMILY WHERE LIFE BEGINS....

Blog banner

1.1 basic elements

Blog banner

What is Virtual Memory

Blog banner

Climate Anxiety: Understanding the Psychological Impact of a Changing World

Blog banner

Modern Teaching Methods: Why Inquiry-based & Experiential Learning Works Best

Blog banner

Cyber-crime Investigation and Future Directions

Blog banner

Proof-of-Stake (PoS)

Blog banner

Reconnaissance

Blog banner

Why Does Hierarchy Still matter in Organizations?

Blog banner

Data Warehousing

Blog banner

"Audit" In Data Science

Blog banner

Esri India launches Policy Maps.

Blog banner

MODERN OPERATING SYSTEM

Blog banner

Solving Problems with AI: The Power of Search Algorithms

Blog banner

OS Assignment 3

Blog banner

Use It or Lose It: Why November Is the Best Time to Claim Your Dental Extras and Medicare CDBS Before Year-End

Blog banner

Defining youtubr

Blog banner

PERT Overview

Blog banner

Disk cache

Blog banner

What is semaphore in operating system?

Blog banner

MPL and how its effects?

Blog banner

How Men and Women Process Pain Differently

Blog banner

Winter-to-Spring Smile Care: How Sydney’s Late-August Winds Impact Your Teeth & Gums

Blog banner

SMARTSHEET MANAGEMENT SOFTWARE

Blog banner

Modern Operating System - Khush bagaria

Blog banner

CYBER SECURITY CHALLENGES

Blog banner