[vwnc] 64-bit and multicore VW smalltalk

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

[vwnc] 64-bit and multicore VW smalltalk

powernetfreak@surfeu.de
Hello,

i  have two questions concerning cincom VisualWorks smalltalk.

- Is it possible to write a 64-Bit VW smalltalk program that runs
under Windows Vista 64-Bit in a 64-Bit mode?
 I read that cincom smalltalk supports Linux and Solaris 64-Bit but i
didnt read sth about Microsoft's 64-Bit OS.


-Is there an effective way to program on mutlicore CPUs (like for
example Intel's Dual Core).
 I want to change a serial program as easy as possible to run faster
on a multicore CPU with using parallel programming.

I hope that sb can help me.
Thanks.

greetings,

peter


Jetzt neu: Der Routenplaner von Tiscali
http://www.tiscali.de/trav/routenplaner.html

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] 64-bit and multicore VW smalltalk

Runar Jordahl
Cincom has not yet made a supported 64 bit version running under
Windows. However, if you are a paying customer and really need this, I
think they might consider doing it. Remember that a 64 bit image (or
any program for that matter) consumes more memory, as pointers are
larger than in 32 bit images.

A VisualWorks image runs on only one OS thread, and the chances for
this to change in the near future are minimal. In fact not everybody
agrees that this is the way Smalltalk should scale on multiple cores.
Your current approach would be to fork of several worker images, as
described in the article linked to below. This will fit nicely if you
can use divide and conquer to solve your problem.

http://www.cincomsmalltalk.com/userblogs/runarj/blogView?showComments=true&entry=3348279474

Runar Jordahl
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] 64-bit and multicore VW smalltalk

powernetfreak@surfeu.de
In reply to this post by powernetfreak@surfeu.de
Hello,

thanks for your fast answer.

so there is no way to create data parallelism. I mean to parallelize a
"loop" which do always the same on different data?

thanks.

greetings, peter


>----Ursprüngliche Nachricht----
>Von: [hidden email]
>Datum: 14.04.2008 13:56
>An: "[hidden email]"<[hidden email]>
>Cc: <[hidden email]>
>Betreff: Re: [vwnc] 64-bit and multicore VW smalltalk
>
>Cincom has not yet made a supported 64 bit version running under
>Windows. However, if you are a paying customer and really need this,
I

>think they might consider doing it. Remember that a 64 bit image (or
>any program for that matter) consumes more memory, as pointers are
>larger than in 32 bit images.
>
>A VisualWorks image runs on only one OS thread, and the chances for
>this to change in the near future are minimal. In fact not everybody
>agrees that this is the way Smalltalk should scale on multiple cores.
>Your current approach would be to fork of several worker images, as
>described in the article linked to below. This will fit nicely if you
>can use divide and conquer to solve your problem.
>
>http://www.cincomsmalltalk.com/userblogs/runarj/blogView?
showComments=true&entry=3348279474
>
>Runar Jordahl
>



Jetzt neu: Der Routenplaner von Tiscali
http://www.tiscali.de/trav/routenplaner.html


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] 64-bit and multicore VW smalltalk

Runar Jordahl
There are two different approaches to make a program parallel:

- Shared data (domain object) between multiple running threads. Use
coordinating mechanisms like semaphores etc
(http://blog.w-nz.com/archives/2006/03/02/locks/).

- No shared data. All data accessed by a thread is private to the
thread. This means data must be copied between the threads.

Intuitively, most programmers will go for the "share data" approach.
Java and C# includes mechanism to do this. VisualWorks does not. This
approach does however have problems. Getting the coordination correct
can be tricky, testing it is even worse
(http://www.eecs.berkeley.edu/Pubs/TechRpts/2006/EECS-2006-1.pdf).
Another problem is that once you want to scale beyond the number of
cores on a single box your model breaks.

When data is not shared, you make copy of the data passed to the
various threads. Erlang -- as far as I understand -- uses this
approach. In VisualWorks, this means copying data between images.
There are many ways to do this. I had a problem that took minutes and
even hours to run. In this case using the database was fast enough.
The file system, or inter-process communication can also be used. This
method has of course some overhead, so tasks that initially execute
under a second, will probably not benefit.

You will need to rewrite your loop to send each data element to
another image for computation. Then the parent image will wait for the
other images to finish their work, and maybe aggrgate the results.

Runar Jordahl
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] 64-bit and multicore VW smalltalk

powernetfreak@surfeu.de
In reply to this post by powernetfreak@surfeu.de
hello,

thanks alot for ur information.

king regards,

peter

>----Ursprüngliche Nachricht----
>Von: [hidden email]
>Datum: 14.04.2008 14:22
>An: "[hidden email]"<[hidden email]>
>Cc: <[hidden email]>
>Betreff: Re: Re: [vwnc] 64-bit and multicore VW smalltalk
>
>There are two different approaches to make a program parallel:
>
>- Shared data (domain object) between multiple running threads. Use
>coordinating mechanisms like semaphores etc
>(http://blog.w-nz.com/archives/2006/03/02/locks/).
>
>- No shared data. All data accessed by a thread is private to the
>thread. This means data must be copied between the threads.
>
>Intuitively, most programmers will go for the "share data" approach.
>Java and C# includes mechanism to do this. VisualWorks does not. This
>approach does however have problems. Getting the coordination correct
>can be tricky, testing it is even worse
>(http://www.eecs.berkeley.edu/Pubs/TechRpts/2006/EECS-2006-1.pdf).
>Another problem is that once you want to scale beyond the number of
>cores on a single box your model breaks.
>
>When data is not shared, you make copy of the data passed to the
>various threads. Erlang -- as far as I understand -- uses this
>approach. In VisualWorks, this means copying data between images.
>There are many ways to do this. I had a problem that took minutes and
>even hours to run. In this case using the database was fast enough.
>The file system, or inter-process communication can also be used.
This
>method has of course some overhead, so tasks that initially execute
>under a second, will probably not benefit.
>
>You will need to rewrite your loop to send each data element to
>another image for computation. Then the parent image will wait for
the
>other images to finish their work, and maybe aggrgate the results.
>
>Runar Jordahl
>



Jetzt neu: Der Routenplaner von Tiscali
http://www.tiscali.de/trav/routenplaner.html


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] 64-bit and multicore VW smalltalk

James Robertson-7
In reply to this post by powernetfreak@surfeu.de
We do not yet have a 64 bit VM for Windows, but the 32 bit platform  
should work on such systems.  We do plan to support 64 bit Windows,  
but it's not scheduled yet.

James Robertson
http://www.cincomsmalltalk.com/blog/blogView
Talk Small and Carry a Big Class Library



On Apr 14, 2008, at 7:03 AM, [hidden email] wrote:

> Hello,
>
> i  have two questions concerning cincom VisualWorks smalltalk.
>
> - Is it possible to write a 64-Bit VW smalltalk program that runs
> under Windows Vista 64-Bit in a 64-Bit mode?
> I read that cincom smalltalk supports Linux and Solaris 64-Bit but i
> didnt read sth about Microsoft's 64-Bit OS.
>
>
> -Is there an effective way to program on mutlicore CPUs (like for
> example Intel's Dual Core).
> I want to change a serial program as easy as possible to run faster
> on a multicore CPU with using parallel programming.
>
> I hope that sb can help me.
> Thanks.
>
> greetings,
>
> peter
>
>
> Jetzt neu: Der Routenplaner von Tiscali
> http://www.tiscali.de/trav/routenplaner.html
>
> _______________________________________________
> vwnc mailing list
> [hidden email]
> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
>

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] 64-bit and multicore VW smalltalk

Andre Schnoor
In reply to this post by Runar Jordahl

Am 14.04.2008 um 14:22 schrieb Runar Jordahl:
> [...]
>
> You will need to rewrite your loop to send each data element to
> another image for computation. Then the parent image will wait for the
> other images to finish their work, and maybe aggrgate the results.

You could also have a look at the OpenTalk-STST (Smalltalk-To-
Smalltalk) framework to send ordinary Smalltalk messages over TCP,  
returning ordinary Smalltalk objects as results. This works  
transparently (i.e. you don't care whether an object actually lives in  
which particular image). I like the Opentalk system very much and IMHO  
it's one of the most elegant Smalltalk frameworks ever.

Whether object marshalling and TCP communication is to much overhead  
for your particular problem (and it definitely *is* a considerable  
overhead), depends on its complexity and purpose. But if your  
"threads" do some intense work on individual objects rather than a lot  
of communication, this could be a viable way to go.

Andre
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] 64-bit and multicore VW smalltalk

Gruenewald, Tom
In reply to this post by powernetfreak@surfeu.de

Hello Peter.
Thank you for addressing this issue.

Is there a way to bind a 64 bit DLL (via DLL & C Connect) into a 32 bit VW image? Maybe with a wrapper class or DLL.
Can anybody tell if this is a possible solution?

Best regards,
Tom Grünewald

________

Carl Zeiss Industrielle Messtechnik GmbH
Softwareentwicklung/Software Development

T o m G r ü n e w a l d

73446 Oberkochen, Germany
tel: +49.7364.20-8541
fax: +49.7364.20-4800
email: [hidden email]
http://www.zeiss.de/imt

Carl Zeiss Industrielle Messtechnik GmbH. Carl-Zeiss-Straße 22, 73447 Oberkochen
Aufsichtsratsvorsitzender: Dr. Dieter Kurz,Geschäftsführer: Dr. Rainer Ohnheiser, Hanspeter Mürle
Sitz der Gesellschaft: 73446 Oberkochen, Deutschland, Handelsregister: Amtsgericht Ulm, HRB 501561


Inactive hide details for "powernetfreak@surfeu.de" <powernetfreak@surfeu.de>"[hidden email]" <[hidden email]>



An

[hidden email]

Kopie


Thema

[vwnc] 64-bit and multicore VW smalltalk

Hello,

i  have two questions concerning cincom VisualWorks smalltalk.

- Is it possible to write a 64-Bit VW smalltalk program that runs
under Windows Vista 64-Bit in a 64-Bit mode?
I read that cincom smalltalk supports Linux and Solaris 64-Bit but i
didnt read sth about Microsoft's 64-Bit OS.


-Is there an effective way to program on mutlicore CPUs (like for
example Intel's Dual Core).
I want to change a serial program as easy as possible to run faster
on a multicore CPU with using parallel programming.

I hope that sb can help me.
Thanks.

greetings,

peter


Jetzt neu: Der Routenplaner von Tiscali
http://www.tiscali.de/trav/routenplaner.html

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc



----------------------------------------
This message is intended for a particular addressee only and may contain business or company secrets. If you have received this email in error, please contact the sender and delete the message immediately. Any use of this email, including saving, publishing, copying, replication or forwarding of the message or the contents is not permitted.


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc

pic20267.gif (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] 64-bit and multicore VW smalltalk

Joerg Beekmann, DeepCove Labs (YVR)
In reply to this post by Andre Schnoor
Andre

I agree Open Talk is a very nice piece of work. I've often thought that
Smalltalk could do worse that adopt this model for inter-process
communication with in the image. Semaphores and threads are at level of
abstraction so much lower than the rest of Smalltalk that it always bugs
me when I need to use them.

Joerg

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On
Behalf Of Andre Schnoor
Sent: Tuesday, April 15, 2008 1:14 AM
To: VWNC
Subject: Re: [vwnc] 64-bit and multicore VW smalltalk


Am 14.04.2008 um 14:22 schrieb Runar Jordahl:
> [...]
>
> You will need to rewrite your loop to send each data element to
> another image for computation. Then the parent image will wait for the
> other images to finish their work, and maybe aggrgate the results.

You could also have a look at the OpenTalk-STST (Smalltalk-To-
Smalltalk) framework to send ordinary Smalltalk messages over TCP,  
returning ordinary Smalltalk objects as results. This works  
transparently (i.e. you don't care whether an object actually lives in  
which particular image). I like the Opentalk system very much and IMHO  
it's one of the most elegant Smalltalk frameworks ever.

Whether object marshalling and TCP communication is to much overhead  
for your particular problem (and it definitely *is* a considerable  
overhead), depends on its complexity and purpose. But if your  
"threads" do some intense work on individual objects rather than a lot  
of communication, this could be a viable way to go.

Andre
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] Multithreading (was: multicore VW smalltalk)

Andre Schnoor
Am 16.04.2008 um 00:07 schrieb Joerg Beekmann:
>
> I agree Open Talk is a very nice piece of work. I've often thought  
> that
> Smalltalk could do worse that adopt this model for inter-process
> communication with in the image. Semaphores and threads are at level  
> of
> abstraction so much lower than the rest of Smalltalk that it always  
> bugs
> me when I need to use them.

Hi Joerg,

IMHO the semaphores and green tasks of Smalltalk are just fine. After  
an initial learning curve (e.g. how to safely launch, name, terminate  
and synchronize them), I found it very pleasant to work with multi-
threading. I'm running dozens of them all the time in my products and  
actually started thinking in terms of tasks and queues.

BTW: I would love to have the ability to generally encapsulate a class  
as a task:

1) The class behaves like a server that is launched when the first  
instance is created and shut down after the last instance was released.

2) Instances behave like "shared data"

3) Sending a message to an instance transparently makes it a server  
request, i.e. the message is queued, processed and answered synchronized

Nice, eh? Probably someone already did this and I just missed it.

Andre
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] Multithreading (was: multicore VW smalltalk)

Joerg Beekmann, DeepCove Labs (YVR)
Ah, but you are making my point for me. You are building higher levels
of abstraction on top of the facilities provided. My point was not that
the VW threading model was in any way deficient or inconvenient, just
that there are other models for threading which provide more tractable
semantics. For example a message passing model; the thought I had was
the OpenTalk could be extended to be not just a inter-image
communications mechanism, but also the intra-image communications
mechanism.

Joerg

-----Original Message-----
From: [hidden email] [mailto:[hidden email]]
Sent: Wednesday, April 16, 2008 1:40 AM
To: Joerg Beekmann
Cc: VWNC
Subject: Re: Multithreading (was: multicore VW smalltalk)

Am 16.04.2008 um 00:07 schrieb Joerg Beekmann:
>
> I agree Open Talk is a very nice piece of work. I've often thought  
> that
> Smalltalk could do worse that adopt this model for inter-process
> communication with in the image. Semaphores and threads are at level  
> of
> abstraction so much lower than the rest of Smalltalk that it always  
> bugs
> me when I need to use them.

Hi Joerg,

IMHO the semaphores and green tasks of Smalltalk are just fine. After  
an initial learning curve (e.g. how to safely launch, name, terminate  
and synchronize them), I found it very pleasant to work with multi-
threading. I'm running dozens of them all the time in my products and  
actually started thinking in terms of tasks and queues.

BTW: I would love to have the ability to generally encapsulate a class  
as a task:

1) The class behaves like a server that is launched when the first  
instance is created and shut down after the last instance was released.

2) Instances behave like "shared data"

3) Sending a message to an instance transparently makes it a server  
request, i.e. the message is queued, processed and answered synchronized

Nice, eh? Probably someone already did this and I just missed it.

Andre

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] Multithreading (was: multicore VW smalltalk)

Stew MacLean
It's pretty old, but Hermes may be of interest to you. eg

http://www.cs.ubc.ca/local/reading/proceedings/spe91-95/spe/vol25/issue4
/spe950wk.pdf

Its main premise is that each module is a sequential process that
communicates by message passing over channels connected via in and out
Ports.

Years ago, as a way of learning about Semaphores and threading in
Smalltalk I built an implementation of Ports using semaphores for
intra-image communication. It was good experience that was very useful
when I had to do this stuff for real. Another system that springs to
mind is Actor.

FWIW...

Stewart

>-----Original Message-----
>From: [hidden email] [mailto:[hidden email]] On
Behalf

>Of Joerg Beekmann
>Sent: 17 April 2008 3:36 a.m.
>To: [hidden email]
>Cc: VWNC
>Subject: Re: [vwnc] Multithreading (was: multicore VW smalltalk)
>
>Ah, but you are making my point for me. You are building higher levels
>of abstraction on top of the facilities provided. My point was not that
>the VW threading model was in any way deficient or inconvenient, just
>that there are other models for threading which provide more tractable
>semantics. For example a message passing model; the thought I had was
>the OpenTalk could be extended to be not just a inter-image
>communications mechanism, but also the intra-image communications
>mechanism.
>
>Joerg
>
>-----Original Message-----
>From: [hidden email] [mailto:[hidden email]]
>Sent: Wednesday, April 16, 2008 1:40 AM
>To: Joerg Beekmann
>Cc: VWNC
>Subject: Re: Multithreading (was: multicore VW smalltalk)
>
>Am 16.04.2008 um 00:07 schrieb Joerg Beekmann:
>>
>> I agree Open Talk is a very nice piece of work. I've often thought
>> that
>> Smalltalk could do worse that adopt this model for inter-process
>> communication with in the image. Semaphores and threads are at level
>> of
>> abstraction so much lower than the rest of Smalltalk that it always
>> bugs
>> me when I need to use them.
>
>Hi Joerg,
>
>IMHO the semaphores and green tasks of Smalltalk are just fine. After
>an initial learning curve (e.g. how to safely launch, name, terminate
>and synchronize them), I found it very pleasant to work with multi-
>threading. I'm running dozens of them all the time in my products and
>actually started thinking in terms of tasks and queues.
>
>BTW: I would love to have the ability to generally encapsulate a class
>as a task:
>
>1) The class behaves like a server that is launched when the first
>instance is created and shut down after the last instance was released.
>
>2) Instances behave like "shared data"
>
>3) Sending a message to an instance transparently makes it a server
>request, i.e. the message is queued, processed and answered
synchronized
>
>Nice, eh? Probably someone already did this and I just missed it.
>
>Andre
>
>_______________________________________________
>vwnc mailing list
>[hidden email]
>http://lists.cs.uiuc.edu/mailman/listinfo/vwnc


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc