Skip to content

Kashyap0312/OS-ICT19-Page-Replacement-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

`

A brief description of what this project does:

We made Page Replacement Algorithms where students can able to learn Page Replacement Algorithms from scratch and also implement Algorithms on this website. Here we also provided animated video for clearing basic ideas. And for deep understanding also various blogs and tutorials are available.

👉 Our Website 👈

Technologies used:

• HTML5 • CSS3 • JavaScript

Software to be used:

Any text editor like notepad, WordPad etc are sufficient. ∙ Any code editor like VScode, Sublime etc.

Download link: -

o VScode: https://code.visualstudio.com/ o Sublime: https://www.sublimetext.com/3

We recommend using Visual Studio Code Editor.

  1. Installation Instructions: -

  2. Download the file “OS-ICT19-Page-Replacement--master” from Website or github.

  3. It will be downloaded as a .zip file. Open your Download folder.

Now, extract this file to your local PC/Laptop.

  • Once the file is extracted, open the OSVirtualLab folder and double click on the “index.html” file to start the website.

Future Work:

➢ You can change the UI/UX Design.

➢ You can add two more section which are Concurrency and Deadlock, Scheduling.

➢ In Comparison Graph you can add more types of graph instead of only bar graph likewise, Pie, Line, Histogram, Area, Dot or Plot, Scatter Plot, Bubble graph

Page Replacement Algorithms (Website)

Team No. 67

  • Installation Requirements

Firstly, as a basic thing we need a web browser in our laptop to run the code. Also, we need any one editor like Atom or Sublime text for looking the code and better coding experience. There is no platform dependency of our website so you can run it on any platform.

For back-end we have used JavaScript so we need to install JavaScript or any other platforms for looking the code of JavaScript. So after all this requirement you have to open the RAR or Zip file and extract it.

Now, in order to run the code, we need to either double click on index.html to open it in browser or run index.html with help of any code editor and the whole project can be explored in the browser.

  • About Page Replacement Algorithms

In an OS which uses paging for memory management, It is the algorithm which is used to decide which page needs to be replaced when new page comes in. Due to small physical memory compared to virtual memory, page fault occurs. So for that issue we need to replace one of the existing pages with new needed page. There are 3 different ways to decide which page is replaced which is mentioned below.

  1. First In First Out (FIFO)

This is the simplest page algorithm. In this algorithm, the OS maintains a queue that keeps track of all the pages memory, with the oldest page at the front and the most recent page at the back. When there is a need for page replacement, the FIFO algorithm, swaps out the page at the front of the queue, that is the page which has been in the memory for the longest time.

  • Steps to Follow:

Firstly select the algorithm i.e. FIFO from left hand side and enter the number of frames and also enter the order of pages. After filling it just simply click on the submit button and in seconds you will see the output on the other half of page with all details.

On the output section, firstly it will show a kind of summary like how many frames were there and also order of pages and which algorithm is used.

Then it will show the table in which the page are shown in every frames. And at bottom it will show the page faults and its percentage, page hit and its percentage.

  1. Optimal Page Replacement

Optimal Page replacement algorithm is the best page replacement algorithm as it gives the least number of page faults. In this algorithm, pages are replaced which would not be used for the longest duration of time in the future, i.e., the pages in the memory which are going to be referred farthest in the future as replaced.

Steps to Follow:

  1. Firstly select the algorithm i.e. Optimal from left hand side and enter the number of frames and also enter the order of pages.
  2. After filling it just simply click on the submit button and in seconds you will see the output on the other half of page with all details.
  3. On the output section, Firstly it will show a kind of summary like how many frames were there and also order of pages and which algorithm is used.
  4. Then it will show the table in which the page are shown in every frames.

And at bottom it will show the page faults and its percentage, page hit and its percentage.

  1. Least Recently Used

Least Recently Used page replacement algorithm keeps track of page usage over a short period of time. It works on the idea that the pages that have been most heavily used in the past are most likely to be used heavily in the future too. In LRU, whenever page replacement happens, the page which has not been used for the longest amount is replaced.

Steps to Follow:

  1. Firstly select the algorithm i.e. LRU from left hand side and enter the number of frames and also enter the order of pages.

  2. After filling it just simply click on the submit button and in seconds you will see the output on the other half of page with all details.

  3. On the output section, firstly it will show a kind of summary like how many frames were there and also order of pages and which algorithm is used.

  4. Then it will show the table in which the pages are shown in every frames. And at bottom it will show the page faults and its percentage, page hit and its percentage.

About Graph

We have created a different page for calculating the graph.

Number of frames indicates up to how many frames you want to calculate/prepare the graph for the entered reference string.

Also, if you don’t want to see the Total Page Faults for a particular frames then by just hovering on the point you will see the page fault number for the respected algorithm.

What can be the new enhancement in this?

1**. For future enhancements in our project, we can Add more and more CSS effects so it’s look nice.**

2. We can add comparison charts of different algorithms.

3. Time complexity of our project can be enhanced to make it more robust.

4. We can even develop an Android and an iOS app for the same.

Developed By:

THANKS ;)