|
|
|
|
|
by pencilcode
4991 days ago
|
|
is there any known algorithm that looks at the relationship between cached items? Ie. File A is accessed, then B, then C, then D, then E, and so on. A would a have stronger relationship to B, one step away, than to D, two steps away. So if we later access file A, the algorithm would know there's a higher probability that we need File B next, so it could check if file B is in the cache and if not, prefetch it and save it in the cache. |
|
Going higher than 1-order might make it even smarter, but with the cost of taking more memory (increasing the likelyhood of thrashing).
It actually seems like a very novel and interesting approach, although I don't know if it's been done before.
(Quick googling reveals that there is a LOT of work done on this approach, but I don't have the time right now to see if it's a good one or not.)