Or is my scheduler just that good (in which case, suck it Intel!!! AMD >>>>>> Intel)?
Okay, so for an intro to CS class I had to approximate pi by filling a unit circle with randomly generated points and calculating differences of areas, etc. I can attach the commented out source code if you guys really want. In fact, I should lol.
And coconuts = number of randomly generated points in unit circle. Oh, there was also a unit square, duh. But when I run this code for a large number of coconuts,1000000000 to be exact, I swear to God this code is multithreaded.
How do I know this? Interesting question. I used 3 sources to test this, top, htop and Gnome's default system monitor and they all agree with each other.
The scheduler liked to have my code jump all across my processors so I bound it, using taskset -c 2,3 java CoconutPi, and even then they all agreed, I was using 197.1% CPU for this task, according to top, 2 independently running threads (PID is 3751 and 3752) of the same name each running at around 100% from htop and the system monitor agreed with top, as well.
So my question is, how is this possible? Or am I just hallucinating?