home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!olivea!decwrl!pa.dec.com!nntpd2.cxo.dec.com!nabeth!alan
- From: alan@nabeth.enet.dec.com (Alan Rollow - Alan's Home for Wayward Tumbleweeds.)
- Newsgroups: comp.unix.questions
- Subject: Re: Read/Write and caching, for TEMPEST
- Message-ID: <1992Jul23.182124.28084@nntpd2.cxo.dec.com>
- Date: 23 Jul 92 18:21:24 GMT
- References: <RHL.92Jul17094825@valhalla.mitre>
- Sender: alan@nabeth (Alan Rollow - Alan's Home for Wayward Tumbleweeds.)
- Reply-To: alan@nabeth.enet.dec.com (Alan Rollow - Alan's Home for Wayward Tumbleweeds.)
- Organization: Digital Equipment Corporation
- Lines: 35
-
-
- In article <RHL.92Jul17094825@valhalla.mitre>, rhl@valhalla.mitre.org writes:
- >
- >1) Is there a way to force it to physically read the disk
- >every time without caching?
-
- Yes. Unmount the file system between reads. Since that will
- be extraordinarly inconvient, you might just try reading the
- disk directly, rather than going through the file system.
-
- >
- >2) Would I have the same problem with writing? If I loop and
- >continuously write 1 sector of data, making sure I fseek to the
- >beginning of the file every time, will it physically write the data to
- >the disk every time if the data doesn't change?
-
- Probably not, but it depends on the system, the hardware configuration,
- and the policy of merging writes. A system that does write merging won't
- write the sector until update calls sync(2). A system with a non-volitile
- fast write cache, may not write the sector at all until the cache is
- flushed (Prestoserve (tm)). If the system supports the O_FSYNC flag
- on open, then it's likely that every sector will go to disk if there
- isn't any interesting hardware in the way.
-
- Once again, it may be easier to write directly to the disk.
-
- >
- >3)Can I be guaranteed that 'testfile' will be located at the same sector
- >every time?
-
- If you're the only process on that file system I'd expect that it would,
- but I'd check directly with the vendor to see if they can GUARANTEE it.
- >
- --
- Alan Rollow alan@nabeth.cxo.dec.com
-