top command displays CPU utilization > 100% for a process

Does the topic sound absurd ?
I have observed “top” command displaying CPU utilization of more than 100% for a process. I was wondering how a process can occupy more than 100% of CPU time.

Answer lies in, how many processors the system has. This is because, “top” command displays the sum of all times spent on all processors. So a process could be scheduled in more than one processor before it completes unless user forces the process to be scheduled in only one processor. eg. Assume a dual core system. A Process say ‘N’ might have occupied x% (say 60%) of time in processor 1 and y% (say 60%) of time in processor 2. Top command displays the sum of both the percentages x% + y% ( 60 + 60 = 120% ).

Advertisements
This entry was posted in Unix and Unix Internals. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s