native threads

David T. Lewis lewis at mail.msen.com
Fri Apr 15 00:40:01 UTC 2005


On Thu, Apr 14, 2005 at 08:40:45PM +0100, Darren Hobbs wrote:
> I think the next release of Visual Works will have the cabability for
> two images to share the same perm. space, which should reduce the
> incremental cost of starting multiple VM's.  Would it be possible to
> do something similar in Squeak?
> 
> On 4/14/05, Cees de Groot <cg at cdegroot.com> wrote:
> > As I said before, VW has native MT support, but I never had the guts to
> > switch it on. Just ran two images...

I don't know what VisualWorks is doing WRT sharing perm space, but for
what it's worth Squeak can be amazingly fast at starting images in
some circumstances. Try "UnixProcess forkHeadlessSqueakAndDo: [something]"
to see how quick it is. This is platform dependent and hence not in
line with Squeak goals (also requires OSProcess from SqueakMap), but
it shows what is possible.

This shares all of the object memory initially, and as time goes on
the two object memories start using their own memory. It does not
share any of the object space permanently, but it does a very fast
image startup (by bypassing the image startup), and in cases where
the forked Squeak does not diverge much from its parent (e.g. a small
amount of work performed in the child before it exits), it uses very
little memory beyond that of the parent Squeak.

Dave




More information about the Squeak-dev mailing list