this code is a simulator to simulate the paging system such as first come first service. the comment in this code can help you to run it.