[techtalk] request for ideas

Laurel Fan lf25+ at andrew.cmu.edu
Mon Oct 11 18:48:58 EST 1999


Excerpts from linuxchix: 11-Oct-99 Re: [techtalk] request for .. by R
Pickett at hayseed.net 
> I can see a scenario where 'dir a:' coughed up the incorrect information
> from the cache, and therefore lead to user error that caused the loss of
> data.

It is possible for a cache to cause misplaced data:

Floppy x is in the drive.
Attempt to read block n from floppy x:
  Cache miss, block n from floppy x cached.
  Read block n from cache.

User switches floppy x and floppy y, and OS doesn't notice media change.

Attempt write block n:
  Cache hit.
  Write to block n in cache.

And later... 

Write cache back:
  write block n in cache (which was originally from floppy x) to block n
in floppy y.
Oops.

If the OS had noticed the media change, it would have flushed the cache
and this couldn't have happend.

A similar user error can also occur if the media changes from under you,
but you will have the protection of having to open the file for write,
which won't work if the directory structures are different, while a
write to a block will always work. 

************
techtalk at linuxchix.org   http://www.linuxchix.org




More information about the Techtalk mailing list