mdavis@pro-sol.cts.COM (Morgan Davis) (10/09/88)
There have been numerous messages about the GS/OS cache recently -- in particular, why the performance does not increase when you crank up the size of the cache. As Keith Rollin said, GS/OS maintains a 16K internal cache (separate from the one set with the Cache NDA) which is used to cache directories that you access. This alone has such a great performance on disk access that it was built into GS/OS and is always present. But GS/OS also supports a read-data cache, the size of which is set up using the Cache NDA, or GS/OS commands, and hopefully as a feature of a newer ROM update for the Control Panel. This cache is only used when a GS/OS "read" command is given and the programmer has requested that the data being read is stored in cache memory. Presently, only the Finder (I believe) does this. APW and other ProDOS 16 utilities cannot make use of the cache because they were written for ProDOS 16, and hence make ProDOS 16 command calls -- not GS/OS calls. In sum, cached reads are a feature of Class 1 GS/OS calls, not the ProDOS 16 Class 0 calls. Another related feature of GS/OS is deferred writing. This is done with the Begin-Session and End-Session calls. When you begin a session, all disk writes are cached in RAM (nothing is written to disk). As soon as you issue the End-Session command, the blocks which were updated in memory are flushed to disk. Why is this useful, you ask? It can dramatically improve performance when you're doing something like deleting or copying a whole batch of files since the disk won't be accessed during the writes to update the directory or bitmap blocks, a process which is very disk intensive. Essentially, the blocks are updated over and over again RAM, and when you're all done, they're quickly written once to disk. These are the features used with the Macintosh's Finder which make moving whole folders of files very fast, or deleting a bulging trash can full of files. --Morgan UUCP: crash!pnet01!pro-sol!mdavis ProLine: mdavis@pro-sol ARPA: crash!pnet01!pro-sol!mdavis@nosc.mil MCI Mail: 137-6036 INET: mdavis@pro-sol.cts.com APE, BIX: mdavis