Code Snippets

Can Anyone give me an implimentation of virtual memory (simulation using paging only) .it should have the following algos for page replacement
1. LRU
2.FIFO
3.Clock

references to web sites would be gr8 too

it should have the code/algo no executables(in C only)