[MLton] Multicore CPU's and MLton
Wed, 6 Jul 2005 00:15:49 -0700
> It is highly application dependent whether processes or threads are
> better, in fact complex applications may need BOTH.
Agreed. I didn't mean to rule out concurrent processes + threads
within a process. The question was whether there was a need for
*concurrent* threads within a process, given that one can already take
advantage of multi-core (or SMP) using concurrent processes. I can't
tell for sure, but the telco application you describe seems to be of
the concurrent process + non-concurrent thread variety. And MLton
supports that model fine.
> What I am trying to say here is that 'abstract' considerations of
> whether 'threads' or 'processes' are the way to go miss the point --
> many real world applications have to use BOTH: it isn't a 'this way
> or that way' issue: performance demands threads, and scalability
> demands processes.
Again, I'm not clear if you're arguing for concurrent threads or just
> If I had to generalise I'd say that mutable data bases present an
> example where processes are useless: there's no choice but to use
> threads with shared memory to obtain cache coherence, and clearly
> performance dictates using hardware threads that can be distributed
> between multiple CPUs in the same box.. as well as microthreads to
> service the actual user requests within each hardware thread: you
> really HAVE to do both.
OK, here you seem to be arguing for concurrent threads.
Unfortunately, I don't follow the argument (and don't know much about
database implementation), but that may just be due to lack of
knowledge on my part.