From owner-freebsd-hackers@FreeBSD.ORG Thu Jan 21 10:19:40 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1F350106566C for ; Thu, 21 Jan 2010 10:19:40 +0000 (UTC) (envelope-from bvgastel@bitpowder.com) Received: from smeltpunt.science.ru.nl (smeltpunt.science.ru.nl [131.174.16.145]) by mx1.freebsd.org (Postfix) with ESMTP id C4F6D8FC08 for ; Thu, 21 Jan 2010 10:19:39 +0000 (UTC) Received: from [10.0.1.2] (shadowfax.bitpowder.com [145.99.244.126]) (authen=bernardg) by smeltpunt.science.ru.nl (8.13.7/5.31) with ESMTP id o0LAJYiq019518; Thu, 21 Jan 2010 11:19:35 +0100 (MET) Mime-Version: 1.0 (Apple Message framework v1077) Content-Type: multipart/signed; boundary=Apple-Mail-1-146649389; protocol="application/pkcs7-signature"; micalg=sha1 From: Bernard van Gastel In-Reply-To: <86hbqifip8.fsf@ds4.des.no> Date: Thu, 21 Jan 2010 11:19:34 +0100 Message-Id: <72CE899C-5941-4659-B922-DC65BB0CE67D@bitpowder.com> References: <71A129DC-68A0-46C3-956D-C8AFF1BA29E1@bitpowder.com> <86hbqifip8.fsf@ds4.des.no> To: =?iso-8859-1?Q?Dag-Erling_Sm=F8rgrav?= X-Mailer: Apple Mail (2.1077) X-Spam-Score: 0.001 () BAYES_50 X-Scanned-By: MIMEDefang 2.63 on 131.174.16.145 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-hackers@freebsd.org Subject: Re: pthread_{mutex,cond} & fifo/starvation/scheduling policy X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jan 2010 10:19:40 -0000 --Apple-Mail-1-146649389 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=iso-8859-1 But the descheduling of threads if the mutex is not available is done by = the library. And especially the order of rescheduling of the threads = (thats what I'm interested in). Or am I missing something in the = sys/kern/sched files (btw I don't have the umtx file). Regards, Bernard Op 19 jan 2010, om 12:16 heeft Dag-Erling Sm=F8rgrav het volgende = geschreven: > Bernard van Gastel writes: >> What is the scheduling policy of the different thread libraries? >=20 > Threads are scheduled by the kernel, not by the library. Look at > sys/kern/sched_umtx.c and sys/kern/sched_{4bsd,ule}.c. >=20 > DES > --=20 > Dag-Erling Sm=F8rgrav - des@des.no --Apple-Mail-1-146649389--