Lab 06: Demonstration of Memory Management Technique
Course Name : Operating Systems Laboratory
Course Code : CSE 310
Submitted To :
Dr. Abu Sayed Md. Mostafizur Rahaman
Professor
Department of Computer Science and Engineering
Jahangirnagar University
Submitted By :
Zakia Binta Syeed
Roll : 402
Session : 2021-22
Department of Computer Science and Engineering
Jahangirnagar University
Department of Computer Science and Engineering
Faculty of Mathematical and Physical Sciences
Jahangirnagar University
Savar, Dhaka
Submitted Date: 14.07.25
1. Introduction
This lab demonstrates and compares memory management techniques:
Fixed Size Partitioning (First Fit, Best Fit, Worst Fit)
Variable Size Partitioning (First Fit, Best Fit, Worst Fit)
Pagination
Each technique is simulated with a dataset and analyzed based on memory allocation behavior
and fragmentation.
2. Page Size and Memory Info
Total memory size: 64 units
OS reserved: 4 units
Available memory: 60 units
Page size (for pagination): 4 units
3. Simulation Results
Fixed Size – First Fit :
This method allocates process to the first available partition that is large enough to accommodate
it. The search starts from the beginning of the partition list and stops at the first match.
Dataset:
Allocation & Analysis:
Fixed Size – Best Fit :
The Best Fit strategy searches for the smallest available partition that can accommodate the
process. It minimizes internal fragmentation but may take longer to find a match.
Dataset:
Allocation & Analysis:
Fixed Size – Worst Fit :
This strategy allocates the process to the largest available partition. The idea is to leave larger
remaining blocks after allocation.
Dataset:
Allocation & Analysis:
Variable Size – First Fit :
Allocates the first large-enough block from the list of available free blocks.
Dataset:
Allocation & Analysis:
Variable Size – Best Fit :
Allocates the smallest free block that can hold the process, reducing unused memory in the
block.
Dataset:
Allocation & Analysis:
Variable Size – Worst Fit :
Allocates the largest available block to ensure large blocks are preserved in memory.
Dataset:
Allocation & Analysis:
Pagination :
Divide process into pages (based on page size = 4 units). Allocate each page to any available
memory frame. Track allocation using page tables
Dataset:
Page Allocation & Analysis:
4. Conclusion
First Fit is fast but can cause fragmentation
Best Fit uses space efficiently but is slower
Worst Fit often leads to wasteful memory usage
Pagination is the most flexible and avoids external fragmentation