Re: 64 bit euphoria
jacques deschĂȘnes wrote:
>
> Robert Craig wrote:
> >
> > Kenneth Rhodes wrote:
> > > Also, it seems that hence forth the 64bit cpus will multi-core,
> > > so shouldn't threads be a "must" feature for the next version of
> > > Euphoria?
> >
> > My main concern with threads isn't how to implement them,
> > it's what are people going to do with them? Can any of the
> > pro-thread people give some examples (that couldn't easily be done
> > some other way, such as the Language Wars technique, or simply
> > using multiple processes communicating via shared memory)?
> >
> > Regards,
> > Rob Craig
> > Rapid Deployment Software
> > <a href="http://www.RapidEuphoria.com">http://www.RapidEuphoria.com</a>
> >
>
> 1) threads inside the same process take less resources than 2 processes
> communicating.
True, but how much does this affect current hardware/software(OS's)?
> 2) a thread switching is faster (more efficient) than a context (process)
> switching.
See above question -- is it really an issue? *nixes preferred heavy processes
over threads for a long time. I read something comparing *nix threads vs.
processes and there wasn't that big a difference between the two.
>
> 3) One obvious usage of threads is to get a more responsive applications. I
> hate
> those situation where the application doesn't answer to mouse click (keypress)
>
> because it's caugth in a waiting loop for some network resource or something
> else.
> So when the application is designed with a thread for the user interface and a
> thread for others cores, the user interface keep responding.
Couldn't this be done with callbacks?
In modern OS's, how many API calls are blocking calls versus taking a callback?
>
> 4) why to bother designing threads machanics inside the application when it
> already exist in the operating system in a more flexible an efficient way.
Of course the OS needs to support it, but the application (Euphoria) would still
need to have infrastructure for starting new threads and synchronization/locking
for global resources. Otherwise someone could just write a library using the
existing infrastructure.
Wouldn't much of the interpreter/translator have to be rewritten to be reentrant
as well?
>
> regards,
> Jacques Deschenes
>
=====================================
Too many freaks, not enough circuses.
j.
|
Not Categorized, Please Help
|
|