On Sun, Jun 15, 2003 at 09:01:07PM +0300, Beni Cherniavsky wrote: > the system gets completely stuck for a few seconds. Increasing the > number increases the stuck time. Isn't a unix suppossed to protect > users from such DOS attacks in some way (just checked, executing it > from another user has exactly the same effect)?
man bash, see ulimit. > Perhaps it does: curiously enough, after doing this a dozen times, it > seems that linux has "learnt" the trick: I can now fork 2^20 times > with no effect! Can someone enlighten me what goes on? Two things most likely. The first is cache effects - the task structs are cached in the slab cache (so allocating and deallocating new task structs incur very little run time overhead), and the the relevant code paths and data are all in the CPU's cache. The second is the scheduler kicking in, and classifying the shell and / or the perl process as a CPU hog, and therefore lowering its dynamic priority. Hard to be more specific without profiling. -- Muli Ben-Yehuda http://www.mulix.org http://www.livejournal.com/~mulix/
pgp00000.pgp
Description: PGP signature
