[svlug] Linux Thread Question

Bevan Schroeder bevan at foo.net
Wed Nov 18 23:30:30 PST 1998


On Thu, 19 Nov 1998, Hyouck Kim wrote:

> I made a program that consists of 2 threads with the attribute of
> PTHREAD_SCOPE_PROCESS.

I suppose I should be checking what this flag means.  If you feel its use
is inconsistent with what I've written below, tell me and I'll look into
it some more.

> when I "ps ax | grep my-program", there are 4 items listed.

And you feel this is wrong because...?  If these four processes are
sharing their data segments, they're threads.  That's the only required
difference.  I don't have any pthread apps handy to verify this behavior,
since I discovered a while back that pthreads is unacceptably slow in its
present implementation on linux :(
(my dual CPU got 0 speedup under pthreads, and about 98% on a fork()/shm()
design.  pthread_create() was way too slow.)

-bevan


--
echo "unsubscribe svlug" | mail majordomo at svlug.org
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ to unsubscribe
see http://www.svlug.org/mdstuff/lists.shtml for posting guidelines.



More information about the svlug mailing list