The algorithms will be simulated based on a reference


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 error message must be displayed.
The user will press a key after each step of the simulation to continue the simulation.
6 - Simulate LRU
Will simulate the step by step execution of the LRU 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.

Your final project will be graded based on:
• functionality (50 percent)
• proper style: comments, indentation, use of white space, variable names (10 percent)
• adherence to requirements + test plan (30 percent)
• user-friendly application (10 percent)
Test your program using the examples from the online course Module 3 and the Homework 4. Create a test plan document showing the results of this testing (testplan.doc).

Please do not forget to do a thorough error checking for this important project.

It is also important to comment your code in order to make it more easily readable and understandable.

Each file must have a block comment in the beginning.

Each class must be preceded by a comment describing the main goal and function of that class.

Each method and each attribute must be explained.

Important actions in the code must be commented (e.g: error checking).


Attachment:- 322887_3_Final-Project-CMSC-412.doc


Attachment:- 322887_1_FP.zip

Solution Preview :

Prepared by a verified Expert
Data Structure & Algorithms: The algorithms will be simulated based on a reference
Reference No:- TGS0648918

Now Priced at $40 (50% Discount)

Recommended (96%)

Rated (4.8/5)