Posts Tagged threads
More than 100% CPU in top in Linux/Mac
If you are power linux/mac user you should have noticed at least once that top shows more than 100% CPU for a process. I also have seen this multiple times but always wondered how it can be. Here is an example of how my top looked when I started my java and was doing some number crunching.
Recently I did a bit of research and got to the bottom of this. So here is the reason for it. A process is said to be using 100% CPU if it uses a processor to the limit that processor goes ie it completely uses that CPU without giving any idle/free time for that CPU. Now consider the situation that we have a multi core CPU. What if the process has more than one thread ? Well if so there is a chance that the threads can be split between two cores. So if 100% is one CPU running at maximum power, then what is one CPU at maximum power and other using 10% of its computing power? Its 100% + 10% = 110%. That’s how the magical more than 100% CPU value comes in.
Continue reading “More than 100% CPU in top in Linux/Mac” »
User Level Threads
Posted by Srijith R in Assginment, C, linux on October 9, 2011
User level threads is created for light weight threads. It needs to be controlled, context switched and swapped by the process. To the Operating System it is only one process without any threads. Here is one implementation of it:
Continue reading “User Level Threads” »
Recent Comments