Improving Memory And I/O Systems Through Foresight