From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Mon, 26 Jan 2015 23:10:29 -0800 From: Ori Bernstein To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Message-Id: <20150126231029.8c160c2541c3a8ed07c0a62f@eigenstate.org> In-Reply-To: References: <0F748B67-FB11-464C-84FA-66B4E0B29918@9.offblast.org> <44900c0d4896622fa8a9411b05efe730@brasstown.quanstro.net> <7A132462-4747-471A-A4BF-D9381E38A4EA@ar.aichi-u.ac.jp> <4c37cf728d5b0e7ae4ebd3c2e0c2cee4@brasstown.quanstro.net> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: arisawa Subject: Re: [9fans] protection against resource exhaustion Topicbox-Message-UUID: 3bc002c0-ead9-11e9-9d60-3106f5b1d025 Too complex to use, especially since processes come and go regularly. IMO, instead of killing processes, it would be better to keep the hanging behavior in place, but place limits on the resources used by a subsection of the process tree. Think ulimit, but applying to entire process heirarc= hies. On Tue, 27 Jan 2015 16:03:16 +0900 arisawa wrote: > Hello, >=20 > > i think it will go the same way with fork protection. how do you tel= l which program > > is at fault? how do you tell a program forking at high frequency, wi= th short lived > > children from a fork bomb? (such as a busy web server.) >=20 > only system administrator knows which processes should keep running. > therefore, as Lyndon mentioned, we need a mark =E2=80=9Cdon=E2=80=99t k= ill by resource exhaustion=E2=80=9D to processes. > if automatic determination is desired, the last stage of /rc/bin/cpurc = and /rc/bin/termrc may be the right place. >=20 > > i'm not sure i understand what you mean by "traditional programming s= tyle" here > > as plan 9 exists in part to break unix rules. >=20 > as Eric mentioned, we have many many codes such as > p =3D malloc(n); > if(p =3D=3D nil){ > ... > } > or > switch(pid =3D fork()) {/* assign =3D */ > case -1: > sysfatal("fork: %r"); > case 0: > ... > default: > ... > } > I have beeb writing codes believing those error return is working. >=20 >=20 --=20 Ori Bernstein