Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 Nov 1999 22:42:22 +0900
From:      "Daniel C. Sobral" <dcs@newsguy.com>
To:        Matthew Dillon <dillon@apollo.backplane.com>
Cc:        freebsd-arch@freebsd.org
Subject:   Re: Threads and the scheduler
Message-ID:  <3843D43E.4F40A642@newsguy.com>
References:  <3842DBB5.8AFC9B6@newsguy.com> <199911292022.MAA08694@apollo.backplane.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Matthew Dillon wrote:
> 
>     No, it won't, because most context switches are synchronous and
>     the tick interval doesn't apply in those cases.  Asynchronizing
>     I/O does not necessarily mean that the calling thread will continue to
>     run.  If it has nothing to do it is going to exit or go to sleep whether
>     the I/O is asynchronous or not.  It is definitely not going to waste
>     cpu finishing out its quanta.

Mmmm... that's not exactly what I'm worried about. I'm thinking of
applications which use threads to handle both i/o and cpu-bound
tasks. Our scheduler raises the i/o-bound tasks priority and lowers
cpu-bound tasks priority. With a program using threads to do both,
the scheduler would end up treating the process as cpu-bound and
lower it's priority.

Ok, maybe that's fault of the application design, but still... :-)

Processes with enough i/o-bound tasks to actually use up all quanta
before running out of threads will suffer from a similar fate.

--
Daniel C. Sobral			(8-DCS)
who is as social as a wampas

dcs@newsguy.com
dcs@freebsd.org




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?3843D43E.4F40A642>