Module 5 ppt

Memory heirarchy


Memory Type Speed Cost per Bit Capacity
Registers Fastest Highest Very Small
Cache Very Fast Very High Small
RAM Fast Medium Medium–Large
SSD / HDD Slow Low Large
Tertiary Slowest Lowest Very Large

Memory Management

Memory management refers to the process by which an operating system:


Memory Allocation

Memory Allocation is the process of assigning memory space to a program or process.

The OS:


Types of Allocation


Memory Deallocation

Memory Deallocation occurs when a process terminates or releases memory.

Importance:


Memory Protection

Memory Protection ensures that one process cannot access another process’s memory.


Memory Swapping

Swapping is the process of moving processes between main memory and disk.


Virtual Memory

Virtual Memory allows programs to use more memory than physically available.

Key features:


Memory Mapping

Memory Mapping translates virtual addresses to physical addresses.

Performed using:


Memory Fragmentation

Fragmentation occurs when memory is broken into small unusable pieces.

Types:


Memory Paging

Paging divides memory into fixed-size units called pages.

Components:


Page Table

A Page Table stores the mapping between:


Memory Protection


Relocation and Limit Registers


Pasted image 20260118212531.png


Dispatcher and Context Switch


Swapping


Pasted image 20260118195302.png


Swapping and Priority-Based Scheduling