On Tue, 20 Jun 2000, Alan Cox wrote:

> >  Could anyone explain me what is a V7 like wakeup mechanism?
> 
> Old old unix systems took the address of the thing they wanted to wait on
> and placed it in the task structure. Since the number of processes is pretty
> low its easy for the CPU to walk the process table on a wakeup checking
> if the 'wakeup' for this process matches the value it is given to wake.

Since a realloc is a pretty expensive call, this pretty much means that
you have to allocate enough memory for the task struct to fit every
process you will be running. This would mean that you have to allocate too
much memory to be on the safe side. Isn't it possible to make a kind of
hybrid crossing between the V7 and the linux method. Like allocating a
relatively small struct, but then make it an option to grow the struct by
making a linked list of these structs. Given the low computative power of
the machines ELKS runs on, I can imagine that you could choose the memory
in such a way that a all kernel processes, with a few users processes (say
2 or 3) fit in on struct and that if the user is stupid enough to try to
do serious multitasking on his 8086 or palm pilot, the kernel allocates
another struct, the pointer to which is stored in the original
struct. This way you have the best of both worlds it would seem. Is this
stupid? Has it been tried?

Groeten,
Dries 


Reply via email to