Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!bellcore!decvax!decwrl!amdcad!lll-crg!seismo!umcp-cs!chris From: chris@umcp-cs.UUCP Newsgroups: net.unix-wizards Subject: Re: execution timing and time(1) Message-ID: <2888@umcp-cs.UUCP> Date: Sun, 10-Aug-86 01:42:34 EDT Article-I.D.: umcp-cs.2888 Posted: Sun Aug 10 01:42:34 1986 Date-Received: Mon, 11-Aug-86 04:38:22 EDT References: <1200016@iuvax.UUCP> Reply-To: chris@umcp-cs.UUCP (Chris Torek) Organization: University of Maryland, Dept. of Computer Sci. Lines: 23 Summary: cache effects In article <1200016@iuvax.UUCP> jec@iuvax.UUCP writes: >Could some one please fill me in on what could account for the >variations in timing? Without knowing the actual system and program involved, I cannot say for certain, but it is likely that all of the variation you have observed is due to cacheing. Assuming you are on a Vax, there are two hardware caches to consider (`the cache' and the TLB), and if you do any disk I/O you are also using the Unix buffer cache. If your machine is low on memory you may experiene paging effects; and if not, the first run will take a bit more time to load the executable into memory. Subsequent runs will reclaim the pages without any disk reads. Then, too, there is the fact that the timing statistics are gathered with a 100 hz clock which is synchronised with hardware clock interrupts, which does not help any. For statistics-gathering without extra hardware, the best course seems to be to produce long-term averages under various conditions. -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 1516) UUCP: seismo!umcp-cs!chris CSNet: chris@umcp-cs ARPA: chris@mimsy.umd.edu