Writing on shared texts
guy at sun.UUCP
guy at sun.UUCP
Tue Oct 28 04:53:57 AEST 1986
> To do this, just zero the inode pointer in the text table,
After having made *damn* sure you've caught all the code that assumes that
"x_iptr" is never null for a valid text table entry, and changed "xalloc"
not to use a null "x_iptr" as an indication of a free text table entry.
(You definitely have to do this with a non-paging S5R2; as I remember, that
code hadn't changed much since V7.)
> In the case of a system that doesn't load the entire binary at once
> (e.g. demand paging), it is much messier. There is still no problem
> in providing a clean copy of the new code for new execs, contrary to
> what Guy suggests - just "detach" the text structure as before.
Gee, I wasn't aware that I suggested that you can't do it even with the
changes you mention. My point was that *with the V7/4BSD/unpaged S5R2
implementation* there is a reason for forbidding writes to active shared
text files. Another possibility is to do what's done with NFS and kill the
process if it tries to fetch a page from the file and the file has been
written since the last time you looked at it.
--
Guy Harris
{ihnp4, decvax, seismo, decwrl, ...}!sun!guy
guy at sun.com (or guy at sun.arpa)
More information about the Comp.unix.wizards
mailing list