Will simulate the step by step execution of lru algorithm

Assignment Help Data Structure & Algorithms
Reference no: EM13310234

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

Reference no: EM13310234

Questions Cloud

Contemporary management issues : Contemporary Management Issues
Determine the electric field at the zero meter point : At the one meter mark a +1 coulomb charge is placed. At the two meter mark a -1 Coulomb is placed. Determine the electric field at the zero meter point
Find for how long in time was the hare stationary : A hare and a tortoise compete in a race over a straight course 2.25 km long. The tortoise crawls at a speed of 0.180 m/s toward the finish line. For how long in time was the hare stationary
Determine the buoyant force exerted on it by the air : An empty storage tank has a volume of 135 ft3. What is the buoyant force exerted on it by the air
Will simulate the step by step execution of lru algorithm : 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.
Calculate the volume of the balloon : The total mass of helium in a balloon is 131 kg. What is the volume of the balloon
Determine the input force : Use Pascal's principle. Given that Fout is 87 lb., the areas of the output and input cylinders are Aout 29 in2 and Ain 6 in2, what is the input force
Compute the pressure on each shoe independently : A person with a weight of 241 lb stands on two feet with their weight equally distributed between the two shoes, What is the pressure on each shoe independently
Advantages that small business would have in trade : What are some advantages and disadvantages that small business would have in international trade and is going international something only large and established businesses should pursue? Why or why not.

Reviews

Write a Review

Data Structure & Algorithms Questions & Answers

  Design algorithm to receive two integer items from terminal

Design an algorithm that will receive two integer items from a terminal operator, and display to the screen their sum, difference, product and quotient.

  Create world database using mysql

create World database using MySQL and write a Java or C# or program to access the DB

  Write a program that checks if left and right braces

Write a program that checks if left and right braces, brackets, and parentheses are balanced

  Implement a nice graph datastructure

Implement a nice graph datastructure. Implement two different greedy graph coloring algorithms. Shortest path algorithm and MST algorithms.

  How to use depth-first search to find out in time

Illustrate how to use depth-first search to find out in time O(|E|+|V |) whether undirected graph is 2-colorable. Describe and explain your strategy.

  Relationships in a database model

Discuss different types of classifications and do they overlap, or do they each tell us something unique about the entity relationship?

  Developing a new customer order entry system

The system development team at Wilson Corporation is working on developing a new consumer order entry system. In the process on designing the new system,

  Explaining playout delay algorithm

Let the adaptive playout delay algorithm. Show through simple example that adjusting playout delay at beginning of each talk.

  Create a program that reads product number and prices

The Rinky Dooflingy Corporation produces different kinds of doofingies, each identified b a product number. Create a program that reads product number and rates and stores these values in two arrays,

  Algorithm to decide flavor of ice cream

A group of ten people need to decide which one flavor of ice cream they will all order, out of three options. The algorithm can question and re-question the participants, and present the answers to the participants.

  Difference between formulas and functions

Assume your mother in law heard that you prepared the budget for the high school reunion picnic and has asked if you could help her to make a monthly household budget.

  Design a model using a flow diagram

Design a model using a flow diagram or pseudo code, hardware, and a software driver that can display the BCD digits 0-9 on a single-digit LED display. Build the BCD to seven-segment decoder in the software.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd