UI not threaded?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

UI not threaded?

Greg Buchholz-4
    I notice that the system isn't responsive when something else is running (for example, while starting up an application like SqueakMap).  Can anyone point me in the direction of a document describing Squeak's theory of operation when it comes to threads and/or the user interface?  Is Squeak a cooperative multi-tasking system, or is the UI single threaded, or...?

Thanks,

Greg Buchholz





     
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: UI not threaded?

Bert Freudenberg
On 27.10.2008, at 20:05, Greg Buchholz wrote:

>    I notice that the system isn't responsive when something else is  
> running (for example, while starting up an application like  
> SqueakMap).  Can anyone point me in the direction of a document  
> describing Squeak's theory of operation when it comes to threads and/
> or the user interface?  Is Squeak a cooperative multi-tasking  
> system, or is the UI single threaded, or...?

Squeak provides pre-emptive multi-tasking, but the Morphic UI is  
single threaded.

E.g., UI apps could be made to do stuff in the background, but  
typically are not for simplicity reasons.

- Bert -


_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: UI not threaded?

Michael van der Gulik-2
In reply to this post by Greg Buchholz-4


On Tue, Oct 28, 2008 at 4:05 PM, Greg Buchholz <[hidden email]> wrote:
   I notice that the system isn't responsive when something else is running (for example, while starting up an application like SqueakMap).  Can anyone point me in the direction of a document describing Squeak's theory of operation when it comes to threads and/or the user interface?  Is Squeak a cooperative multi-tasking system, or is the UI single threaded, or...?


I don't know about documentation, but I can tell you what I know.

Smalltalk, the language rather than implementations, has good support for multitasking and is (in my opinion) one of the best languages for doing concurrent programming.

The Squeak VM unfortunately only runs on a single OS process. It can't use multiple CPU cores. I believe this is the case for all other available Smalltalk VMs except for GemStone?

The VM does simulate multiple "green threads". In your code, you can do:

[ some code ] fork.

Which will create another process to run "some code" in parallel. There are semaphores available for synchronisation and higher-level abstractions can be built. However, the scheduler that Squeak uses doesn't perform very well and code can easily be starved of CPU time.

Like Bert said, Morphic is, unfortunately, single-threaded.

Gulik.

--
http://people.squeakfoundation.org/person/mikevdg
http://gulik.pbwiki.com/

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners