Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 01 Nov 1999 21:25:26 +0900
From:      "Daniel C. Sobral" <dcs@newsguy.com>
To:        Daniel Eischen <eischen@vigrid.com>
Cc:        freebsd-arch@freebsd.org
Subject:   Re: Threads goals  version II
Message-ID:  <381D86B6.3D20E0E7@newsguy.com>
References:  <199911010443.XAA26092@pcnet1.pcnet.com>

next in thread | previous in thread | raw e-mail | index | archive | help
[slightly off-topic]

Daniel Eischen wrote:
> 
> What happens under LinuxThreads?  I'd expect an rfork'd process to
> get an equal share of processor time as it's parent.  If I create
> 10 threads with PTHREAD_SCOPE_SYSTEM, I expect to have 10 LWPs (or
> rfork'd processes).  What I am trying to say is that an application
> that creates 10 threads with PTHREAD_SCOPE_SYSTEM gets more processor
> time than 8 threads with PTHREAD_SCOPE_SYSTEM and 2 threads with
> PTHREAD_SCOPE_PROCESS.

Some people (most people on the FreeBSD campus who have been
involved with threads, it would seem) think that having more threads
for the purpose of increasing your time slice is bad behavior, to
say the least. Unix have a mechanism to adjust the relative priority
between processes, which is called priority. If a process is
supposed to eat more cpu time than others, it is given a lower
priority than the others.

Having a programmer get around the admin mechanism to adjust process
priority through use of threads might led to a situation where
competing users end up bogging down the whole system while fighting
for cpu time.

I can see clear disadvantages in allowing a process cpu time be
allotted according to how many threads it has. Do you see any
particular disadvantage to nice(1)? MMmmm... I should removed this
last sentence before sending this message, it comes too aggressive,
but I can't think of any better way of getting the point across.

Anyway, this is the "contention" point that has been mentioned. Many
people here _want_ all processes to be equal, no matter how many
threads they run. Instead of trying to convince people to see the
light, just ask that your dissent be noted, or that both
capabilities be present.

--
Daniel C. Sobral			(8-DCS)
dcs@newsguy.com
dcs@freebsd.org

	"People call him Neutron Star, 'cuz he's so dense lights bends
around him."





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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?381D86B6.3D20E0E7>