top - procps library

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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/



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux