0% found this document useful (0 votes)
9 views11 pages

Virtual Memory Management Implementation

Uploaded by

kadamtejas1088
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)
9 views11 pages

Virtual Memory Management Implementation

Uploaded by

kadamtejas1088
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

Implementation on Virtual Memory Management Ashokrao Mane Polytechnic

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION

MICROPROJECT REPORT ON
“Implementation on Virtual Memory Management”
Diploma in Computer Engineering

Submitted By
Name : Roll No:
Revan S Kudalkar - 3025
Tejas S Kadam - 3026
Namrata U Wadekar - 3027

Subject: Operating System


Guided By: [Link]

ASHOKRAO MANE POLYTECHNIC, VATHAR


Department of Computer Engineering
A. Y. 2024-25

1|Page
Implementation on Virtual Memory Management Ashokrao Mane Polytechnic

DECLARATION

I hereby declare that the Micro-Project Report entitled “Operating System” with Module
“Implementation on Virtual Memory Management” is an authentic record on my own
work as requirements of Micro Project during the period from / /2024 to / /2024 in
partial fulfillment of Third Year in Computer Engineering, Ashokrao Mane Polytechnic,
Vathar under the guidance of Miss. R. S. Patil.

Signature of Student

Revan S Kudalkar - (3025)


Tejas S Kadam – (3026)
Namrata U Wadekar – (3027)

Date: / / 2024

Place: Vathar, Kolhapur.

2|Page
Implementation on Virtual Memory Management Ashokrao Mane Polytechnic

ACKNOWLEDGMENT

The successful presentation of the Operating System Micro Project would be incomplete
without the mention of the people who made it possible and whose constant guidance
crowned my effort with success.

I would like to extend my gratitude to HOD of Computer Department Dr. S. A. Lakade Sir,
Kolhapur, for providing all the facilities to present this Micro-Project.

I would like to thank our Project Guide, Miss. R. S. Patil, Department of Computer
Engineering, Ashokrao Mane Polytechnic, Vathar, for their constant guidance and inputs.

Sincerely,

Revan S Kudalkar
Tejas S Kadam
Namrata U Wadekar

Place : Vathar, Kolhapur

3|Page
Implementation on Virtual Memory Management Ashokrao Mane Polytechnic

INDEX

Topic Sub-Topic Content

1 Report
1.1 Abstract

1.2 Introduction

1.3 Resources Used

1.4 Skill Developed

2 Theory of Virtual Memory


Management
2.1 Working of Virtual Memory with
Diagrams
3 Real-Life Applications of Virtual
Memory
4 Conclusion

4|Page
Implementation on Virtual Memory Management Ashokrao Mane Polytechnic

ABSTRACT

This project explores the concept and implementation of Virtual Memory Management in
operating systems, a crucial technique that allows computers to run applications that require
more memory than is physically available. Virtual memory enables processes to use both RAM
and a designated portion of disk space, thereby extending the system's effective memory
capacity. In this project, we delve into fundamental virtual memory management strategies,
focusing on paging and page replacement algorithms. Through a Python-based implementation,
we simulate the paging mechanism and demonstrate the behaviour of common page replacement
algorithms, including FIFO (First-In-First-Out) and LRU (Least Recently Used). By testing these
algorithms on different page sequences, we observe how each strategy affects memory
efficiency, system performance, and page fault rates. The project's results underscore the
importance of selecting an appropriate page replacement strategy for optimized memory usage,
contributing to better understanding and practical insights into memory management in operating
systems.

5|Page
Implementation on Virtual Memory Management Ashokrao Mane Polytechnic

INTRODUCTION

Virtual Memory is an essential feature in modern operating systems that allows a computer to
compensate for limited physical memory by using a section of the hard drive as additional
memory. This enables the system to run larger applications or multiple applications
simultaneously, even when the required memory exceeds the available RAM. Virtual memory
management helps create the illusion of a vast and continuous memory space, which enhances
both flexibility and efficiency in memory allocation. One key component of virtual memory is
paging, where memory is divided into fixed-size pages and frames. This division allows the
system to load only the necessary pages into physical memory while keeping the rest on disk,
minimizing the need for physical RAM and reducing memory wastage. When memory
demand increases, page replacement algorithms—such as FIFO (First-In-First-Out) and
LRU (Least Recently Used)—determine which pages to swap out of memory. These
algorithms directly impact system performance by managing page faults, which occur when a
requested page is not found in physical memory. In this project, we implement a simplified
virtual memory management system using Python to simulate paging and page replacement
algorithms. By examining the performance of FIFO and LRU algorithms on different page
sequences, we aim to gain practical insights into virtual memory's role and efficiency in
operating systems.

6|Page
Implementation on Virtual Memory Management Ashokrao Mane Polytechnic

 RESOURCES REQUIRED :

Sr. Name of Specification Quantity Remark


No
Resource

1. Computer Computer (i3-i5preferable), 1 -


System Ram minimum 2 GB and
onward

2. Operating Windows 11 1 -
System

3. Software Microsoft Word,, Browser 1 -

4. Book Silberschatz, Galvin, and 1


Gagne.






 SKILL DEVELOPED :


Working on a project about Virtual Memory Management cultivates a comprehensive set
of skills vital for understanding and implementing core operating system concepts. It
develops proficiency in programming languages like C, C++, or Python, enabling you to
simulate essential functions such as paging, segmentation, and page replacement algorithms.
The project hones problem-solving and algorithmic skills as you design and optimize
memory management techniques while debugging issues like memory leaks and
segmentation faults. It also fosters a deeper understanding of operating system
fundamentals, including memory hierarchy and the interaction between software and
hardware components like the Memory Management Unit (MMU). Additionally, the project
enhances data analysis skills by tracking and interpreting performance metrics such as page
hits and faults, offering insights into system efficiency. Visualization techniques are often
employed to simulate and display memory usage and performance, improving both technical
and design expertise. If working in a team, you gain collaboration and project management
experience, using tools like Git for version control. Finally, documenting and presenting
findings sharpens communication skills, while researching advanced topics like demand
paging and thrashing enriches your understanding of real-world operating system
challenges.

7|Page
Implementation on Virtual Memory Management Ashokrao Mane Polytechnic

 Theory of Virtual Memory Management:

Virtual Memory:

Virtual memory is a technique used by operating systems to extend the amount of memory
available to applications by using secondary storage (like a hard disk or SSD) as if it were
additional RAM.

This method allows the operating system to run larger applications or multiple applications
simultaneously, even when the memory requirements exceed the physical RAM installed in
the system.

Paging:

Paging is a memory management scheme that eliminates the need for contiguous allocation of
physical memory, thus reducing fragmentation.

In paging, the virtual memory of a process is divided into fixed-size pages, and the physical
memory is divided into frames of the same size.

The operating system keeps track of all free and allocated frames and loads only the required
pages into memory, increasing efficiency.

Page Table:

A page table is used to translate virtual addresses into physical addresses. It stores the
mapping between the virtual page numbers and the corresponding physical frame numbers.

Each process has its own page table, which helps the system maintain isolation and security
among processes.

Page Fault:

A page fault occurs when a process tries to access a page that is not currently loaded in
physical memory (RAM).

When a page fault happens, the operating system fetches the required page from disk (swap
space) into a free frame in physical memory.

If no free frames are available, the OS uses a page replacement algorithm to decide which
page to swap out to make room for the new page.

8|Page
Implementation on Virtual Memory Management Ashokrao Mane Polytechnic

 Components of Virtual Memory Management:

Memory Management Unit (MMU): A hardware component that translates virtual


addresses to physical addresses.

Paging: Dividing the process into pages and loading only the needed pages into memory.

Swap Space: A designated area on the hard disk used to store pages that are not currently in
physical memory.

Page Replacement Algorithms: Techniques that determine which pages to swap out of
memory when all frames are full.

 Working of Virtual Memory with Diagrams:

Virtual memory is a technique that allows a computer to run multiple programs simultaneously by
using a portion of the hard disk to emulate more RAM. It works by using a process called swapping,
which moves data from RAM to the hard disk when needed, and then back again when it's required.

9|Page
Implementation on Virtual Memory Management Ashokrao Mane Polytechnic

 Real-Life Applications of Virtual Memory:



Enhanced Multitasking: Virtual memory enables the operating system to handle multiple
applications simultaneously, improving user experience and multitasking capability.

Running Large Applications: Applications requiring significant memory, such as video


editors, image processors, and games, benefit from virtual memory.

System Stability: Virtual memory prevents applications from crashing when the physical
memory is exhausted by providing additional memory from disk space.

10 | P a g e
Implementation on Virtual Memory Management Ashokrao Mane Polytechnic

 CONCLUSION:

Virtual memory is a foundational concept in operating systems, enabling computers to handle


applications larger than the available physical RAM by using part of the storage drive as an
extension. This capability allows for efficient multitasking and resource utilization, even on
systems with limited memory. By dividing programs into pages and loading only necessary
pages into RAM, virtual memory reduces memory waste and minimizes fragmentation. The
use of page tables to map virtual addresses to physical frames enables a structured and
effective way to handle memory requests. An essential part of virtual memory management is
the implementation of page replacement algorithms, such as FIFO (First-In-First-Out), LRU
(Least Recently Used), and Optimal Replacement. These algorithms determine which pages to
remove from memory when space is needed, directly influencing system performance by
impacting the rate of page faults. Each algorithm offers unique advantages: FIFO is
straightforward but can lead to high page faults, LRU aims to keep recently accessed pages in
memory, and Optimal Replacement provides a theoretical minimum page fault rate. By
analysing these algorithms, we gain insight into how operating systems balance memory
efficiency and processing demands.

11 | P a g e

You might also like