From mboxrd@z Thu Jan 1 00:00:00 1970 From: j.vimal@gmail.com (Vimal) Date: Mon, 21 Mar 2011 00:02:29 -0700 Subject: User space context switch In-Reply-To: References: Message-ID: To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org Hi Mohit, On 18 March 2011 13:07, mohit verma 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