Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Jul 2000 09:38:03 -0600 (MDT)
From:      Nate Williams <nate@yogotech.com>
To:        chris@calldei.com
Cc:        Bjorn Tornqvist <bjorn@tornqvist.net>, freebsd-hackers@FreeBSD.ORG
Subject:   Re: BSD,Posix,Linux Threading - Are they really useable?
Message-ID:  <200007281538.JAA22915@nomad.yogotech.com>
In-Reply-To: <20000728003913.K37935@holly.calldei.com>
References:  <398111DA.443B41F9@tornqvist.net> <20000728003913.K37935@holly.calldei.com>

next in thread | previous in thread | raw e-mail | index | archive | help
> > PosixThreads are userland threads - if one thread blocks on i/o the
> > whole process is blocked. Which makes PosixThreads rather useless.
> 
>    That is incorrect.  FreeBSD's userland pthread implementation
> does not block the whole process on I/O.  POSIX does not specify
> this behavior either.

Actually, sometimes it does (for example when reading from an I/O device
where select can't be used succesfully).

> > FreeBSD Kernel-threads (dunno what they are called actually) can't be
> > used natively!? (Searched the archives and found an explanation that the
> > only way to access normal kernel SMP-thread functionality is to use
> > LinuxThreads)
> 
>    FreeBSD's kernel threads are for separate threads of execution
> in the kernel and aren't the same thing as threads for a user
> process.

You're missing the point.  He's asking for 'kernel threads' so that
multiple independant thread of execution for a given 'userland process'
can be running simulataneously (virtually on a UP, and realistically on
a MP).

Currently, FreeBSD doesn't have any such thing, although there are a
number of design documentations on how it would be done, if it were to
be done.

The recent work that Matt Dillon and Greg Lehey have been doing is
intended to make this more possible.

> > LinuxThreads: While they are kernel-threads, if one thread receives an
> > uncought signal, all threads are killed (as they should be), but the
> > resulting coredump is useless since it only captures the state of the
> > last-killed-thread (or process or whatever you want to call it.
> > LinuxThreads seems like just a big hack...).
> 
>    LinuxThreads on FreeBSD cannot be kernel threads because that
> would require modifications to our scheduler which simply have
> not been made.

Not quite.  LinuxThreads on FreeBSD *ARE* kernel threads, but they
aren't part of the regular kernel because they aren't adequate, and they
have the wrong license model to be used by default.



Nate


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200007281538.JAA22915>