Leisner.Henr@xerox.com (Marty) (03/22/88)
I'm looking into a mechanism for sharing text on exec on Minix. It's relatively straightforward to save the inode/device for each execed file. Except short of leaving the file open (i.e. one file descriptor per execed process) how do you prohibit the file system from writing over that file? Any other good ways to uniquely identify files and be able to correctly identify whether the previously execed file is inconsistent with what is currently on disk? marty ARPA: leisner.henr@xerox.com GV: leisner.henr NS: martin leisner:henr801c:xerox UUCP: nsc!nscimg!amps!marty
blank%ucscd.UCSC.EDU@ucscc.ucsc.edu (John Weber) (03/22/88)
Marty <Leisner.Henr@xerox.com> writes: > I'm looking into a mechanism for sharing text on exec on Minix. > It's relatively straightforward to save the inode/device for each execed file. > Except short of leaving the file open (i.e. one file descriptor per execed > process) how do you prohibit the file system from writing over that file? > Any other good ways to uniquely identify files and be able to correctly identify > whether the previously execed file is inconsistent with what is currently on > disk? > marty > ARPA: leisner.henr@xerox.com > GV: leisner.henr > NS: martin leisner:henr801c:xerox > UUCP: nsc!nscimg!amps!marty > Seems to me that the simplest solution is to add a flag in the in core inode, i_incore, and set or reset it as necessary. The click offset of the beginning of the text segment could also be stored in the incore inode. This would solve both the "text busy" problem, and the location problem. +-----------------+-----------------------------------------------+ |',',',',','###_|'| John Weber, "Hey, what do I know? I just | |',',',','###_|','| work here..." | |',',','###_|','##| UUCP: ...!ucbvax!ucscc!ucscd!blank | |',','###_|','####| or !ucscc!ucscb!blank | |','###_|','######| ARPA: blank@ucscb.ucsc.edu | |'###_|','########| blank@ucscd.ucsc.edu | |##_|','##########| BITNET: blank%ucscd.BITNET | |_|','############| | +-----------------+-----------------------------------------------+
madd@bu-cs.BU.EDU (Jim Frost) (03/23/88)
In article <1669@louie.udel.EDU> Leisner.Henr@xerox.com (Marty) writes: >I'm looking into a mechanism for sharing text on exec on Minix. > >It's relatively straightforward to save the inode/device for each execed file. >Except short of leaving the file open (i.e. one file descriptor per execed >process) how do you prohibit the file system from writing over that file? > >Any other good ways to uniquely identify files and be able to correctly identify >whether the previously execed file is inconsistent with what is currently on >disk? One obvious way used on some systems is to use the timestamp in the executable, providing that it's there. This will work even if the original is overwritten while the old executable is running. Does MINIX put a timestamp in the executable? If not, an alternative method would be to build a timestamp from the modify date of the file. jim frost madd@bu-it.bu.edu