B
blmblm
the DLLS may be loaded, but the executable contains only symbolic
links into the DLL, those all have to be resolved and patched.
Well, you did say, in the post to which I was responding:
the DLLS may be loaded, but the executable contains only symbolic
links into the DLL, those all have to be resolved and patched.
DLLs used to share code and memory. Now they just share code.
You will notice how java.exe is more spritely if you have recently
used it.
That is because its DLLs are still hanging around in RAM and
don't have to be reloaded.
(e-mail address removed) sez:
Think of it as a graph: instead of a root (kernel) with
multiple leaf nodes (processes), you now have a root (kernel)
with multiple nodes where each node may be a leaf or a root
with multiple leafs (threads) underneath.
leaf children said:See Gordon's reply: address space remain shared until you tell
the OS otherwise. IPC via shared memory and semphores existed
before threads and you can use pipes and signals betwen threads.
So in practice your choice of communication mechanism is
independent of whether you use threads or processes.
It's more like system() -- it calls out to OS shell.
IIRC Sun's specs for that 24-way box say "48 threads". Dunno if
they're dual-core chips (one thread per core)...
Anyway, IBM's playstation chip -- the only multicore chip I know
of where "multi" > 2 -- does not have SMP cores, it's SIMD cores.
So threads are not going to work the same way on it, it'll need
a different programming model altogether.
Yeah, sure, but the devil is in the details. You need some way
to figure out how many threads to create: too few and you're
underutilizing your CPUs, too many and context switch times
eat up all the extra bang. A program that exploits 4 processors
won't run faster on 8-way box and will thrash a 2-way machine.
But something changed in a recent kernel -- 2.6 maybe? -- such that
"ps" doesn't show all those processes any more. ?
But, but, didn't you just say DLLs just share code, not memory ....
Well, I'm speculating on what might be on the horizon, more than
talking about what's possible now. Right now 2 cores per chip
may be the max, but the way I hear it, the chip designers are
considering more. No, it doesn't seem like something that would
scale up to more than some smallish number of cores, but -- 4? 8?
I think we're talking at cross-purposes here. I'll say again that
I'm speaking as someone whose experience with multiple threads
or processes is mostly from the parallel-programming world.
In that world, the well-known languages and libraries I can think
of divide pretty neatly into two camps -- shared-memory model
(threads sharing an address space and communicating/synchronizing
via various mechanisms) and distributed-memory model (processes
with separate address spaces communicating via message-passing).
Perhaps to someone with more of an o/s background the other
possibilities you mention are more common ....
Oh right. But -- couldn't you use this to start a second copy of
the JVM, and thus accomplish the goal of starting a second Java
process?
Yes, but it must be possible for programs (at least in some
environments) to detect the number of processors and start one
thread for each one -- that's how the OpenMP runtime library
works, if the "number of threads to create" environment variable
isn't set. That would seem like a sensible approach for other
multithreaded programs to take -- one thread per processor unless
the user specifies otherwise?
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.