pid rollover?

Walker Mangum walker at ficc.uu.net
Fri Feb 10 23:56:01 AEST 1989


In article <697 at root44.co.uk>, aegl at root.co.uk (Tony Luck) writes:
> Why "greater"?  If you reduce the range of pids enough, eventually you
> get to the state where the number of possible pids is equal to the
> number of slots in the proc table, and thus you could do away with the
> few places that still search the proc table for pids by just defining
> the pid to be the index into the proc table.  (and WOW, you could save
> 2 bytes from the proc structure by not having a p_pid element at all!).
> What would break if you did this (do the big mainframes already do
> something like this anyway ... if you want 1000 users on a machine you
> must be able to cope with 10,000 active processes ... and 30,000 pids
> 

Actually, there's a much easier method (since the pid really is arbitrary).
Many OS's for real-time type systems (where getting to a process's control
info with efficiency is important) simply assign a "pid" (task id) that is
the *index* into the "process table", or is actually an address in the 
"process table".  A system that comes to mind is Modcomp's MAX 32 OS.  It
ain't Unix, but it *can* process 50,000 *external* interrupts and do 10,000 
process context switches per second!

-- 
Walker Mangum                                  |  Adytum, Incorporated
phone: (713) 333-1509                          |  1100 NASA Road One  
UUCP:  uunet!ficc!walker  (walker at ficc.uu.net) |  Houston, TX  77058
Disclaimer: $#!+ HAPPENS



More information about the Comp.unix.wizards mailing list