In school this semester, we learned about Cyclone and Coldfire processors, which do true multitasking. Those CPUs can really have more than one process running simultaneously, and not just give the illusion of it by switching back and forth between the processes very quickly.
My question is, what does it mean when I look at my gkrellm window, and see my CPU usage in my desktop computer? It usually hovers at about 10% when I only have firefox running. Since I have an AMD CPU and not a Cyclone or Coldfire in my desktop computer, then really it should always say either 0% or 100%. Right? It’s always going at 2 GHz, so it should use the entire CPU to work on one process, then finish that process, then do nothing (wait or nop), then go full throttle on another process. Is that right?
Ok. Thanks for your reply! I guess firefox is always doing something, because if it wasn’t, then the CPU graph in gkrellm would go back down to 0% as soon as my webpage finished loading. Firfox is probably doing things like waiting for user input from the keyboard, waiting for a login timeout, etc etc.
I’m still learning about Linux’s innards, but to set this up, I read one of Matt Pietrek “Windows Internals” books many years ago (can’t remember the title now; this was in the Win98 era). Most modern OSes actually run many, many threads/processes/[insert fuzzy term here], most of which you never see or know about.
Windows runs many of these processes in user space with a corresponding “window” so that they can receive messages. But all of these windows are normally hidden.
Pietrek wrote a little gadget program that would change HIDE to SHOW on all of these windows. As soon as I ran it, my task bar exploded and filled with icons. I had to do a power-off reboot to get Windows back.
Hold that thought.
Actually, a multi-processor system can accomplish almost the same thing. The key is whether the OS kernel is well-written to exploit the availability of more than one processor or core.
My question is, what does it mean when I look at my gkrellm window, and see my CPU usage in my desktop computer …
On any modern system, the processor is almost always doing something. Remember that there are typically many, many different threads executing on a modern OS, from user apps to drivers and modules to the kernel itself. Each might only need a tiny bit of CPU utilization, percentage-wise, and are thus be “off the screen” with top. They don’t show up.
(for example an autorefresh or image slide)
Top is indeed a nice application to see if anything is behaving badly.