From owner-freebsd-threads@FreeBSD.ORG Wed Feb 1 01:28:45 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 570A916A420 for ; Wed, 1 Feb 2006 01:28:45 +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 E7BD043D48 for ; Wed, 1 Feb 2006 01:28:44 +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 k111Sh8v000285; Tue, 31 Jan 2006 20:28:43 -0500 (EST) Date: Tue, 31 Jan 2006 20:28:43 -0500 (EST) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: kurt@intricatesoftware.com In-Reply-To: <200601311718.11683.lists@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:28:45 -0000 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. > > Is this the expected behavior of kse? It is the expected behavior for any POSIX threads library that supports SCHED_FIFO and priorities and also running on a system with one scheduling allocation domain (one CPU). libthr does not support posix priority scheduling. > > Is there a work-around to the starving issue? It is working as it should. Recode it not to use priorities if that is what you want. -- DE