From owner-freebsd-hackers@FreeBSD.ORG Fri Jan 13 06:32:35 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org 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 C6E8F16A41F for ; Fri, 13 Jan 2006 06:32:35 +0000 (GMT) (envelope-from guomingyan@gmail.com) Received: from xproxy.gmail.com (xproxy.gmail.com [66.249.82.204]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4BD5C43D45 for ; Fri, 13 Jan 2006 06:32:35 +0000 (GMT) (envelope-from guomingyan@gmail.com) Received: by xproxy.gmail.com with SMTP id t12so427260wxc for ; Thu, 12 Jan 2006 22:32:34 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type; b=l2XME6mlim2aPwzRHgQOzixgGNWs4tS6SFsgCrRBqh/S4tR6YuiDPwoukZZX2haWKA3nGi/Tc2b1yhgVK6rVLhMEege1tDc80rsEHzGXrwszuSkTc4ro7BhshtkXmvzU9CCtoMJLBZW7TjbCKIFs1So7GbFw9ZSFGK1vfNT9xQM= Received: by 10.70.82.20 with SMTP id f20mr2716216wxb; Thu, 12 Jan 2006 22:32:34 -0800 (PST) Received: by 10.70.39.18 with HTTP; Thu, 12 Jan 2006 22:32:34 -0800 (PST) Message-ID: <1fa17f810601122232l25551bc5n4e4a01ff6b7921e@mail.gmail.com> Date: Fri, 13 Jan 2006 14:32:34 +0800 From: prime To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: How priority propagation works on read/write lock? 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: Fri, 13 Jan 2006 06:32:35 -0000 Hi hackers, I have a question about how priority propagation works on read/write lock.On locks that have only one owner at a determinate moment,we can simply propagate the priority to the owner of lock,but read/write lock may have many owners at some time,so how can we know who are the owners? I browse the OpenSolaris' read/write lock implementation,and find that, it simply treats the owner of the lock as NULL when readers own the read/write lock.In this way,we can not propagate our priority to all threads that block us. Thanks very much. -- Three passions, simple but overwhelmingly strong, have governed my life: the longing for love, the search for knowledge, and unbearable pity for the suffering of mankind. ---------Bertrand Russell