Page fault counter + table painter
this one was written one day before the final test. This program counts the number of PF(page faults) and also prints tables for different algorithms (FIFS, LRU, OPT)
Code
Don't pay too much attention to this code, because there is a lot of shitcode, xD.
Hot to use
make
cd Page-fault-counter/
./a __PROC_ALLOC_FRAMES__ [queue of frames]
Перерисовать таблицы, чтобы семер не спросил как вы получили ответ. P.S. для FIFO, перед перенесением в тетрадь, таблицу нужно транспонировать.
Example
./a 3 1 2 3 5 2 1 4 5 2 1 3 4 1 2 5 1 3 2 4
There is 3 -- number of frames allocated to the process.
So there you can see example of output: