ScholarMatic | 24/7 Homework Help

ScholarMatic Will Help You Write Your Essays and Term Papers

Answered » You can buy a ready-made answer or pick a professional tutor to order an original one.

Virtual Memory Simulator based on Demand Paging.

by | Nov 30, 2023 | questions

Java program that simulates the FIFO, OPT, LRU algorithms.
Already completed 1-4 on the requirements on the attached information document.
Professor already saw, ran, and approved on what I have created of the program thus far, including FIFO algorithm simulator. Please do no change anything but the main class switch case 5 and 6 where it is indicated by my comments to call on the OPT and LRU classes.
Only need help with the OPT and LRU simulator classes. They must give the same presentation as the FIFO algorithm created by me:
OPT class holds opt() method. LRU class holds lru() method. Look at FIFO algorithm for guidance on how this methods mus function.
Also attached is how one of the reference strings will output in FIFO, OPT, and LRU.
Project was created using Netbeans. Attache in zip folder.

Document Preview:

Final Project

Design and implement a virtual memory simulator based on Demand Paging.
It will be a text based application (NOT a GUI based one).
The programming language can be C or Java.
The following algorithms will be implemented: FIFO, OPT and LRU.
We will simulate the execution of each of these algorithms on a hypothetical computer having only four physical frames (numbered from 0 to 3), assuming that the single process that is running has a virtual memory of eight frames (numbered from 0 to 7).
The algorithms will be simulated based on a reference string (a sequence of pages that are to be accessed) that will be either read from the keyboard or randomly generated.
The program will be menu-based and the menu will have the following options:

0 – Exit
Will exit the program
1 – Read reference string
A reference string will be read from the keyboard and stored in a buffer. Each value of the reference string will be verified and validated (or rejected).
The user will be first asked to enter the length of the reference string, and then the string itself will be entered.
2 – Generate reference string
A reference string will be randomly generated; the length of the reference string will be given by the user interactively. The string will be stored in a buffer.
Using options 1 and 2 more than once will result in overwriting the old reference string.
3 – Display current reference string
Will display the stored reference string; if there is no reference string stored yet, an error message will be displayed.
4 – Simulate FIFO
Will simulate the step by step execution of the FIFO algorithm using the stored reference string; if there is no reference string stored yet, an error message must be displayed.
The user will press a key after each step of the simulation to continue the simulation.
5 – Simulate OPT
Will simulate the step by step execution of the OPT algorithm using the stored reference string; if there is no reference string stored yet, an…

ScholarMatic: Explanation & Answer

Your ready answer from a verified tutor is just a click away for as little as $14.99


  

Click Order Now to get 100% Original Answer Customized to your instructions!

HOME TO CERTIFIED WRITERS

Why Place An Order With Us?

  • Certified Editors
  • 24/7 Customer Support
  • Profesional Research
  • Easy to Use System Interface
  • Student Friendly Pricing

Have a similar question?

PLAGIRAISM FREE PAPERS

All papers we provide are well-researched, properly formatted and cited.

TOP QUALITY

All papers we provide are well-researched, properly formatted and cited.

HIGHLY SECURED

All papers we provide are well-researched, properly formatted and cited.

ScholarMatic: Get Started

Assignment Writing Service

Feel safe and secure when placing an order on our portal!
Fruitful cooperation begins with solid guarantees, and we are professional enough to promise perfect results. Let’s get it started!