Re: Slow pthread_create() under high load

From: yodaiken@fsmlabs.com
Date: Tue Mar 28 2000 - 08:31:41 EST


On Tue, Mar 28, 2000 at 01:41:26AM -0800, Christopher Smith wrote:
> On Tue, Mar 28, 2000 at 01:06:08AM -0700, Richard Gooch wrote:
> > Because the kernel doesn't make this easy. The kernel has the concept
> > of "tasks", which don't map well to POSIX threads. The kernel doesn't
> > distinguish between "processes" and "threads" like POSIX does.
> > Everything is just a task. Tasks can share some things (FS, files,
> > VM), but they can't (yet) share PIDs (probably never), signal queues
> > and other things required for POSIX compliance.
>
> IMHO, at least sharing PIDs would be a useful thing. Signal queues
> would be nice, but there are other ways to deal with that.

Can someone tell me why:

pthread_creat( ....)
         if this is the first created thread
                   rootpid = getpid();
                   redefine getpid === return rootpid

Doesn't work?

-- 
---------------------------------------------------------
Victor Yodaiken 
FSMLabs:  www.fsmlabs.com  www.rtlinux.com
FSMLabs is a servicemark and a service of 
VJY Associates L.L.C, New Mexico.

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Mar 31 2000 - 21:00:22 EST