lkml.org 
[lkml]   [1999]   [Mar]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectScheduling - More questions
Date
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/

\
 
 \ /
  Last update: 2005-03-22 13:51    [W:0.046 / U:0.384 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site