From: Rob McCool <robm@netscape.com> Newsgroups: netscape.devs-nsapi Subject: Re: Server Architecture (thread) Date: Fri, 26 Jul 1996 17:07:43 -0700 Daniel Piché wrote: > Can we have more information about what is the base server process > and its children. > > My understanding lead me to think that defining a server with one > process with many threads still create two UNIX processes. One base > process and one process for dealing with threads. So defining a > server with two process with many threads will create three processes. > One base process and two processes for dealing with threads ... so on. > > Is that right? More or less. In 2.0 the process model became more complicated. The base process acts only as a monitor. It waits for either the administrator to shut down, to restart, or it waits for one of the worker processes to exit so it can start the process back up again. However, on any system except IRIX, when you configure to use N processes, you actually get 2N + 1 total processes. The 1 process is still the base process, and you get two processes for each worker process you requested. This was done to facilitate NIS and DNS lookups without blocking all of the threads in a process. Under IRIX, it works the same way, except the extra NIS/DNS process isn't necessary. The confusing thing under IRIX is that each thread gets its own entry in the process table. > Where can we find more information about NSAPI new thread manipulation > functions? You should find some things in the manual. Look under systhread_*, crit_* and condvar_* -- Rob McCool, robm@netscape.com http://home.netscape.com/people/robm/ Stunt Programmer, Netscape Communications Corporation It was working ten minutes ago, I swear... Reproduced by permission of the author.