Lab 4

$24.99 $18.99

Write a program to compare the performance of the LRU and the Optimal page replacement algorithms. The program will take a reference string and the number of frames as inputs. Assume the maximum length of a reference string is 20 and there are 5 diffent pages from page 1 to page 5. The reference string…

5/5 – (2 votes)

You’ll get a: zip file solution

 

Categorys:
Tags:

Description

5/5 – (2 votes)

Write a program to compare the performance of the LRU and the Optimal page replacement

algorithms. The program will take a reference string and the number of frames as inputs.

Assume the maximum length of a reference string is 20 and there are 5 diffent pages from

page 1 to page 5. The reference string can be randomly generated and the number of frames

is entered through the keyboard. For example, the system generates a reference string

2 1 3 4 5 2 3 …5 and you enter the number of frames 3. Compare the number of page

faults generated by the Optimal and LRU algorithms. Print out the page replacement process

and you can see how LRU differs from the optimal.

Submission:

In order not to lose any files, you’d better zip all your files into a .zip file.

Submit your project to TRACS before the deadline. Homework will NOT be accepted

through emails. You should write a readme textfile telling the grader how to run

your programs. Without this file, it is very likely that your project will not be

run properly.

Lab 4
$24.99 $18.99