kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
* User space context switch
@ 2011-03-18 20:07 mohit verma
  2011-03-18 22:43 ` Mulyadi Santosa
  2011-03-21  7:02 ` Vimal
  0 siblings, 2 replies; 4+ messages in thread
From: mohit verma @ 2011-03-18 20:07 UTC (permalink / raw)
  To: kernelnewbies

hi all,
  is it possible to write a user space code to calculate the context switch
time of a process ? I mean , how can the user space code know about the
working of the scheduler?
Is there any system call API to interact with scheduler or something other
to interact with , regarding  this problem?

-- 
........................
*MOHIT VERMA*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20110319/9191be17/attachment.html 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* User space context switch
  2011-03-18 20:07 User space context switch mohit verma
@ 2011-03-18 22:43 ` Mulyadi Santosa
  2011-03-21  7:02 ` Vimal
  1 sibling, 0 replies; 4+ messages in thread
From: Mulyadi Santosa @ 2011-03-18 22:43 UTC (permalink / raw)
  To: kernelnewbies

On Sat, Mar 19, 2011 at 03:07, mohit verma <mohit89mlnc@gmail.com> wrote:
> hi all,
> ??is it possible to write a user space code to calculate the context switch
> time of a process ? I mean , how can the user space code know about the
> working of the scheduler?

check lmbench...
-- 
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* User space context switch
  2011-03-18 20:07 User space context switch mohit verma
  2011-03-18 22:43 ` Mulyadi Santosa
@ 2011-03-21  7:02 ` Vimal
  2011-03-21  7:10   ` mohit verma
  1 sibling, 1 reply; 4+ messages in thread
From: Vimal @ 2011-03-21  7:02 UTC (permalink / raw)
  To: kernelnewbies

Hi Mohit,

On 18 March 2011 13:07, mohit verma <mohit89mlnc@gmail.com> wrote:
> hi all,
> ??is it possible to write a user space code to calculate the context switch
> time of a process ? I mean , how can the user space code know about the
> working of the scheduler?
> Is there any system call API to interact with scheduler or something other
> to interact with , regarding ?this problem?

Do check the function tracing framework in the Linux Kernel.

Links:
* http://lwn.net/Articles/322666/
* http://lwn.net/Articles/290277/

sched_switch is the tracer you're looking for.

-- 
Vimal

^ permalink raw reply	[flat|nested] 4+ messages in thread

* User space context switch
  2011-03-21  7:02 ` Vimal
@ 2011-03-21  7:10   ` mohit verma
  0 siblings, 0 replies; 4+ messages in thread
From: mohit verma @ 2011-03-21  7:10 UTC (permalink / raw)
  To: kernelnewbies

thanks  vimal and mulyadi.

On Mon, Mar 21, 2011 at 12:32 PM, Vimal <j.vimal@gmail.com> wrote:

> Hi Mohit,
>
> On 18 March 2011 13:07, mohit verma <mohit89mlnc@gmail.com> wrote:
> > hi all,
> >   is it possible to write a user space code to calculate the context
> switch
> > time of a process ? I mean , how can the user space code know about the
> > working of the scheduler?
> > Is there any system call API to interact with scheduler or something
> other
> > to interact with , regarding  this problem?
>
> Do check the function tracing framework in the Linux Kernel.
>
> Links:
> * http://lwn.net/Articles/322666/
> * http://lwn.net/Articles/290277/
>
> sched_switch is the tracer you're looking for.
>
> --
> Vimal
>



-- 
........................
*MOHIT VERMA*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20110321/a4ae36ee/attachment.html 

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-03-21  7:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-18 20:07 User space context switch mohit verma
2011-03-18 22:43 ` Mulyadi Santosa
2011-03-21  7:02 ` Vimal
2011-03-21  7:10   ` mohit verma

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).