Re: Processes in the Kernel
Wed, 2 Aug 1995 14:29:24 -0400 (EDT)

> I can see many advantages to the linked list. First, no process limit,
> unless the super user wants to set one. Should really cut down the
> time find_empty_process generally takes to run. Should reduce kernel
> size, no fixed array, generally the list will be smaller then the current
> array. The disadvantage I see is the kernel memory has to be allocated,
> but this only needs done once for each process.
> What are the advantages of the array?

Arrays are much faster than linked lists. Because you don't have to
chase pointers, you touch a whole lot fewer memory pages.

It's slower to insert in the middle, but you don't do this with a
process table anyway. If we are inserting on the array, we're broken. ;-)

If you make the array growable, the process limit goes away. Arrays
that grow a page at a time shouldn't mess up the memory allocation.

You would waste a few bytes on empty entries, but it's really not that
much, assuming you use an array of pointers and not an array of objects.

I don't have the sources handy right now, so I haven't looked - if my
comments diverge from reality, that's why, and feel free to chew me

   - David A. Holland             | Number of Americans holding reservations    | with Pan Am for a trip to the moon: 30,000