From owner-freebsd-hackers Wed Jul 1 16:39:35 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id QAA16565 for freebsd-hackers-outgoing; Wed, 1 Jul 1998 16:39:35 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from smtp02.primenet.com (daemon@smtp02.primenet.com [206.165.6.132]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id QAA16556; Wed, 1 Jul 1998 16:39:34 -0700 (PDT) (envelope-from tlambert@usr07.primenet.com) Received: (from daemon@localhost) by smtp02.primenet.com (8.8.8/8.8.8) id QAA17268; Wed, 1 Jul 1998 16:39:30 -0700 (MST) Received: from usr07.primenet.com(206.165.6.207) via SMTP by smtp02.primenet.com, id smtpd017181; Wed Jul 1 16:39:22 1998 Received: (from tlambert@localhost) by usr07.primenet.com (8.8.5/8.8.5) id QAA27019; Wed, 1 Jul 1998 16:39:17 -0700 (MST) From: Terry Lambert Message-Id: <199807012339.QAA27019@usr07.primenet.com> Subject: Re: Unsupport calls To: imdave@mcs.net (Dave Bodenstab) Date: Wed, 1 Jul 1998 23:39:17 +0000 (GMT) Cc: hackers@FreeBSD.ORG, tlambert@primenet.com, freebsd-questions@FreeBSD.ORG, mkn@emailbox.hdtv.lucent.com In-Reply-To: <199807011642.LAA07192@base486.home.org> from "Dave Bodenstab" at Jul 1, 98 11:42:23 am X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > > > About the only serious one I can see is plock. Maybe somebody else on > > > the list can comment. > > From my old system 5 reference (when the OS used swapping rather than > paging): > > plock(2) - lock process, text, or data in memory > > #include > int plock( int op ); > > Plock allows the calling process to lock its text segment, its > data segment, or both into memory. Locked segments are immue to > all routine swapping. Plock also allows these segments to > unlocked. The effective user ID of the calling process must be > super-user. OP is one of: > > PROCLOCK - lock text and data > TXTLOCK - lock text > DATLOCK - lock data > UNLOCK - remove locks I forgot this old saw. This was from back in SVR2, before the PMMU hit System V. I can see something being slightly faster because of this, but I think that rtprio will do some of it. Traditionally in BSD, this was handled on a per image basis, using the "sticky bit". Of course, the flip side is that by doing this for your process, you may be starving other processes of resources, causing them to thrash, and thereby consume more quantum. Which, of course, would result in you getting scheduled less often. Which would mean that your program wouldn't be faster. In general, this type of soloution, and things like fixed scheduling classes (which SVR4.2/UnixWare 2.x use to "protect" the interactive response of the X server -- the X server is guaranteed a fixed amount of the available quanta) are a kludge to deal with the fact that there aren't working-set quotas. The corresponding behaviour of the UnixWare 2.x X server is that the X server pages still gets thrashed out to disk by the linker, but the X sever burns a fair amount of your CPU thrashing them back in to guarantee that the mouse handling code is there when you wiggle your mouse. So while this may be missing from FreeBSD, it's not really a bad thing, I think (except that FreeBSD also lacks working-set quotas, which should be implemented as LRU page stealing from your own page list on a per vnode basis -- NOT vnodes being used as swap for executable pages! -- at a minimum). Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message