lkml.org 
[lkml]   [1996]   [Apr]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: Kernel threads useable by mortals?
Date
> > 1) A while ago, Linus passed a code snippet around which showed how to
> > start up a new thread in user space. Has anyone improved upon this?
> > Or is it what everyone is using still?
>
> have you looked at the pthreads package from MIT?
> also, if you find a copy of Linus's mail, I'd appreciate a bounce.

Yes, and I'm really not interested in it. Linux's kernel threads have
the advantage of being able to take advantage of multiple processors,
not block on hard-drive accesses, not block on paging requests, and so
on. Pthreads can't do that.

> > 2) I have heard that the new mmap based malloc in libc is thread safe
> > and doesn't depend on usermode locks to be so. Is this true?
>
> I doubt that: it certainly subdivides mmaped blocks, and that would require
> locking.

Hardly the definitive answer I was looking for ;)

> > 3) Are there any user-mode locking functions available? Preferably ones
> > that are guaranteed atomic and FIFO?
>
> I'm having a hard time imagining a strictly-usermode queueing lock.

I must have asked the question badly to warrent such a silly reply. I
was meaning to ask if there were any kernel functions (syscalls) which
implemented user-mode locking in a way that is guaranteed 1) atomic
and 2) FIFO.

I'll post Linus's code snippet to the list later today or tomarrow.

Christopher


\
 
 \ /
  Last update: 2005-03-22 13:37    [W:0.022 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site