# of processes per user (4.1bsd)
finn at pur-ee.UUCP
finn at pur-ee.UUCP
Wed Aug 10 02:22:41 AEST 1983
Forgiveness please if you have already seen this. I have reason to believe
that this did not make it very far, before being fried, so i posted again...
------------------------------------------------------------------------
I recently said that 25 was the max number of user processes in 4.1
Everyone is telling me 20. This is how I arrived at 25. In ../h/param.h,
MAXUPRC is defined to be 25. In ../sys/sys1.c, fork() calls a routine
that among other things, checks that it has room for another process.
It checks to see if the process table is full (root gets the last process
there, ...) AND it checks that MAXUPRC is not exceeded for all other
users. Why did everyone say 20?
--steve kramer
------------------------------------------------------------------------
I had always understood that the max # of processes/user was 20 also, so
I went looking. The closest thing that I found to 20 was NOFILE, which is
the number of open files a single process may have. MAXUPRC is the correct
number for max processes/user at 25. Try writing a small program that will
fork a maximum of 30 times, with the parent going to sleep for a minute or
two before exiting. Increment a counter and print it every fork. This is
a safe way to test the number of processes a single user can have at one
time. You should get a total of 25 processes, including your shell and any
other processes that you may have in the background, before it complains.
This is only for 4.1bsd! MAXUPRC is 20 for 2.8bsd (and I suspect for V7
also). This would explain why everyone insists on 20.
Merely an Arch-Druid among Wizards...
David Hesselberth, Purdue University Computer Center
{harpo, decvax, ucbvax} !pur-ee!finn (or) !pur-ee:pucc-h:adr
More information about the Comp.unix.wizards
mailing list