Cashier algorithm implemented in a page