Subject: Why doesn't the schedule prevent processes from taking the machine over?
To: None <port-i386@NetBSD.ORG>
From: Peter Simons <simons@rhein.de>
List: port-i386
Date: 02/16/1998 22:29:11
-----BEGIN PGP SIGNED MESSAGE-----

Hi,

just for fun I tried to run a malloc-bomb type program on my
NetBSD/i386 1.3 machine. The program simply allocated 50 byte of
memory in an infinite loop.

For a good measure I started it with nice +20 and *boom* there my
machine went to its knees. After a few seconds all interaction was
impossible and the machine was practically dead. After I waited half
an hour for it to recover, I decided to reboot rather than waiting for
the a chance to deliver my CTRL-C.

The same happens if you have /tmp mounted to mfs and do a 
 
 $ cat /dev/zero >/tmp/foo


So I wonder why this is possible. I didn't have the guts to try this
on one of our SUNs, as most of them are important server machines, but
my guess would be that it's not as easy to kill the SUN as it is here.

- From my understanding, the scheduler is supposed to lower (or raise,
depending on your point of view :->) the priority of non-interactive
processes, processes that consume loads of CPU seconds that is. So I
assumed that delivering the CTRL-C wouldn't be a big deal.

Can anyone enlighten me what is happening here and whether there's a
good way to -prevent- it from happening?

	-peter

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3ia
Charset: latin1

iQCVAwUBNOivpw9HL1s0103BAQGKAgQAp7AQVyrr9HJULW23nZr/LLXopTUqq882
6dqiMg55FUy+Cln/HKKOJoYiLe0muGn/XQBEDhnfubT76ze9hFSALk4RDFMLPODU
5Sa1jI5es6gunT6EbXva+sND7yxiGwGcYB3Q6KXwbAiHIiuurlnlUzBhQ80oCrVT
OGyRnnTcbMg=
=vZOB
-----END PGP SIGNATURE-----