Skip to content
The Computer Science
TheCScience
  • Engineering Subjects
    • Human Values
    • Computer System Architecture
    • Microprocessor
    • Digital Communication
    • Internet of Things
  • NCERT Solutions
    • Class 12
    • Class 11
  • Solutions
    • HackerRank
      • C Solutions
      • C++ Solutions
      • Java Solutions
      • Python Solutions
      • Algorithms Solutions
      • Data Structures Solutions
    • HackerEarth Solutions
    • Leetcode Solutions
  • JEE 2027
The Computer Science
TheCScience

Memory Management in Operating Systems | OS Tutorials

YASH PAL, June 11, 2026June 11, 2026

The main purpose of a computer operating system is to execute programs. These programs, together with the data they access, must be in main memory during execution. To improve both the CPU utilization and the speed of its response to users, the computer must keep several processes in memory. To achieve this task, we have multiple memory management schemes.

Table of Contents

  • Memory Management in OS
    • Memory Management Requirements
      • Relocation
      • Protection
      • Sharing
      • Logical Organization
      • Physical Organization

Memory Management in OS

The selection of a memory management scheme for a system depends on many factors, especially the system’s hardware design. In a uniprogramming system, main memory is divided into two parts:

  1. One part for the operating system (resident monitor, kernel).
  2. The other part for the program currently being executed.

In a multiprogramming system, the “user” part of memory must be further subdivided to accommodate multiple processes. The task of subdivision is carried out dynamically by the operating system and is known as memory management. Different techniques of memory management are described in Table 1.

TechniqueDescriptionStrengthsWeaknesses
Fixed
Partitioning
Main memory is divided into several static partitions at system generation time. A process may be loaded into a partition of equal or greater size.Simple to implement; little operating system overhead.Inefficient use of memory due to internal fragmentation; maximum number of active processes is fixed.
Dynamic
Partitioning
Partitions are created dynamically, so that each process is loaded into a partition of the same size as that process.No internal fragmentation; more efficient use of main memory.Inefficient use of processor due to the need for compaction to counter external fragmentation.
Simple
Paging
Main memory is divided into several equal-size frames. Each process is divided into several 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.No external fragmentation.A small amount of internal fragmentation.
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.No internal fragmentation; improved memory utilization and reduced overhead compared to dynamic partitioning.External fragmentation.
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 in later automatically.No external fragmentation; higher degree of multiprogramming; large virtual address space.Overhead of complex memory management.
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.No internal fragmentation, higher degree of multiprogramming; large virtual address space; protection and sharing support.Overhead of complex memory management.
Table 1: Memory Management Techniques

Memory Management Requirements

There are basically five requirements for memory management. These are listed below:

  1. Relocation
  2. Protection
  3. Sharing
  4. Logical Organization
  5. Physical Organization

Relocation

  • In a multiprogramming system, the available main memory is generally shared among a number of processes.
  • The programmer can’t know in advance which other programs will be resident in main memory when his or her program executes.
  • In addition, to swap active processes in and out of main memory to maximize processor utilization by providing a large pool of ready processes to execute.
  • Once a program has been swapped out to disk, it would be quite limiting to declare that when it is next swapped back in, it must be placed in the same main memory as before.
  • Instead, we may need to relocate the process to a different area of memory.
  • Figure 1 depicts the facts that raise some technical concerns related to addressing.
memory management requirements in operating system
Figure 1: Addressing Requirements for a Process

Protection

  • Each process should be protected against unwanted interference by other processes, whether accidental or intentional. Thus, programs in other processes should not be able to reference memory locations in a process for reading or writing purposes without permission.
  • Normally, a user process cannot access any portion of the operating system, neither program nor data. Without special arrangement, a program in one process cannot access the data area of another process.

Sharing

  • Any protection mechanism must have the flexibility to allow several processes to access the same portion of main memory.

Logical Organization

  • Main memory in a computer system is organized as a linear or one-dimensional address space, consisting of a sequence of bytes or words.

Physical Organization

  • Computer memory is organized into at least two levels, referred to as main memory and secondary memory.
  • Main memory provides fast access at relatively high cost. In addition, its main memory is volatile, that is, it does not provide permanent storage.
  • Secondary memory is slower and cheaper than main memory and is usually non-volatile.
  • Thus, secondary memory of large capacity can be provided for long-term storage of programs and data, while a smaller main memory holds programs and data currently in use.
engineering subjects Operating System Operating System

Post navigation

Previous post

Leave a Reply

Your email address will not be published. Required fields are marked *

Engineering Core Subjects

Digital Communication Subject
Internet of Things Subject
Computer Architecture subject
Human Value Subject

JEE Study Materials

JEE Physics Notes
JEE Chemistry Notes

TheCScience

At TheCScience.com, our mission is to make quality education accessible to everyone. We provide in-depth, easy-to-understand articles covering Secondary, Senior Secondary, and Graduation-level subjects.

Pages

About US

Contact US

Privacy Policy

DMCA

Our Tools

Hosting - get 20% off

Engineering Subjects

Internet of Things

Human Values

Digital Communication

Computer System Architecture

Microprocessor

Programming Tutorials

Data Structure and Algorithm

C

Java

NCERT

Class 12th

©2026 TheCScience | WordPress Theme by SuperbThemes