Create three different page replacement algorithms: FIFO, LRU and OPT-lookahead-X -- 2
$10-30 USD
Completed
Posted almost 9 years ago
$10-30 USD
Paid on delivery
The input to your simulator is as follows:
tp /* total_number_of_page_frames (in main memory) */
sl /* maximum segment length (in number of pages) */
ps /* page size (in number of bytes) */
r /* number_of_page_frames_per_process for FIFO, LRU, LFU and OPT,
or delta (window size) for the Working Set algorithm */
x /* lookahead window size for OPT, 0 for others (which do not use
this value) */
min
max
k /* total number of processes */
pid1 size1 /* process_id followed by total number of page frames on
disk */
pid2 size2
: :
: :
pidk sizek
These parameters are followed by a list of process id and address pairs: pid addr. You need to
extract the segment number and page number from the address addr. The last address
accessed by process i is followed by: i -1.
The output from your simulator includes the following data. You may also show other useful
statistics.
number_of_page_faults for each process; for Working Set, show the min
and max size of the set and total_number_of_page_faults