threading and multicores, pros and cons
sjdevnull at yahoo.com
sjdevnull at yahoo.com
Wed Feb 14 18:14:39 EST 2007
On Feb 14, 4:37 pm, Paul Rubin <http://phr...@NOSPAM.invalid> wrote:
> "sjdevn... at yahoo.com" <sjdevn... at yahoo.com> writes:
> > Java has historically had no support at all for real multiple process
> > solutions (akin to fork() or ZwCreateProcess() with NULL
> > SectionHandle), which should make up the vast majority of parallel
> > programs (basically all of those except where you don't want memory
> > protection).
>
> I don't know what ZwCreateProcess is (sounds like a Windows-ism)
Yeah, it's the Window equivalent to fork. Does true copy-on-write, so
you can do efficient multiprocess work.
> but I
> remember using popen() under Java 1.1 in Solaris. That at least
> allows launching a new process and communicating with it.
Yep. That's okay for limited kinds of applications.
> I don't know if there was anything like mmap.
That would be important as well.
> I think this is mostly a
> question of library functions--you could certainly write JNI
> extensions for that stuff.
Sure. If you're writing extensions you can work around the GIL, too.
> > Has this changed in recent Java releases? Is there a way to use
> > efficient copy-on-write multiprocess architectures?
>
> I do think they've been adding more stuff for parallelism in general.
Up through 1.3/1.4 or so they were pretty staunchly in the "threads
for everything!" camp, but they've added a select/poll-style call a
couple versions back. That was a pretty big sticking point previously.
More information about the Python-list
mailing list