From owner-freebsd-current Thu Jul 9 19:23:08 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id TAA05288 for freebsd-current-outgoing; Thu, 9 Jul 1998 19:23:08 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from smtp01.primenet.com (daemon@smtp01.primenet.com [206.165.6.131]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id TAA05279 for ; Thu, 9 Jul 1998 19:23:06 -0700 (PDT) (envelope-from tlambert@usr09.primenet.com) Received: (from daemon@localhost) by smtp01.primenet.com (8.8.8/8.8.8) id TAA28421; Thu, 9 Jul 1998 19:23:04 -0700 (MST) Received: from usr09.primenet.com(206.165.6.209) via SMTP by smtp01.primenet.com, id smtpd028392; Thu Jul 9 19:23:00 1998 Received: (from tlambert@localhost) by usr09.primenet.com (8.8.5/8.8.5) id TAA10893; Thu, 9 Jul 1998 19:22:56 -0700 (MST) From: Terry Lambert Message-Id: <199807100222.TAA10893@usr09.primenet.com> Subject: Re: Rate limit for system calls to prevent denial of service attacks? To: archie@whistle.com (Archie Cobbs) Date: Fri, 10 Jul 1998 02:22:56 +0000 (GMT) Cc: drosih@rpi.edu, freebsd-current@FreeBSD.ORG In-Reply-To: <199807091815.LAA09514@bubba.whistle.com> from "Archie Cobbs" at Jul 9, 98 11:15:28 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-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > Why would 100 processes doing > > main(){while(1) getpid();} > > be accounted for any differently than 100 processes doing > > main(){while(1) /* infinite loop in user mode */;} > > ? Or am I misunderstanding something. 1) Accounting is by process. 2) The issue is competition for quantum, and the current scheduler algorithm fails to decrease virtual priorities sufficiently fast if there is a large number of quanta between when you were last scheduled and when you are next scheduled. For the large number of processes that result from "for(;;) { fork(); }", this is a degenerate case for teh scheduling algorithm. 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-current" in the body of the message