![]() |
Page Replacement Program (C++)
Create text data file
-- pages.dat-- 22//length of the page reference string (dynamic array) 1,2,4,1,5,3,1,2,5,6,7,4,5,4,6,2,1,2,8,3,4,8 1,2,4,3//number of frames comments part of data file implement FIFO and LRU page replacement algorithms read text file once, keep data in array 1st array - page reference string 2nd array - number of strings output: FIFO number of page faults w/ 1 frame = number of page faults w/ 2 frames = number of page faults w/ 4 frames = number of page faults w/ 3 frames = function will take 2 parameters (string and number of frames), it should produce number of page faults don't develop a different code for each frame, just a single function 1 function for FIFO 1 function for LRU as modular as possible no global variables has to be functional/structured should work for any amount of data (any number of frames, any page reference string) could you guys write and post the code for this, I would like to study the code. |
We don't do homework, please read the rules. It would help to find the "how to ask a question" article at www.catb.org.
This forum's purpose is for members to help eachother at the point in the process of programming where they get stuck, and don't know how to continue. And no, the beginning doesn't count... |
| All times are GMT -5. The time now is 11:04 AM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC