Path: utzoo!attcan!uunet!husc6!rutgers!cmcl2!lanl!beta!jlg From: jlg@beta.lanl.gov (Jim Giles) Newsgroups: comp.arch Subject: Re: Scientific Virtual Memory (WAS: Cray & Amdahl Virtual memory debate) Keywords: virtual pyisical memory prediction Message-ID: <20897@beta.lanl.gov> Date: 28 Jul 88 00:07:05 GMT References: <4232@cbmvax.UUCP> <76700035@p.cs.uiuc.edu> <5382@june.cs.washington.edu> Organization: Los Alamos National Laboratory Lines: 31 In article <5382@june.cs.washington.edu>, pardo@june.cs.washington.edu (David Keppel) writes: > Thought: One scheme that appears to help cache hit/miss ratios > (according to a paper by A.J.Smith, in any event) is a predictive > scheme as follows: > > + On a fault, fetch both the thing you need and the next one after. > + Mark the next one after as "fetched on prediction". > + First time you touch a thing marked "fetched on prediction", fetch > the next one after that, and mark it as "fetched on prediction". This will only work well under two conditions. 1) Pages or segments are LARGE. Otherwise the program finishes processing one page long before the next page is available. Your 'prediction' will have overlapped very little I/O with computing. 2) You must have a large amount of central memory. Otherwise, a wrong 'prediction' will swap out something you need on a frequent basis. Even then, this prediction scheme will still have at least one solid memory fault for each trip through the outer loops. This occurs when you circle back around to the beginning of your arrays. Unfortunately, the two conditions above are mutually contradictory (to some extent). The larger the page size - the worse the penalty for wrong predictions. On the other hand, large-memory machines are usually fast - so they catch up with the unfinished VM sooner. This scheme might be useful for novice users, but it is still no substitute for the user who KNOWS his data usage patterns in advance. J. Giles