lkml.org 
[lkml]   [2005]   [Mar]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: sched.c function

>I had a wild idea to process one function that repeatedly checks the task list
>and find out which process is in which state

Why do not you do so, then? Note that on uniprocessors, all other tasks are
suspended, so their state does not change in between.

Tasks do not change their state without holding a lock. (There is an exception,
but it is justified.)

>I can run for_each process after certain interval of time, but rather than
>using timer i thought to set a value or call the function (for_each_process)
>whenever sheduling occurs(that is some process is going to sleep and some are
>awakening) that is i am getting some changes in the task list after that..

So you want to record task state changes? That is better done at the right
places in the kernel rather than traversing the task list repeatedly (the
latter is not that performant).

>i am sorry if some of my concepts are wrong as i am new to kernel and would be
>obliged if you correct me thank for your help sounak

I would be interested in the background: what do you need to know the task
states for?



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

\
 
 \ /
  Last update: 2005-04-06 13:30    [W:0.217 / U:0.348 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site