In the below please replace eval() with exec().
On Wednesday, July 16, 2003, at 06:04 PM, Shawn Corey wrote:
Hi,
As far as I know, fork re-uses the same program image; that's what the sticky bit is all about (see man 2 chmod). It does re-create the data image for an new program. This leads to the confusion I've been having; how can you create a thread that's not perl? Perl (OK, advance perl implementations) allows threads but these threads must be within the same perl program. A thread that runs another program/script is a fork. A thread runs the same program image with the same data image. Forks (processes) run a different program image and a different (necessary) data image. I see no advantage in creating a thread that loads a different process. Calling fork() and eval() is more understandable than threading then eval(). Could someone clear up my confusion?
On Wednesday, July 16, 2003, at 04:37 PM, Dan Sugalski wrote:
At 1:15 PM -0700 7/16/03, Rich Morin wrote:At 8:33 PM +0100 7/16/03, David Cantrell wrote:As far as the program is concerned, it's a complete copy. But yes, most modern virtual memory implementations will, I believe, do copy on write. I haven't actually tested this on OS X though :-)
OK, I'm curious; how _would_ one go about testing this?
The easiest way to do so is to snag the Darwin source and take a look at some of the low-level MMU manipulation code in the kernel. It should be pretty obvious whether (though not necessarily how :) it's done.
--
Dan
--------------------------------------"it's like this"-------------------
Dan Sugalski even samurai
[EMAIL PROTECTED] have teddy bears and even
teddy bears get drunk
Mr. Shawn Corey, B.Sc. President Corey Consultants Inc. (613) 823-4132 http://www.magma.ca/~shawn/ mailto:[EMAIL PROTECTED]
Perl: You have to love a language that lets you bless your thingy.
Mr. Shawn Corey, B.Sc. President Corey Consultants Inc. (613) 823-4132 http://www.magma.ca/~shawn/ mailto:[EMAIL PROTECTED]
Perl: You have to love a language that lets you bless your thingy.