You are on page 1of 16

A

Micro project

On

“Page Replacement Algorithms in Operating System.”


Submitted By :

Samrudhi Zurange(46)

Aditya Bhambare(01)

Kartik Kothule(23)

Guided By :Ms. Anjalee Karkute

Diploma Course in Computer Technology

(As per directives of I Scheme, MSBTE)

Sinhgad Institutes

SOU.VENUTAI CHAVAN POLYTECHNIC PUNE – 411041

ACADEMIC YEAR 2022-2023


Maharashtra State Board Of
Technical Education
Certificate

This is to certify that Mr. Samruddhi Zurange Roll No. 46 of


Semester 5th of Diploma in Computer Technology of Institute Sou.
Venutai Chavan Polytechnic (Code:0040) has successfully completed
the Micro-Project in Operating System(22516) for the academic year
2022-2023 as prescribed in the curriculum.

Place :SVCP, Pune Enrolment No: 2000400026

Date: Exam Seat No:

Mrs. A.V. Kurkute Mrs. A.V. Kurkute Dr.(Mrs.) M.S. Jadhav


Subject Teacher Principal HOD
Maharashtra State Board Of
Technical Education
Certificate

This is to certify that Mr. Aditya Bhambare roll no. 01 of Semester


5th of Diploma in Computer Technology of Institute Sou.
Venutai Chavan Polytechnic (Code:0040) has successfully completed
the Micro-Project in Operating System (22516) for the academic year
2022-2023 as prescribed in the curriculum.

Place :SVCP, Pune Enrolment No: 2000400031

Date: Exam Seat No:

Mrs. A.V. Kurkute Mrs. A.V. Kurkute Dr.(Mrs.) M.S. Jadhav


Subject Teacher Principal HOD
Maharshtra State Board Of
Technical Education
Certificate

This is to certify that Mr. Kartik Kothule roll no. 23 of Semester 5th of
Diploma in Computer Technology of Institute Sou. Venutai Chavan
Polytechnic (Code:0040) has successfully completed the Micro-Project
in Operating System(22516) for the academic year 2022-2023 as
prescribed in the curriculum.

Place :SVCP, Pune Enrolment No: 2000400233

Date: Exam Seat No:

Mrs. A.V. Kurkute Mrs. A.V. Kurkute Dr.(Mrs.) M.S. Jadhav


Subject Teacher Principal HOD
INDEX

SR NO CONTENTS PAGE NO

1 Aim of the Micro-Project 01

2 Rationale 04

3 Course Outcomes Achieved 04

4 Literature Review 04

5 Actual Methodology Followed 05

6 Actual Resources Used 10

7 Skills Developed 10

8 Applications of Micro Project 10


Annexure - I Micro-Project Proposal

1.0 Aim of the Micro-Project:


To learn how to use page replacement algorithm in Operating system.

2.0 Intended Course Outcomes:


a) Learn different types of page replacement algorithm.
b) Learn how to use page replacement algorithm.

3.0 Proposed methodology:


I. Study the what is paging
II. Study what is page replacement.
III. Study what are different types of page replacement.
IV. Study how to use page replacement algorithm.
V. Learn why we use page replacement algorithm
VI. Prepare the final report.
4.0 Action Plan:

Name of
Planned
Sr. Planned responsible
Details of Activity Finish
No. Start Date Team
Date
members
Identify the requirements of the
1 19/09/2021 26/09/2021 Samrudhi
project.
Study what is page
2 26/09/2021 15/10/2021 Aditya
replacement.
Study different types of page
3 17/10/2021 25/10/2021 Kartik
replacement.
Study why we need a page
4 11/11/2021 17/11/2021 Samrudhi
replacement algorithms.
Aditya
5 Final checking of the project. 19/12/2021 25/11/2021
Kartik
6 Prepare the final report. 13/12/2021 28/12/2021

5.0 Resources Required:


S. No. Resources required Specifications
1 Computer system Intel(R) Pentium CPU, RAM 4 GB
2 Operating System Windows 10, 64 Bit Operating System
3 Software used MS Word
6.0 Team members:

S. No. Roll. number Name of Student


1 01 Aditya Bhambare
2 23 Kartik Kothule
3 46 Samrudhi Zurange
Annexure - II Micro-Project Report

1.0 Rationale:

Page replacement algorithm are an important part of virtual


memory management and it helps the operating system to decide which memory
page can be moved out, making space for the currently needed page. However,
the ultimate objective of all page replacement algorithm is to reduce the number
of page fault.

Page replacement is done when the requested page is not found in


the main memory There are two main aspects of virtual memory, Frame
allocation and Page replacement. It is very important to have optimal frame
allocation and page replacement algorithm.

2.0 Aim of the Micro-Project:

Learn different types of page replacement algorithm and how to use


page replacement algorithm in operating system.

3.0 Course Outcomes Achieved:


 Know different types of page replacement algorithm.
 Know how to use page replacement algorithm in operating
system.
4.0 Literature Review:

The page replacement algorithm decides which memory


page is to be replaced. The process of replacement is sometimes called swap out or
write to disk. Page replacement is done when the requested page is not found in the
main memory.
A page replacement algorithm tries to select which pages
should be replaced so as to minimize the total number of page misses. There are
many different page replacement. These algorithms are evaluated by running them on
a particular string of memory reference and computing the number of page faults. The
fewer is the page fault the better is the algorithm for that situation.
5.0Actual Methodology Followed:
1. Study the what is paging.
2. Study what is page replacement.
3. Study what are different types of page replacement.
4. Study how to use page replacement algorithm.
5. Learn why we use page replacement algorithm
6. Prepare the final report.

What is paging? :

 The OS divides virtual memory and the main memory


into units, called pages.
 Each used page can be either in secondary memory or
in a page frame in main memory.
 A frame does not have to comprise a single physically
contiguous region in secondary storage.

What is page replacement?:


 When memory located in secondary memory is
needed, it can be retrieved back to main memory.
 Process of storing data from main memory to
secondary memory->swapping out
 Retrieving data back to main memory->swapping in
What are Page Replacement Algorithms?

 Deals with which page needs to be swapped out and


which are the ones that need to be swapped in.
 The efficiency lies in the least time that is wasted for
page to be paged in

Types:
 Local Page Replacement Strategy
 Global Page Replacement Strategy

Need of Page Replacement Algorithm


 The main goal of page replacement algorithms is to
provide lowest page fault.

Algorithms :

1. First In First Out


2. Optimal Page Replacement
3. Least Recently Used
1. First In First Out (FIFO)-

This is the simplest page replacement algorithm. In this


algorithm, the operating system keeps track of all pages
in the memory in a queue, the oldest page is in the front
of the queue. When a page needs to be replaced page in
the front of the queue is selected for removal.
Example-1 Consider reference string 1, 3, 0, 3, 5, 6 with 3 page
frames. Find number of page faults.

Initially all slots are empty, so when 1, 3, 0 came they are


allocated to the empty slots->3 Page Faults.
When 3 comes, it is already in memory so->0 Page Faults.
Then 5 comes, it is also available in memory so it replaces the
oldest page slot i.e.1.->1 Page Fault.
6 comes, it is also not available in memory so it replaces the
oldest page slot i.e.3->1 Page Fault.
Finally when 3 comes it is not available so it replaces 0 1 Page
fault
2. Optimal Page Replacement:
In this algorithm, pages are replaced which
would not be used for longest duration of time in the future.
Example-2:Consider the page references 7, 0, 1, 2, 0, 3, 0, 4,
2, 3, 0, 3, 2, with 4 page frame. Find number of page fault.

Initially all slots are empty, so when 7 0 1 2 are allocated to


the empty slots->4 Page Fault.
0 is already there so->0 Page Fault.
When 3 comes it will take the place of 7 because it is not
used for the longest duration of time in the future->1Page
Fault.
0 is already there so->0 Page Fault.
4 will take place of 1->1 Page Fault.
Now for the further page references string->0 Page Fault
because they are already available in the memory.
Optimal page replacement is perfect, but not possible in
practice as the operating system cannot know future
requests. The use of optimal Page replacement is to set up a
benchmark so that other replacement algorithms can be
analyzed against it.

3. Least Recently Used:


In this algorithm page will be replaced which is recently used.
Example-3 Consider the page reference string 7, 0, 1, 2, 0, 3, 0, 4, 2, 3, 0, 3, 2, with 4
page frames. Find number of page faults.

Here LRU has same number of page fault as optimal but it may differ according to question

Initially all slots are empty, so when 7 0 1 2 are allocated to the empty slots-> 4 Page
Fault
0 is already their so->0 Page Fault.
When 3 come it will take place of 7 because it is least recently used-> 1 Page Fault.
0 is already in memory so ->0 Page Fault.
4 will take place of 1 -> 1 Page Fault.
Now for the further page reference string->0 Page Fault
Because they are already available in the memory.
7.0 Actual Resources Used:
Sr. no. Resources Specifications
required
1 Computer system Intel(R) Pentium CPU, RAM 4 GB
2 Operating System Windows 10, 64 Bit Operating System
3 Software Used MS Word.

7.0Skills Developed:
During the course of this micro-project, we learn about page
replacement algorithm.
 We learn why we use page replacement algorithm
 We learn different types of page replacement algorithm.
 We learn how to use page replacement algorithm.

8.0Applications of this Micro-project :


We use page replacement algorithms when the requested page is not
found in the memory.

9.0Area of future Improvement:


Page replacement plays only a small part in overall
performance of application, but studies, have shown that the benefits are
real. It certainly seems like worthwhile idea to further evaluate
implementation of both CAR and ARC in real operating system
10.0 Conclusion:
The evolution of replacement algorithms shows the analyses and proof of
better performance has moved from mathematical analysis to testing against
real world program traces. This trend show how difficult it is to
mathematically model the memory behavior of programs. An important is
also large amount of easy availability of important programs. The other clear
trend is the realization of the need for workload adaption.

You might also like