Principles of Optimal Page Replacement