simulation of operative systems paging algorithms in javascript