forkbomb.html 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <html>
  2. <head>
  3. <title>forkbomb</title>
  4. <body bgcolor=#ffffff>
  5. <h2 align=center>forkbomb</h2>
  6. <h4 align=center>OS/161 Reference Manual</h4>
  7. <h3>Name</h3>
  8. forkbomb - create hundreds of processes
  9. <h3>Synopsis</h3>
  10. /testbin/forkbomb
  11. <h3>Description</h3>
  12. forkbomb does
  13. <pre>
  14. while (1) fork();
  15. </pre>
  16. doing a bit of additional checking similar to that done by
  17. <A HREF=forktest.html>forktest</A>.
  18. <p>
  19. <strong>
  20. DO NOT RUN THIS ON A REAL SYSTEM - IT WILL GRIND TO A HALT AND
  21. PEOPLE WILL COME AFTER YOU WIELDING BASEBALL BATS AND/OR THE AD
  22. BOARD<sup><font size=-1>*</font></sup>. WE WARNED YOU.
  23. </strong>
  24. <p>
  25. <font size=-1><i><sup>*</sup> The Administrative Board of Harvard
  26. College handles formal disciplinary action.</i></font>
  27. <h3>Requirements</h3>
  28. forkbomb uses the following system calls:
  29. <ul>
  30. <li> <A HREF=../syscall/fork.html>fork</A>
  31. <li> <A HREF=../syscall/getpid.html>getpid</A>
  32. <li> <A HREF=../syscall/write.html>write</A>
  33. <li> <A HREF=../syscall/_exit.html>_exit</A>
  34. </ul>
  35. We don't expect your system to withstand this without grinding to
  36. a halt, but once your basic system calls are complete it shouldn't
  37. crash. Likewise for after your virtual memory system is complete.
  38. <p>
  39. Note that this may turn out to be hard to achieve in practice. Don't
  40. spend much time fixing problems forkbomb triggers that won't arise
  41. under more normal operation. (If in doubt, consult the course staff.)
  42. </body>
  43. </html>