Date: Wed, 01 Dec 1999 04:12:19 +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: <38442193.931386B6@newsguy.com> References: <3842DBB5.8AFC9B6@newsguy.com> <199911292022.MAA08694@apollo.backplane.com> <3843D43E.4F40A642@newsguy.com> <199911301732.JAA25846@apollo.backplane.com> <38441379.D8CD6CCD@newsguy.com> <199911301829.KAA26530@apollo.backplane.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Matthew Dillon wrote: > > You are assuming that the application somehow requires more cpu > in a threaded environment verses an unthreaded environment. I am saying > that when you finish up tallying all the cpu the application uses, it > is going to be nearly the same whether the application serializes the > system calls (i.e. unthreaded) or doesn't serialize the system calls. > From the point of view of the UNIX scheduler. No, not at all. For example think of an application with two processes: one does i/o on a tcp socket and the other number-crunches data. It gets converted to threads, so that it is now just one process. Whenever the process "blocks" in the kernel doing i/o, instead of being put to sleep control is returned to it, and it spends the rest of it's quanta doing number-crunching. The scheduler will not identify that process as one who does i/o. But... whatever. I'll just wait and see. -- 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?38442193.931386B6>