From owner-freebsd-threads@FreeBSD.ORG Mon Jun 30 07:59:53 2003 Return-Path: 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 2159D37B401 for ; Mon, 30 Jun 2003 07:59:53 -0700 (PDT) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 74E5A43FBF for ; Mon, 30 Jun 2003 07:59:52 -0700 (PDT) (envelope-from eischen@vigrid.com) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mail.pcnet.com (8.12.8/8.12.1) with ESMTP id h5UExjAI007853; Mon, 30 Jun 2003 10:59:45 -0400 (EDT) Date: Mon, 30 Jun 2003 10:59:45 -0400 (EDT) From: Daniel Eischen X-Sender: eischen@pcnet5.pcnet.com To: Petri Helenius In-Reply-To: <019601c33f13$015daa30$44d5473e@PETEX31> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: Julian Elischer cc: freebsd-threads@freebsd.org Subject: Re: rtprio and kse X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: deischen@freebsd.org List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jun 2003 14:59:53 -0000 On Mon, 30 Jun 2003, Petri Helenius wrote: > > > > Theoretically any process with rt priority can monopolise the CPU if it > > spins, regardless of whether it's threaded or not.. > > > > Is not that what having RT-priority means? > > Yes, but in non-threaded environment with multiple processes > competing for CPU libc is not expected to have locks. In threaded > environment it does have them around things like malloc. My concern > is the realtime thread spinlocking waiting for a lock which is held > somewhere which does not get scheduled. These locks are not > visible to the appliation and thus one must either put additional > mutexes around them or know that libc stuff is rtprio-thread-safe. Libpthread silently converts libc spinlocks into non-spinning locks; there should be no deadlock or starvation issues in userland. I don't know if libthr ans any issues with spinlocks or not. -- Dan Eischen