From owner-freebsd-threads@FreeBSD.ORG Wed Feb 1 01:48:55 2006 Return-Path: X-Original-To: freebsd-threads@freebsd.org Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B23AC16A420 for ; Wed, 1 Feb 2006 01:48:55 +0000 (GMT) (envelope-from deischen@freebsd.org) Received: from mail.ntplx.net (mail.ntplx.net [204.213.176.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 263D143D45 for ; Wed, 1 Feb 2006 01:48:55 +0000 (GMT) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) by mail.ntplx.net (8.13.5/8.13.5/NETPLEX) with ESMTP id k111msMn025143; Tue, 31 Jan 2006 20:48:54 -0500 (EST) Date: Tue, 31 Jan 2006 20:48:54 -0500 (EST) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: Kurt Miller In-Reply-To: <200601312043.59043.kurt@intricatesoftware.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.ntplx.net) Cc: freebsd-threads@freebsd.org Subject: Re: kse: high prio threads starving low prio threads X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Daniel Eischen List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Feb 2006 01:48:55 -0000 On Tue, 31 Jan 2006, Kurt Miller wrote: > On Tuesday 31 January 2006 8:28 pm, Daniel Eischen wrote: > > On Tue, 31 Jan 2006, Kurt Miller wrote: > > > > > I'm working on 1.5 jdk certification on 5.4 and 6.0. One of the > > > jck tests hangs because a high priority thread that is yielding > > > is starving the lower priority threads. The following program > > > demonstrates this problem. Using libthr the program finishes. > > > Using kse hangs using all three scheduling policies. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ I missed this part previously. Our default scheduling policy (SCHED_OTHER) is SCHED_RR and supports thread priorities. This is allowed by POSIX, so the behavior is also as expected. -- DE