The Artima Developer Community
Sponsored Link

Agile Buzz Forum
Multiple Processes, not Multiple Threads

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
James Robertson

Posts: 29924
Nickname: jarober61
Registered: Jun, 2003

David Buck, Smalltalker at large
Multiple Processes, not Multiple Threads Posted: Jan 31, 2007 6:04 PM
Reply to this message Reply

This post originated from an RSS feed registered with Agile Buzz by James Robertson.
Original Post: Multiple Processes, not Multiple Threads
Feed Title: Cincom Smalltalk Blog - Smalltalk with Rants
Feed URL: http://www.cincomsmalltalk.com/rssBlog/rssBlogView.xml
Feed Description: James Robertson comments on Cincom Smalltalk, the Smalltalk development community, and IT trends and issues in general.
Latest Agile Buzz Posts
Latest Agile Buzz Posts by James Robertson
Latest Posts From Cincom Smalltalk Blog - Smalltalk with Rants

Advertisement

Runar Jordahl read the paper I pointed to this morning, and drew the same conclusion as the author of that paper did:

As discussed here, native threads are based on shared state. In the discussion, threads are (correctly) defined as “shared-state concurrency”, while processes are “threads without shared state”. The problem with threads is that the shared memory is modified non-deterministic. Since threads run in parallel and each thread might be scheduled differently per execution, every execution of the program tends to produce different intermediate results. This means the danger of deadlock or other side effects are not easily detected through testing. Reproducing a problem can be impossible. Contrast this with the green thread model used in most Smalltalk images: With green threads the program runs deterministic.
Running multiple Smalltalk images basically means running multiple processes. The processes will not share data directly in memory. (VisualWorks images can share static data, but that is another story. Of course, this cannot lead to the discussed problems.) An implementation using a divide and conquer algorithm with multiple images can also easily be designed to run deterministic. Testing, debugging, and understanding such a setup will be a lot easier than a (native) thread implementation.

I've been explaining this to people who want multi-threaded Cincom Smalltalk VM's for a long, long time now - the end result of that wish would be a less stable VM that had subtle bugs. A better answer: use multiple images and interprocess communication (such as Opentalk) to get the job done.

Technorati Tags: , ,

Read: Multiple Processes, not Multiple Threads

Topic: MS backs off on the inspector patent Previous Topic   Next Topic Topic: Wages of a stupid lawsuit

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use