Topic 2: run-ahead disk prefetching
•Problem:
–some applications stall often on disk reads (e.g., linker).
–common cure: prefetch disk blocks (or files) needed soon.
–problem: how to determine what to prefetch, and when?
•Solution:
–when the application stalls on a (synchronous) disk read,
don’t give up.
–instead of stalling, let the application continue, turning future reads into prefetch hints (using binary instrumentation).
–note that the application runs with potentially wrong data, because the (stalled) read has not finished.
–so, how do you ensure that the run-ahead does not corrupt state?
•Papers:
–Automatic I/O Hint Generation through Speculative Execution, Chang and Gibson (an “OS” paper)
–Dynamically Allocating Processor Resources Between Nearby and Distant ILP, Balasubramonian, et al (hw paper)