From owner-freebsd-hackers@FreeBSD.ORG Mon Feb 28 02:11:36 2005 Return-Path: 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 C868016A4CF for ; Mon, 28 Feb 2005 02:11:36 +0000 (GMT) Received: from smtp.ucla.edu (smtp.ucla.edu [169.232.46.136]) by mx1.FreeBSD.org (Postfix) with ESMTP id 94A4E43D46 for ; Mon, 28 Feb 2005 02:11:36 +0000 (GMT) (envelope-from ashcs@ucla.edu) Received: from mail.ucla.edu (mail.ucla.edu [169.232.48.135]) by smtp.ucla.edu (8.13.2/8.13.2) with ESMTP id j1S2BaYn018563 for ; Sun, 27 Feb 2005 18:11:36 -0800 Received: from ash (s226-171.resnet.ucla.edu [164.67.226.171]) (authenticated bits=0) by mail.ucla.edu (8.13.3/8.13.3) with ESMTP id j1S2BaSP027007 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NOT) for ; Sun, 27 Feb 2005 18:11:36 -0800 Message-ID: <000801c51d3a$e1ac47c0$abe243a4@ash> From: "Ashwin Chandra" To: Date: Sun, 27 Feb 2005 18:11:57 -0800 MIME-Version: 1.0 X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-Probable-Spam: no X-Spam-Hits: 1.054 X-Spam-Score: * X-Scanned-By: smtp.ucla.edu on 169.232.46.136 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.1 Subject: Priority Increasing X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Feb 2005 02:11:37 -0000 Hi all, Ive been trying to counter the malicious effects of a forkbomb by = setting the forkbomb parent and children to a PRI_MAX priority, although = this is not having any effect on the system load. Basically in my code when I know which process is acting maliciously = (forkbomb), I run the following simple code: FOREACH_KSEGRP_IN_PROC(p, kg) { printf("old prio:%d", kg->kg_user_pri); kg->kg_user_pri =3D PRI_MAX; printf(" new prio:%d", kg->kg_user_pri); } When it prints out, the old prio was 180 and the new gets set to 255 = although there is help to the system...the system is still under stress. = Do you guys know any good ways of hacking the scheduler to make a = process that is bad run MUCH MUCH less as to not overload the system? Ash