Playing with the Linux Scheduler

Hi,

To begin with let me explain my system and then I will come to the problem.

System:

My program forks 2 child processes. These child processes further start 2 user level threads (pthreads) and 2 kernel level threads (kthread). All these threads issue various system calls. I am using Ubuntu with Linux kernel 2.6.39-rc7

Problem:

I want the following informtion about my system:

  1. Scheduling information of the process and/or threads. ie. when was a particular process and/or thread scheduled.

  2. Thread state information. ie. when and which thread is waiting for an I/O to get over. And is there a way, I can measure how much time does I/O takes?

  3. Context switch information. ie. which system call caused the context switch and from which thread does this system call was called from?

Further, in case if I want to make changes to the linux scheduler and the context switch functionalities, then which files should I aim for?

I would really appreciate if you can answer all or part of these problems.

Thanks

Bumping up posts or double posting is not permitted in these forums.

Please read the rules, which you agreed to when you registered, if you have not already done so.

You may receive an infraction for this. If so, don't worry, just try to follow the rules more carefully. The infraction will expire in the near future

Thank You.

The UNIX and Linux Forums.