From owner-freebsd-hackers@FreeBSD.ORG Wed Mar 2 15:41:19 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0651716A4CE for ; Wed, 2 Mar 2005 15:41:19 +0000 (GMT) Received: from fw1.caa.army.mil (fw1.caa.army.mil [192.153.92.254]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6027343D2F for ; Wed, 2 Mar 2005 15:41:18 +0000 (GMT) (envelope-from ed.smithiii@us.army.mil) Received: from CAA-UNCLMAIL.caa.army.mil (caa-unclmail.caa.army.mil [192.153.92.29]) by fw1.caa.army.mil with ESMTP id j22FfPDg021401 for ; Wed, 2 Mar 2005 10:41:25 -0500 (EST) Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 Date: Wed, 2 Mar 2005 10:39:20 -0500 Message-ID: <0A907D6523E90246822D32FA2344E244015ECF@CAA-UNCLMAIL.caa.army.mil> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: sched_4BSD Thread-Index: AcUel57q0hnQVlgBQCOGtXy3dByBrwApdMAQ From: "Smith III, Edward Mr. CAA/ISC" To: , X-Mailman-Approved-At: Thu, 03 Mar 2005 13:07:16 +0000 cc: freebsd-hackers@freebsd.org cc: ashcs@ucla.edu Subject: RE: sched_4BSD X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Mar 2005 15:41:19 -0000 Yes, but you still incur a lot of context switching overhead between the 1000 threads. Increasing the time quantum should give you better throughput with a penalty to interactivity which isn't really an issue if no one is running a graphical desktop. ??? I think...=20 -----Original Message----- From: owner-freebsd-hackers@freebsd.org [mailto:owner-freebsd-hackers@freebsd.org] On Behalf Of Julian Elischer Sent: Tuesday, March 01, 2005 2:50 PM To: Sarath Kamisetty Cc: freebsd-hackers@freebsd.org; Ashwin Chandra Subject: Re: sched_4BSD Sarath Kamisetty wrote: >Hi, > >How does Linux handle this ? Any idea ? > =20 > If you make 1000 threads, you get 1000 slots on the scheduler. (last time I looked.. Let me know if I'm wrong). The guy next to you with 'vi' gets 1 slot.. who gets more cpu? >Thanks, >Sarat > >On Mon, 28 Feb 2005 00:26:10 -0800, Julian Elischer wrote: > =20 > >>Ashwin Chandra wrote: >> =20 >> >>>I wanted to get some clarification about the 4BSD scheduler. I am=20 >>>sort of confused why there are two forms of scheduling, one done=20 >>>between processes and another done between threads in a process. The=20 >>>priority calculations seem to be done only with processes and I=20 >>>assume that the global run queue holds processes, not threads. Also=20 >>>why is there only 1 run queue for 1 CPU. What happens to blocked processes and ready to be runned processes? >>> =20 >>> >>Part of the challenge of adding threads to a system is to make it hard >>for a threaded process to "flood" the system run queues so that other=20 >>processes get no cpu time. >> >>The scheme in the current freeBSD schedulers is a "crude" method, by=20 >>which only a limitted number of threads per process are allowed to be=20 >>added to the system run queue. RUnnable hreads fo r aprocess are kept=20 >>on a run queue for the process and only the highest N prioriy hreads=20 >>are actually put on the system run queue. >> >>This is by no means the best way, but rather the easiest way. I am=20 >>hoping that some PhD candidate somewhere will decide that thread=20 >>scheduling is his topic and will figure out a better way of doing=20 >>this. >> >>both run queues hold threads. This is still a place wjere a lot of=20 >>work can be done. >> >>:-) >> >> >> =20 >> >>>Ash >>>_______________________________________________ >>>freebsd-hackers@freebsd.org mailing list=20 >>>http://lists.freebsd.org/mailman/listinfo/freebsd-hackers >>>To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" >>> =20 >>> >>_______________________________________________ >>freebsd-hackers@freebsd.org mailing list=20 >>http://lists.freebsd.org/mailman/listinfo/freebsd-hackers >>To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" >> >> =20 >> _______________________________________________ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"