I have been using Clozure (ccl) on Linux (core 2 duo) and OS X (core 2 duo)

My observations are:* On Linux, Clozure uses one core maximally and doest not really use the other one. (Occasionally, it switches cores, but it just uses one at a time)* On OS X, both cores are used for about 50%.

Because Clozure lets the OS schedule threads, the above is reasonable.

But it seems to me that Clozure can use, at most, the CPU resource that is equivalent to one core. I know MCL has this restriction of CPU usage on multi-CPU machines. I am wondering if Clozure has a similar restriction.

I am considering buying a Mac Pro. If there is this restriction, I would go for higher CPU frequency rather than more cores.

The code below consistently uses about 140% cpu on a core2 duo machine (i.e., two cores). I have other code which does GUI drawing in addition to processor intensive things on other threads that regularly gets near 200% cpu on a dual core machine. IOW, CCL under Mac OS X 10.5 and 10.6 has no problem using all the available cpu resources, as long as you write code that does that.

Call this by doing (for example):(cpu-maxer 10)

which will spawn 6 threads each running a slightly randomized takeuchi benchmark for 10 seconds, after which these 6 threads will be killed.

That is correct. No matter the language, a program must have at least 1 OS thread per core you want it to use in parallel.

Regarding frequency versus cores, some classic computer architecture papers prove that, all else equal, it is better to have one massive fast CPU than many smaller networked CPUs. However, CPU designers have hit a wall; so they've returned to multicore processors, and we may never go back.

Maxxum wrote:BTW, are the following about the same CPU power?* ONE core from a 2.26GHz Quad-Core Xeon* ONE core from a 2.26GHz Core 2 Duo

Depends highly on the models of each because of cache size, microarchitecture, etc. Generally, a latest-gen Xeon family will be faster than a latest-gen Core 2 Duo family, but "Xeon" and "Core 2 Duo" cover a lot of ground as far as Intel processors go.

When using other systems, note that you can't always take advantage of true parallelism on multiprocessor machines, even when OS-level threading is available.

While Clozure, SBCL, and probably most other Common Lisps supporting threads support true parallelism on compatible machines, it is not always the case for VMs in general. For example, CPython spawns OS-level threads, but protects the interpreter with a global interpreter lock, meaning that only one thread may execute Python code at a time. You can still have other threads waiting on I/O, and still have preemption on the Python level, which makes web servers like Zope practical, but you need to use multiple processes if you want true parallelism.

Ruby has a similar model to Python. There are multiple threads, but only one can run at a time. They are good for saving state in the call stack, but not for doing simultaneous processing on a SMP machine.