home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / unix / question / 9350 < prev    next >
Encoding:
Internet Message Format  |  1992-07-23  |  2.0 KB

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