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

  1. Path: sparky!uunet!mcsun!fuug!demos!kiae!glas!demos!valhalla.mitre.org!rhl
  2. From: rhl@valhalla.mitre.org
  3. Newsgroups: comp.unix.questions
  4. Date: 17 Jul 92 18:48 MDT
  5. Subject: Read/Write and caching, for TEMPEST
  6. Sender: Notesfile to Usenet Gateway <notes@glas.apc.org>
  7. Message-ID: <RHL.92Jul17094825@valhalla.mitre>
  8. Nf-ID: #N:RHL.92Jul17094825@valhalla.mitre:-124544822:001:1429
  9. Nf-From: valhalla.mitre.org!rhl    Jul 17 18:48:00 1992
  10. Lines: 35
  11.  
  12.  
  13.  
  14. I'm writing some test software to exercise a system for TEMPEST
  15. certification (where they see if spies can pick up the broadcast
  16. radiation) and I need to be able to continuously read and write to a
  17. single sector on a hard disk.
  18.  
  19. 1)  As far as reading, I'm pretty sure that if I just go into a loop
  20. and read a 1 sector file Unix will cache the data and only "read" the
  21. disk once.  Is there a way to force it to physically read the disk
  22. every time without caching?
  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. 3)  On a related topic, if I use a simple C-Shell command like...
  30.         while (1)
  31.           echo $data > testfile
  32.         end
  33. Can I be guaranteed that 'testfile' will be located at the same sector
  34. every time? 
  35.  
  36.  
  37. I'm using C and C-Shell to implement this.  It must run on both a
  38. System V based unix and/or SunOS 4.1.
  39.  
  40. --
  41.  \_____   \__ \__  \__     |  Roger H. Lincoln      | "We came in peace      |
  42.  \__ \__  \__ \__  \__     |  MITRE Corp.           |   for all Mankind"     |
  43.  \_____   \______  \__     |  Bedford, MA           | But all we got were    |
  44.  \__ \__  \__ \__  \_____  |  C3I Division          |   these lousy T-Shirts |
  45.  \__  \__ \__ \__  \_____  |  Mission Planning Sys  |                        |
  46.  
  47.