Dexter said:Bass said:*snip*
Any application (big enough, complex enough to worth the effort of doing it) can do better than the kernel at caching because an application will always know better than the kernel what data it needs. The kernel can at best obeserve the reads and the writes and some hints passed through the system calls and do some guesswork based on that. The kernel does not have a time machine to look into the future but the application might just have one.
So I don't really agree. I think a program can provide enough hints to a kernel to let the kernel do all the real work. IE: Moving commonly read data to a certain part of a file. Again, similar to x86 optimization.