From owner-freebsd-questions@FreeBSD.ORG Thu Jan 20 05:25:06 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1221D1065673 for ; Thu, 20 Jan 2011 05:25:06 +0000 (UTC) (envelope-from rjhjr0@gmail.com) Received: from mail-yx0-f182.google.com (mail-yx0-f182.google.com [209.85.213.182]) by mx1.freebsd.org (Postfix) with ESMTP id BBF978FC0A for ; Thu, 20 Jan 2011 05:25:05 +0000 (UTC) Received: by yxh35 with SMTP id 35so62216yxh.13 for ; Wed, 19 Jan 2011 21:25:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:date:from:to:subject:message-id :mail-followup-to:mime-version:content-type:content-disposition :user-agent; bh=5J3/MRuYdUGN9Abhn3ZVO78MwV3Cgol9LMvrQb4IS/k=; b=o7Ezy5jn2ZpDHAbmKaxeMHiqNshuerfl9woeV9eBLrQVvOtd5vNAcKUIjJznJb+K+P dPVm28lMcMn/6AiTj7epEu81b2dl+KKypD+Ud2O9VxN7UwDnzb96PITFty4J5Re84SB3 VNZ+3YpS9nVII5yF7g0h3aezHHdzY4nfC/URY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:subject:message-id:mail-followup-to:mime-version :content-type:content-disposition:user-agent; b=fsoRlrZ4Melu/PmOe7HaFJQN9taXmI+gAtOcWyofE8rSQiE+uNXLVqGsJRmEMrhMrz mXQSBSKDJoLMx9aZC6Isoi5/nBgOFpHSy3cxkJaM1fqjtyKpcwEhcszz/Cv9g6Lmv7XS dWhgL+TzHw7ymj6TfuRB6PdNcEmDT69VKO1Yo= Received: by 10.151.156.9 with SMTP id i9mr1936498ybo.158.1295501104982; Wed, 19 Jan 2011 21:25:04 -0800 (PST) Received: from localhost (ip98-163-115-74.dc.dc.cox.net [98.163.115.74]) by mx.google.com with ESMTPS id v4sm989597ybe.17.2011.01.19.21.24.56 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 19 Jan 2011 21:24:57 -0800 (PST) Date: Thu, 20 Jan 2011 00:24:54 -0500 From: Bob Hall To: freebsd-questions@freebsd.org Message-ID: <20110120052454.GA2983@stainmore> Mail-Followup-To: Bob Hall , freebsd-questions@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.3i Subject: statclock vs softclock X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Jan 2011 05:25:06 -0000 I hope this is the correct forum. I'm reading The Design & Implementation of the FreeBSD OS by McKusick & Neville-Neil, & I'm a little confused about statclock( ) and softclock( ). According to the book, statclock( ) ticks 128 times per second, and recalculates the priority of the current process every four ticks. If the recalculated priority is less than the current priority, it reschedules the process. However, on the same page, the book says that softclock( ) recalculates priorities once per second, and also reschedules processes. I must not be understanding something, because it seems to me that the book is saying that there are two routines doing the same thing and getting in each other's way. Can someone straighten me out? http://flylib.com/books/en/2.849.1.44/1 Thanks in advance.