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

  Write a method that finds the average age of the students

Write a method that finds the average age of the students stored in the data structure and some Java code that could be used in a test program to display the value returned by the method on the console or command prompt.

  Important java questions

Add a method addText to the Question class, and provide a different implementation of Choice Question that calls add Text rather than storing an array list of selections.

  Process of insertion into a heap-implemented priority queue

Explain the process of insertion into a heap-implemented priority queue, and informally explain its complexity and the process of removal from a heap-implemented priority queue, and informally explain its complexity.

  Calculate failure and success ratios using fifo page removal

Using FIFO page removal algorithm, do a page trace analysis indicating page faults with asterisks (*). Then calculate the failure and success ratios.

  Find the mean number of rounds per contention period

Two CSMA/CD stations are each trying to transmit long documents. After each frame is sent, they contend for the channel using the binary exponential backoff algorithm.

  Design a gui and implement tic tac toe game in java

Design a GUI and implement Tic Tac Toe game in java

  Compare the average behavior of insertion sort

Compare the average behavior of insertion sort for n elements with that of the n insertions into an initially-empty straight array implementation of a priority queue

  Explain how to determine line in o-n lg n time

Explain how to determine such a line in O(n lg n) time. Provide the O(n^2 lg n)-time algorithm to pair Ghostbusters with ghosts in such a way that no streams cross.

  Implementing the banker algorithm

Prompt user to enter the size of matrix n and m. Your program should accept any n x m matrix and m vectors where n and m are positive integer less than ten.

  The definitions associated with graphs.

Understand the definitions associated with graphs. a. Connected undirected graph; loop and cycle; DAG; simple path; strongly connected graph; weakly connected graph; complete graph

  Perform an insertion sort on the file pointed

Using only the local data already supplied in FileSort, perform an insertion sort on the file pointed to by fd. Use lseeks for this; do not try to create any sort of array or list. An array-based version of insertion is supplied for your reference.

  Documentation and proper design procedures

Determine the main reason that make many developers skip over the documentation and proper design process? As a manager, discuss how do you ensure that the proper database design process are followed by database development teams?

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