Path: utzoo!attcan!uunet!husc6!ogccse!blake!uw-beaver!cornell!rochester!rutgers!bellcore!texbell!bigtex!milano!cs.utexas.edu!sm.unisys.com!csun!polyslo!steve From: steve@polyslo.CalPoly.EDU (Steve DeJarnett) Newsgroups: news.sysadmin Subject: Re: Outrageous amount of multiple forks Message-ID: <5810@polyslo.CalPoly.EDU> Date: 16 Nov 88 21:56:20 GMT References: <22401@cornell.UUCP> <2210005@acf3.NYU.EDU> <382@ivucsb.UUCP> Reply-To: steve@polyslo.CalPoly.EDU (Steve DeJarnett) Organization: Lab Rat Rumpus Room -- Cal Poly SLO Lines: 34 In article <382@ivucsb.UUCP> news@ivucsb.UUCP (Todd Day) writes: >In article <2210005@acf3.NYU.EDU> rosenblg@acf3.NYU.EDU (Gary J. Rosenblum) writes: >_On another note, today I found a student running this wonderful >_little ditty, which he named oddly enough virus.c: >_ >_main() { while (1) fork (); } >_ >_and he effectively halted a small vax (11/750). > >Isn't there something to prevent this sort of system crashing? It's >all too easy... Well, we have this happen about one week out of every quarter. The faculty tell the students about fork() for some operating systems project or for networking (or some such thing), but they fail to tell them how to use fork properly (not that it's that difficult, but people manage to do what you mentioned above all the time). The only possible solutions we've found (short of removing fork() from the libraries) is to limit CPU usage (you can do this on BSD -- don't know about System V or other Unix variants). The problem you run into is people doing real work that need more CPU time than normal (maybe only for one quarter). Sure, you can change the allocation, but it's an overhead that we (and many other places, I'm sure) don't want/need. So, we make broad, sweeping threats in the hopes of getting people to check their code thoroughly before running it (but it does still happen). You can either put up with it (which is what we chose to do), or implement resource limits. Other than that, you're basically stuck. ------------------------------------------------------------------------------- | Steve DeJarnett | Smart Mailers -> steve@polyslo.CalPoly.EDU | | Computer Systems Lab | Dumb Mailers -> ..!ucbvax!voder!polyslo!steve | | Cal Poly State Univ. |------------------------------------------------| | San Luis Obispo, CA 93407 | BITNET = Because Idiots Type NETwork | -------------------------------------------------------------------------------