Messages in this thread | | | Subject | Re: File hinting, and a new file flag? | From | (Tom M. Kroeger) | Date | 14 Jul 1999 20:07:36 -0700 |
| |
"Lou Grinzo" <lgrinzo@stny.lrun.com> writes:
> The recent discussion about hinting and speculative execution > brought to mind something I've long wondered about: Why is > there no way to specify on a file open that you will be reading > an entire file sequentially? If the OS knew about the caller's > intentions at open time, it could check the available memory and > the file's size, and if the ratio were high enough, it could read > the whole file into a buffer, or even run a background thread to > do read aheads. > > This would only apply to read-only access of existing files, obviously, > and lacking enough memory, the OS would just ignore the flag an > do a normal open. Given how often software processes a file in > exactly this way, it seems like an opportunity to let the programmer > help the OS perform an optimization. > > I've tried to find an example of this being tried in an OS, but come up > empty. It's such a simple idea that I have to believe it's been looked at > before.
I'm unclear on the specific flags in specific OSs but I can say for certain that such things do exist in several research OSs (and I think in a few production OSs MVS, Solaris and DU? -- I could be off on these). In regards to the research end of things check out these projects:
http://www.cs.cmu.edu/~fwc/ http://www.cse.ucsc.edu/~tara/html/thesis.html http://www.pdl.cs.cmu.edu/TIP/TIP.html http://www.dcs.uky.edu/~griff/papers/mybib.html (The stuff with Randy Appleton)
and after all that I can at least tout a little of my research.
http://csl.cse.ucsc.edu/projects/predictive-caching/ and http://www.cse.ucsc.edu/~tmk
The summary of my recent work (HotOS VII) showed that just by tracking what was opened after the last access to each file, we can correctly tell you 72% of the time which file will be opened next. I'm currently implementing this in Linux and at the last Usenix presented a wips that showed preliminary results (reducing read times by 2/3).
--
tmk
----------------------------------------------------------------------- Tom M. Kroeger Pray for wind Graduate Student, UC Santa Cruz \ Pray for waves e-mail: tmk@cs.ucsc.edu |\ and Pray it's your day off! http://www.cse.ucsc.edu/~tmk |~\ (831) 459-4458 |__\ (831) 426-9055 home ,----+--
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |