![]() |
|
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Newbie
Join Date: Nov 2005
Posts: 1
Rep Power: 0
![]() |
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. |
|
|
|
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|