Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 Oct 2006 17:06:10 -0400 (EDT)
From:      Daniel Eischen <deischen@freebsd.org>
To:        Matthew Dillon <dillon@apollo.backplane.com>
Cc:        Paul Allen <nospam@ugcs.caltech.edu>, Julian Elischer <julian@elischer.org>, current@freebsd.org
Subject:   Re: Comments on the  KSE option
Message-ID:  <Pine.GSO.4.64.0610271657200.7105@sea.ntplx.net>
In-Reply-To: <200610272050.k9RKoXo3045280@apollo.backplane.com>
References:  <45425D92.8060205@elischer.org> <20061027201838.GH30707@riyal.ugcs.caltech.edu> <Pine.GSO.4.64.0610271634160.7105@sea.ntplx.net> <200610272050.k9RKoXo3045280@apollo.backplane.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 27 Oct 2006, Matthew Dillon wrote:

>
> :No, it is POSIX.  You, the application, can write a program with
> :system scope or process scope threads and get whatever you behavior
> :you want, within rlimits of course.
> :
> :If you want unfair scheduling, then create your threads with
> :system scope contention, otherwise use process scope.  The
> :kernel should be designed to allow both, and have adjustable
> :limits in place for (at least) system scope threads.
> :
> :Noone is saying that you can't have as many system scope threads
> :as you want (and as allowed by limits), just that you must also
> :be able to have process scope threads (with probably higher limits
> :or possibly no limits).
> :
> :--
> :DE
>
>    This is a nice concept, but totally unrealistic in actual operation
>    because you generally have no control over how the application
>    programmer designed his application.  It is the user running the
>    application who needs to be able to control how the thread scope
>    effects the overall system, not the application designer.
>
>    The argument here is not how a program runs alone on a system, but how
>    it effects the performance of other programs running on the system.
>
>    Unless you are advocating that the system administrator or user perform
>    surgery on every single application in the system (KDE, Firefox, and
>    on down the line), the problem cannot be solved by depending on
>    programmers to do the right thing vis-a-vie the POSIX standard.

Two things.

You kernel shouldn't be designed to make it impossible
to support POSIX operations and behavior.

There are various ways that you can force a threads library or
kernel to use system or process scope threads.  We do it now
with environment variables in libpthread, or as a compile option
when building libpthread.  You could also have a sysctl that forces
threads to be created one way or another.  Users can, if they are
unhappy with the performance of the threaded application, force
it to use one or the other scheme, within limits as set by the
administrator.

-- 
DE



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