Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!chp!rph From: rph@chp.UUCP Newsgroups: comp.sys.m6809 Subject: Caching (was: 512K RAM upgrades) Message-ID: <1987Aug11.203541.6684@chp.uucp> Date: Tue, 11-Aug-87 20:35:41 EDT Article-I.D.: chp.1987Aug11.203541.6684 Posted: Tue Aug 11 20:35:41 1987 Date-Received: Thu, 13-Aug-87 00:39:43 EDT References: <5013@milano.UUCP> <1109@wlbr.EATON.COM> <5047@milano.UUCP> Reply-To: rph@chp.UUCP (Pontus Hedman) Organization: The Coach House Press Lines: 34 Keywords: OS9 CACHE SDOS In article <5047@milano.UUCP> baxter@milano.UUCP writes: >In article <1109@wlbr.EATON.COM>, pete@wlbr.EATON.COM (Pete Lyall) writes: >> ... The DMC >> controller is allegedly also barking up that tree, but with >> considerably smaller cache area (~8K). >SDOS has always had a cache of 2-4Kb. It works reasonably well, >but isn't anywhere the performance of the big cache we have been talking >about. I run OS9 on a SuperPET and wrote up a caching system that uses 26k of non-OS9 memory. It caches both reads and writes, because by patching the disk driver routines I found that some horrible inefficiencies occur when writing. Cached write-modified blocks are removed by a daemon that writes out the oldest modified block every 5 seconds or so, or they just get pushed out of the cache by aging. Not a great algorithm but it was easy to do... what it really should do is flush out those blocks that are near where the head physically is at any moment (seeks are the big killer, even with 5ms seeks like I have here). >> How do you time stamp your LRU/MRU sectors?? Do you keep a separate >> data structure aside for disk/LSN/TIME, and update with a 6 byte time >> packet? Do you keep this list sorted? >TIME STAMP? That's crazy. All you need is a relative time ordering, >which a linked list does beautifully. Ya a time stamp is useless; mine are just sorted in a doubly linked list by order of least-recent-use. But this too can be improved a lot. Anyway, with this cache running it takes some .3s to search my whole execution directory (which has 116 files in it) and 4 minutes to compile small C programs. That's pretty good since the filesystems are actually maintained as 1-meg relative files under CBM DOS(!). --- Pontus Hedman {utzoo|utgpu}!chp!rph