Two Programming Questions
Conor P. Cahill
cpcahil at virtech.uucp
Wed Aug 29 22:15:52 AEST 1990
In article <1990Aug28.221823.3897 at chinet.chi.il.us> les at chinet.chi.il.us (Leslie Mikesell) writes:
>In article <1990Aug27.230044.13699 at virtech.uucp> cpcahil at virtech.UUCP (Conor P. Cahill) writes:
>
>>>just forget about using shared memory and use a real file with file
>>>locking instead. If it is being constantly accessed, it will be in
>>>memory anyway.
A. I didn't write that. (be sure you attribute quotes of articles
correctly).
>I've considered opening a real file mapped against the shared memory
>just to be able to use the file locking routines to arbitrate
>access (i.e. lock the file region but access the memory segment
>instead). Does anyone know how this would work performance-wise
>compared to any reasonable alternatives?
There should be no significant performance problems with doing this (although
you code will have to be careful to implement your semantics). Locking an
area of the file does not require that the file data area be read from
disk and therefore will not cause any disk i/o and it doesn't cause
an update to the inode.
--
Conor P. Cahill (703)430-9247 Virtual Technologies, Inc.,
uunet!virtech!cpcahil 46030 Manekin Plaza, Suite 160
Sterling, VA 22170
More information about the Comp.unix.i386
mailing list