Demand Paging

Assignment

Lab 4 (demand paging) is available on NYU Classes.

Inputs and Outputs

I fancied up my program to produce debugging information optionally with an extra last argument. You are NOT being asked to do that.

Note the column for input. It shows the line used to run the program to get the normal output. For example, if you are writing in java and your program is called Paging, you would execute input 1 by typing

  java Paging 10 10 20 1 10 lru 0

If you are writing in C or C++ the line would be same without the initial java. To get the corresponding debugging or “show random” output, the final 0 is changed. But remember you do NOT have to support debugging or “show random” output. Of course, you might find it a wonderful debugging aid ... .

NumberInputNormal Output DebuggingShow random
1 10 10 20 1 10 lru 0 click here click here click here
2 10 10 10 1 100 lru 0 click here click here click here
3 10 10 10 2 10 lru 0 click here click here click here
4 20 10 10 2 10 lru 0 click here click here click here
5 20 10 10 2 10 random 0 click here click here click here
6 20 10 10 2 10 fifo 0 click here click here click here
7 20 10 10 3 10 lru 0 click here click here click here
8 20 10 10 3 10 fifo 0 click here click here click here
9 20 10 10 4 10 lru 0 click here click here click here
10 20 10 10 4 10 random 0 click here click here click here
11 90 10 40 4 100 lru 0 click here click here click here
12 40 10 90 1 100 lru 0 click here click here click here
13 40 10 90 1 100 fifo 0 click here click here click here
14 800 40 400 4 5000 lru 0 click here click here click here
15 10 5 30 4 3 random 0 click here click here click here
16 1000 40 400 4 5000 fifo 0 click here click here click here




Allan Gottlieb