[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
top - procps library
Hi All,
Browsing through the "top" implementation, I observed that it is written as
a library function.
The implementation is as a user space program and not as a kernel module.
I was just wondering, how correct will this be when it comes to the issues
of pre-emption (in user-space). The way top works -- it gets the system
time and finds out the elapsed time (since the last time) and calculates all
the statistics needed (per process, CPU utilization etc.). What if after it
finds out the elapsed time the module is pre-empted? All the calculations
will result in erroneous values. What is the rationale behind such an
implementation? Or am I missing out something?
Thank you in advance,
~learner
_________________________________________________________________
Watch Hallmark. Enjoy cool movies.
http://server1.msn.co.in/sp03/hallmark/index.asp Win hot prizes!
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/kernelnewbies/
FAQ: http://kernelnewbies.org/faq/