Simulation for swapping and paging algorithms