Results 1 to 2 of 2
hi there i'm working on a project about implementing a new scheduler into kernel 2.4 version. i figured out the concepts of how it works. However, i struggle with compute ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 12-18-2012 #1Just Joined!
- Join Date
- Dec 2012
- Posts
- 3
compute the run time and sleep time of a process in kernel 2.4
hi there i'm working on a project about implementing a new scheduler into kernel 2.4 version. i figured out the concepts of how it works. However, i struggle with compute the exact run time (which determines the time process is on the CPU) and sleep time (the time process is waiting for the CPU).by the way, i figured out i could use getnstimeofday() - sleep_time(which is in task_struct) which gives the waiting time of a process (which is mainly what i want). i will be glad for every reply and thanks anyway.
- 01-24-2013 #2Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 10,227
It is easier to get this data from /proc, but the sysstat source code will help you figure out how this is done. In any case, source code excavations can reveal a lot of interesting cruft!
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!


Reply With Quote
