💾 Archived View for mirrors.apple2.org.za › archive › apple.cabi.net › FAQs.and.INFO › GSOS › gsos.c… captured on 2023-03-20 at 22:50:15.

View Raw

More Information

⬅️ Previous capture (2023-01-29)

-=-=-=-=-=-=-

Newsgroups: comp.sys.apple2
Path: news.weeg.uiowa.edu!news.uiowa.edu!hobbes.physics.uiowa.edu!zaphod.mps.ohio-state.edu!wupost!cs.utexas.edu!uunet!decwrl!apple!mumbo.apple.com!gallant.apple.com!kip2-58.apple.com!user
From: mattd@apple.com (Matt Deatherage)
Subject: Re: RamFAST & GS/OS cache
Sender: news@gallant.apple.com
Message-ID: <mattd-251192182232@kip2-58.apple.com>
Date: Thu, 26 Nov 1992 02:30:20 GMT
References: <fmlin.2bnm@terapin.com> <1992Nov24.071645.9523@actrix.gen.nz> <1et4i7INNht6@gap.caltech.edu> <74677@apple.apple.COM>
Organization: Developer Technical Support, Apple Computer, Inc.
Followup-To: comp.sys.apple2
Lines: 47

Dave's already come and corrected a lot of the garbage in this thread, but
it _never_ ceases to amaze me how people I usually respect and admire can
throw garbage around like it was fact -- when it comes to the GS/OS cache.
More intelligent people have more stupid ideas about this one piece of
software than anything else I've ever seen.  There have been some good
facts in here, but it's hard to pick them out from the rest of it.

I wrote an article nearly three years ago for _develop_ explaining how the
cache works; it was published in _develop_ #2.  It's been on every
Developer
CD since April 1990.  If you want to know how things work, go read the
article.

Drew's current driver is 100% correct to not use the cache at all.  If it's
faster to return information from the media than to search the cache and
copy it, there's no reason to use caching.  The RamFAST driver doesn't
use caching for this very reason.  To suggest that it should be changed
due to some mystical belief that GS/OS's cache knows better than an
individual device driver is misinformed at best.

Someone said the Apple SCSI card doesn't cache at all.  Rubbish.  It uses
the GS/OS cache like other drivers.  Not having an onboard cache, this
makes the most sense for the driver.

Todd suggested that FSTs should read cache memory directly; this is a bad
idea.  Dave is right on target -- if that happened, devices wouldn't have
a way to detect media swaps and flush the cache, and you could get blocks
belonging to a disk you ejected a while back.  Drivers can't notice disks
are ejected until someone calls the driver and gives it code time -- right
now, they get that on every read call and the driver manages the cache.
That's why it works.

Similarly, the comment that GS/OS caches "everything" or "directories" is
also rubbish.  An FST asks a driver to cache things it thinks it might
want again but doesn't want to keep around -- or things that an application
requests are cached.  The driver can then decide whether it's smart to
cache those things or not.

There's good background in the article "Demystifying the GS/OS Cache" in
_develop_ #2.  If you have questions, please dig it out and read it.

============================================================================
Matt Deatherage, Developer Support Center, Apple Computer, Inc.
Personal mail only -- please POST technical questions, questions about
Apple and its policies, where to find documents and related inquiries.
The opinions I express don't represent Apple, which makes us both happy.
============================================================================