Scheduling Algorithm - Who Can Give Sample Program???
DO YOU REMEMBER PAGE REPLACEMENT AGORITHMS???
FIRST-IN-FIRST-OUT
LEAST FREQUENTLY USED
MOST FREQUENTLY USED
CAN ANYONE PROVIDE ME SAMPLE PROGRAM WIH SOURCE CODE IN C OR IN C++ FOR THESE ALGORITHM?
PLEASE IF YOU HAVE KINDLY EXTEND THEM TO ME...
THANK YOU VERY MUCH
Re: Scheduling Algorithm - Who Can Give Sample Program???
How would I implement something like that in both a FIFO and LRU scenario while passing a string of predefined numbers and a set page file size. Like FIFO with string 1,2,3,4,5 and page file of say 3? And the same for LRU. I am not a programmer but would like to see how this works in a running simulation to help me better understand how it really works in an operating system. Thanks.
Re: Scheduling Algorithm - Who Can Give Sample Program???
You should really make up your own thread referencing this one. While you're on this topic, you might like to look up Belady's anomaly.
Can't give you a program but can make up a short example
Code:
Page
1 LRU 1 FIFO 1
2 LRU 2 1 FIFO 2 1
1 LRU 1 2 FIFO 2 1
3 LRU 3 1 2 FIFO 3 2 1
1 LRU 1 3 2 FIFO 3 2 1
4 LRU 4 1 3 FIFO 4 3 2