[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

[LI] fork()



Hi,
I had tried out the foll. program on my old Slackware box (386/4MB/ 10MB 
swap) a few years back.
main(){ int i; for (i=0;i<10; i++) fork(); }. I ran it as non-root. The 
hard-disk started swapping heavily and when swap was over(Shift-ScrollLock), 
all processes were thrown out("init" even) except for the "bash" associated 
with the current terminal. I tried out a stronger version
on a RedHat 5.2 box (P166MMX, 16MB,10MB+ swap partition).
main() { signal(SIGCHLD,SIG_IGN); while(1) fork();}. The process table got 
filled up (I think...) and I could no longer start a process (I executed it 
as root), but nobody was thrown out of RAM. Why?
  Is the process table size fixed? Does it get swapped(?!) ?
       In both cases, I had minimal processes running and only one
terminal active. kerneld was not running either.
- -
Bye,
Vimal
Model Engg. College
Cochin


______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
- --------------------------------------------------------------------
For more information on Linux in India visit http://www.linux-india.org/
The Linux India mailing list does not accept postings in HTML format.

------------------------------