Scheduling - More questions

Livia Catarina Soares (liviacatarina@zipmail.com.br)
28 Mar 1999 17:41:30 -0300


Dear Colleagues

Our friend Ralf already answer me my first questions.
As I am working in LINUX every day...now I have more doubts
:-).
The first one is:

1- In two moments the variable counter is initialized.

a) When a process is created (using the function do_fork in fork.c)
"p->counter = (current->counter >>= 1);"

b) When all process have counter equal to zero and it is necessary to reinitialized the variable counter (using the function schedule in sched.c).
"p->counter = (p->counter >> 1) + p->priority"

QUESTION: Why does the division by two is necessary ??

2- The function "sys_sched_yield" is defined in sched.c and
it uses the variable counter. I could not find where this
function is called

QUESTION: Do you know where it happens??

3- My kernel version is 2.0.34.

Once more...thank you for your attention.
Best regards,
Livia Catarina.
_____________________________________________________________
http://www.zipmail.com.br O e-mail que vai aonde você está.

_____________________________________________________________

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/