[comp.sys.amiga] Facc From ASDG

cjp@vax135.UUCP (Charles Poirier) (06/13/87)

(I mailed this to Perry at the well but getting no reply...)

What I want is a DISK cache.  Facc?  That is a DRIVE cache.  Pop out
the disk for any reason, and all those lovely buffers are invalidated.
For people having only one drive, and even for me with two, it's an
all-too-common occurrance to have to drag in a program from elsewhere
than the mounted disk(s).

It would be nice if the cacher remembered my disk names.  It would
remember any disk for which all buffers had not been expired, and
recognize it next time it showed up, regardless of which drive it
showed up in.  Those buffers should still be valid when I pop the disk
back in.  This is what you need for a true disk cache.

Yeah I know, you need some optional escapes to keep from getting burned
over a couple of cases.  Say, same-name but distinct disks.  I think
this can be handled.  If nothing else, there is a relatively unique
disk-id field somewhere on each disk (so I am told).  Say, I take the
disk out, put it in my *second* Amiga ( ;-) ), and change it, then bring
it back.  So you put an escape button in the cacher's window for "new disk".

How hard can this be?  Maybe it is hard, I wouldn't know.  I'm
surprised no one has suggested this before.  Anyone care to second the
motion?

-- 
	Charles Poirier   (decvax,ucbvax,ihnp4,attmail)!vax135!cjp

	"The road to Hell is paved with good opinions."

richc@madvax.UUCP (06/15/87)

> What I want is a DISK cache.  Facc?  That is a DRIVE cache.  Pop out
> the disk for any reason, and all those lovely buffers are invalidated.
> For people having only one drive, and even for me with two, it's an
> all-too-common occurrance to have to drag in a program from elsewhere
> than the mounted disk(s).

	I think there are enough ways to get into trouble with caching
	drives that it should be made an option for the advanced user.
	If the user KNOWS that nothing has changed then he can elect to
	restore the buffers and take his risks.  The default should
	remain as a DISK cache.

-- 
-- 
Rich Commins   (415)939-2400				          \  /\
Varian Instruments, 2700 Mitchell Drive, Walnut Creek, CA 94598    \/--\
{ptsfa,lll-crg,zehntel,dual,amd,fortune,ista,rtech,csi,normac}varian!richc

spencer@eris.UUCP (06/20/87)

In article <587@madvax.UUCP> richc@madvax.UUCP (Rich Commins) writes:
>> What I want is a DISK cache.  Facc?  That is a DRIVE cache.  Pop out
>> the disk for any reason, and all those lovely buffers are invalidated.
>> For people having only one drive, and even for me with two, it's an
>> all-too-common occurrance to have to drag in a program from elsewhere
>> than the mounted disk(s).
>
>	I think there are enough ways to get into trouble with caching
>	drives that it should be made an option for the advanced user.
>	If the user KNOWS that nothing has changed then he can elect to
>	restore the buffers and take his risks.  The default should
>	remain as a DISK cache.
>Rich Commins   (415)939-2400				          \  /\

Actually, the little magic cookie that lets the computer tell the difference
between disks is the last write date on the disk.  So, if I change the
disk in my other Amiga, the write date on the disk changes, and when I put
it back in my first Amiga the "disk" cache would think it was a different
disk and invalidate the old tracks (or at least not use them for this disk).

(...I think).
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Randy Spencer      P.O. Box 4542   Berkeley  CA  94704        (415)284-4740 
                         I N F I N I T Y                 BBS: (415)283-5469
Now working for          |||||||||||::::... . .                    BUD-LINX
But in no way            |||||||||||||||::::.. .. .
Officially representing  ||||||||||||:::::... ..    ....ucbvax!mica!spencer
                         s o f t w a r e          spencer@mica.berkeley.edu
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

cjp@vax135.UUCP (Charles Poirier) (06/22/87)

In article <4024@jade.BERKELEY.EDU> spencer@eris.BERKELEY.EDU (Randy Spencer) writes:
>>> What I want is a DISK cache.  Facc?  That is a DRIVE cache.  Pop out
>>> the disk for any reason, and all those lovely buffers are invalidated.
>
>Actually, the little magic cookie that lets the computer tell the difference
>between disks is the last write date on the disk.  So, if I change the
>disk in my other Amiga, the write date on the disk changes, and when I put
>it back in my first Amiga the "disk" cache would think it was a different
>disk and invalidate the old tracks (or at least not use them for this disk).

It would work if all Amigas had a consistent idea of what time it is.
But many Amigas have no clock.  (And "We don' need no Steeenkin' Setdate!"
seems to be a pretty common attitude.)

For me, I don't worry about this problem because I have no second
Amiga.  But I can understand why one might want to avoid staking the
company reputation on the impossibility of this happening.  Computing
novices could possibly get burned.  I'd be satisfied to have a
non-automatic option to (say) Facc which allows one to say "I guarantee
that Disk-named-so-and-so will never be changed if I should remove it
from the machine temporarily."  Of course, to do this one would have to
put (say) Facc somewhere in the system that knows volume names rather
than just drive numbers.  But I daresay it can be done.

-- 
	Charles Poirier   (decvax,ucbvax,ihnp4,attmail)!vax135!cjp

   "Docking complete...       Docking complete...       Docking complete..."

spencer@eris.BERKELEY.EDU (Randy Spencer) (06/24/87)

In article <1803@vax135.UUCP> cjp@vax135.UUCP (Charles Poirier) writes:
>In article <4024@jade.BERKELEY.EDU> spencer@eris.BERKELEY.EDU (Randy Spencer) writes:
>>>> What I want is a DISK cache.  Facc?  That is a DRIVE cache.  Pop out
>>>> the disk for any reason, and all those lovely buffers are invalidated.
>>
>>Actually, the little magic cookie that lets the computer tell the difference
>>between disks is the last write date on the disk.  So, if I change the
>>disk in my other Amiga, the write date on the disk changes, and when I put
>>it back in my first Amiga the "disk" cache would think it was a different
>>disk and invalidate the old tracks (or at least not use them for this disk).
>
>It would work if all Amigas had a consistent idea of what time it is.
>But many Amigas have no clock.  (And "We don' need no Steeenkin' Setdate!"
>seems to be a pretty common attitude.)
>
>	Charles Poirier   (decvax,ucbvax,ihnp4,attmail)!vax135!cjp

No, you don't understand.  If I have two disks that I copied with
Quickcopy or Marauder, they are *identical*.  The reason that that is
so is the date they were last modified is the same, down to the
milisecond (I guess), so if I boot with one disk, pull it out and put
in the other disk the system will not know the difference.  But if I
write to one disk (or delete, or in any manor change the disk) the
date gets changed, ** and it doesn't matter what it gets changed to **,
but it is different, and at that point the disk would look different
from the first disk to the Amiga.  Boot with one and try to put in the
other one, issue a command and it will ask for the first one again.

     So, we put in our boot disk and run the disk cache.  Some of our
stuff is saved to ram, the stuff that we access often. 

     Then we take out the disk and put in another one, and some of
that gets put in its own disk cache (we still have lots of ram). 

     We put back in the first disk and issue a previous command and
boom!  It runs out of our disk cache and didn't even access the disk. 

     The we put in a third disk which gets is own cache while we take
the first disk out for the second time and place it in another
machine.  When we take it out there delete a file or write a new file. 

     We take that disk and put it into our first machine.  Even though
the disk name is the same, and the disk is really the same disk, the
system looks at it as a different disk.  We cannot pretend that it is
the system disk anymore.  In that same way the disk cache program
thinks of it as a new disk and starts up a NEW cache for it (we are
starting to run out of ram).  If we issue a command from before it
will run it out of the ram cache for the system disk, if its in there,
but otherwise it will not find the disk (and will put up a requester
for it).

  Oh, no, I am talking out of my hat again, I have not tried any of
this, but it seems logical to me.  Well, that will give me something
to do at work tomorrow!
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Randy Spencer      P.O. Box 4542   Berkeley  CA  94704        (415)284-4740 
                         I N F I N I T Y                 BBS: (415)283-5469
Now working for          |||||||||||::::... . .                    BUD-LINX
But in no way            |||||||||||||||::::.. .. .
Officially representing  ||||||||||||:::::... ..    ....ucbvax!mica!spencer
                         s o f t w a r e          spencer@mica.berkeley.edu
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

peter@sugar.UUCP (Peter DaSilva) (06/27/87)

>So, if I change the
>disk in my other Amiga, the write date on the disk changes, and when I put
>it back in my first Amiga the "disk" cache would think it was a different
>disk and invalidate the old tracks (or at least not use them for this disk).

Which is what you want to happen. If you write to the disk there's no way of
knowing whether any of the buffered tracks are good or not so you have to
invalidate them anyway.

This would therefore be perfectly safe, albeit less than perfectly efficient.