Professional Documents
Culture Documents
Assignment No. B7
Assignment No. B7
Experiment No: B7
Name of the Student: Roll No:
Marks:
Sign of Teacher
Title: Write a Java Program (using OOP features) to implement paging simulation using
Problem Statement: To write a program to implement LRU & Optimal algorithm for Page
Replacement.
Learning Objective:
1) To study concept of Pages replacement.
2) To study the best algorithm for page replacement: Optimal, LRU
Learning Outcome: After completion of this experiment students will be able to,
How to divided the program in equal size pages to optimized its execution by
Replacing the pages by considering different page replacement algorithms.
Theory:
Whenever there is a page reference for which the page needed in memory, that event is called page
fault or page fetch or page failure situation. In such case we have to make space in memory for this new
page by replacing any existing page. But we cannot replace any page. We have to replace a page which
is not used currently. There are some algorithms based on them. We can select appropriate page
replacement policy. Designing appropriate algorithms to solve this problem is an important task
because disk I/O is expensive.
There are several algorithms to achieve.
1) Last recently used (LRU)
2) Optimal
1
Shri Chhatrapati Shivaji Maharaj College of Engineering, Nepti SPOSL
2
Shri Chhatrapati Shivaji Maharaj College of Engineering, Nepti SPOSL
1.
2.
3.
4.
5.
6.
7.
8.
9.
10
******************************************************************************
WRITE ALGORITHM FOR OPTIMAL:
1.
2.
3.
4.
5.
6.
7.
8.
9.
10
Conclusion:
3
Shri Chhatrapati Shivaji Maharaj College of Engineering, Nepti SPOSL
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
LAB QUIZ
-------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------
4
Shri Chhatrapati Shivaji Maharaj College of Engineering, Nepti SPOSL
-------------------------------------------------------------------------------------------------------------