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