[comp.os.minix] An implementation question

PL147744%TECMTYVM.BITNET@cunyvm.cuny.edu (Marcela Bonilla J.) (04/22/89)

The problem is :

Modify the scheduler of Minix to keep the control of the CPU time that
each user's process has had recently. When any of the tasks or servers
want to get the CPU, the user process with the less CPU time will get it.

A friend and I thought that maybe building the ready queue ordered by
those CPU times must be the solution. We will modify the "ready" and "sched"
procedures of the "kernel/proc.c" file in those parts in which it modifies
the pointers "ready_head(USER_Q)" and "ready_tail(USER_Q)".

But.. how can we now how much CPU does a process has had ?
We thought that the variable "user_time" could help us in this, but we
are still without knowing if this user_time is the CPU time of the process
or what... another friend told us that this variable can be modify
by other processes plus the accounting routine of the clock's task.

Can anybody tell me if this is a good solution ? Is "user_time" the real
CPU time of each process ? If not... how can I know it ?

Any hint to prove that the sched is working as I want....

Thanks for any help... =)


May