home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / os / os2 / advocacy / 8532 < prev    next >
Encoding:
Internet Message Format  |  1992-11-17  |  1.8 KB

  1. Xref: sparky comp.os.os2.advocacy:8532 comp.os.os2.misc:36790
  2. Path: sparky!uunet!ogicse!news.u.washington.edu!carson.u.washington.edu!tzs
  3. From: tzs@carson.u.washington.edu (Tim Smith)
  4. Newsgroups: comp.os.os2.advocacy,comp.os.os2.misc
  5. Subject: Re: OS/2 Crashproof? NOT!
  6. Message-ID: <1992Nov17.091742.6018@u.washington.edu>
  7. Date: 17 Nov 92 09:17:42 GMT
  8. Article-I.D.: u.1992Nov17.091742.6018
  9. References: <BxsoLo.qF@csfb1.fir.fbc.com> <1992Nov16.164438.27020@njitgw.njit.edu> <BxuC7D.9Bt@csfb1.fir.fbc.com>
  10. Sender: news@u.washington.edu (USENET News System)
  11. Organization: University of Washington School of Law, Class of '95
  12. Lines: 27
  13.  
  14. In article <BxuC7D.9Bt@csfb1.fir.fbc.com> uunet!csfb1!jbrock writes:
  15. >|> This will kill any Unix system:
  16. >|> 
  17. >|>     while (1) fork();
  18. >|> 
  19. >|> Such a thing can be done on most multitasking systems, and will kill
  20. >|> any OS that allows user-level processes to spawn child processes.
  21. >
  22. >I understand why unlimited forking will kill UNIX.  What I don't
  23. >understand is why operating systems of more recent design don't protect
  24. >themselves from such obvious dangers.  It doesn't seem that hard to me
  25. >conceptually.  In the above example the forks should begin to fail
  26. >before they have eaten up all the resources that the operating system
  27. >needs to function.  In other words, the operating system should reserve
  28. >sufficient resources to guarantee its own operation, and it should know
  29. >when it needs to begin turning down requests from resource hogs.  Is
  30. >this really impossible?
  31.  
  32.  
  33. It's quite possible, and Unix has done it for several years.  Only root
  34. can take the last process.  In more modern versions of Unix, I'm pretty
  35. sure that there is a per ID limit on the number of processes.
  36.  
  37. I'm not sure when the "only root can take the last process" came in,
  38. though.  It wasn't in V6, but I think it was in 32V.
  39.  
  40. --Tim Smith
  41.