From: | |
Date: | 21 Feb 2001 at 12:07:45 |
Subject: | Re: Tasks vs. Threads |
Hi Steven
> I think memory protection is the difference you are looking for
> between the Amiga and the other guys. Threads run in the memory space
> of the parent process and almost always offer no memory protection
> (hence the term "lightweight"). Processes do have memory protection
> and are prevented from clobbering each other. Memory protection adds
> even more complexity when you need to share memory between two
> processes and usually requires the use of "handles" instead of
> pointers. Threads can simply pass a pointer to access their shared
> memory space. Needless to say, the topic of memory protection is much
> more complex than you'd initially believe so let's not go there.
I didn't have thought to that, so the extra-overhead on the operating
system is generated by the memory handling when using multiple tasks
instead of multiple threads.
> Given that the AmigaOS lacks memory protection you can think of
> AmigaOS Tasks as Threads. You can even share the same memory space and
> pass pointers around without any restrictions just like "real"
> threads.
>
> The more 'portable' approach is to use POSIX threads (pthreads) but
> even they are no guarantee that you won't have porting problems.
> There is a port of the pthreads package for the Amiga available
> somewhere from http://www.geekgadgets.org but I've never tried it so I
> can't say anything more about it.
POSIX compliant threads will be nice, even if I think geekgadgets
related things are a little bit too overburdened for me, I'll take a
look at it anyway. Nobody knows if threads.library is POSIX compliant?
It looks quite simple to use.
> Can anyone say whether the new AmigaDE supports pthreads or not?
I remember reading in a discussion in devicetop.com's forums that
AmigaDE should be 100% POSIX compliant.
Gabriele
------------------------ Yahoo! Groups Sponsor ---------------------~-~>
eGroups is now Yahoo! Groups
Click here for more details
http://us.click.yahoo.com/kWP7PD/pYNCAA/4ihDAA/d8AVlB/TM
---------------------------------------------------------------------_->
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/