Send to Printer

smalltalk

Smalltalk and Multiple CPUs

October 24, 2010 7:43:01.000

There's a new framework in Cincom's Smalltalk that allows you to take advantage of multiple CPUs or cores - polycephaly. There's an interesting write up over on the CST website, which comes from the ObjectStudio team:

Polycephaly allows the user to spawn new copies of your ObjectStudio VM and image. Since Windows sees these new copies as separate programs, it can schedule them on any available CPU. One use of Polycephaly could be to connect to different web services at the same time and read some data. We currently use Polycephaly to run our SUnit test suite.

Follow the link for some code you can experiment with.

Technorati Tags:

posted by James Robertson

Comments

Re: Smalltalk and Multiple CPUs

[Pete F] October 27, 2010 7:57:06.277

I'm tempted to say

"polycephaly is as useful as the name is catchy"

..but that is a bit unfair. This kind of technique has its place, its a start, and the isolation makes it hard for programmers to screw up.

Polycephaly does however have something of a "stacking a few deck-chairs up on top of eachother on the deck of the titanic" feel to it.

The approach that Dave Buck talked about on industry misinterpretations ages ago sounded more interesting -i may be wrong but i thought he was proposing multiple images, each on its own thread, in one process (which is what hydra does -no?). This way you at least avoid paying inter-process costs.

But even then, I can't see how Cincom can avoid biting the bullet and producing a free-threaded VM and the libraries to go along with it.

What puzzles me about polycephaly is the incredibly inappropriate example suggested:

>>One use of Polycephaly could be to connect to different web services at the same time and read some data. <<

..a non cpu-bound operation like that is where green threads make sense -and I think Arden conceded as much in a presentation at esug (?). A classical "map reduce" job would be a much better example of what polycephaly can do..

 Share Tweet This