On Mon, Apr 09, 2018 at 05:36:43PM -0500, Bruce Dubbs wrote:
> On 04/09/2018 10:43 AM, Ken Moffat wrote:
> 
> > I meant the bit underneath that - I only have 4 cores (8 on my
> > haswell) and I use 40 line terms so lots of room for details, here's
> > a quick copy of the first few processes on an idle desktop:
> > 
> >    PID USER      PR  NI    VIRT    RES  %CPU %MEM     TIME+ S COMMAND
> >   1321 root      20   0  370.6m  55.4m   1.3  0.7   0:35.85 S Xorg
> > 22670 ken       20   0 3199.1m 146.4m   0.7  1.8   0:06.61 S falkon
> > 22733 ken       20   0 2276.9m 348.6m   0.7  4.4   0:21.15 S QtWebEngineProc
> >      1 root      20   0    4.2m   1.4m   0.0  0.0   0:00.40 S init
> > 
> > At that moment Xorg was using most cpu (1.3%).
> 
> You got me interested.  Evidently a process can use multiple cores when
> doing threading. A separate process is created with fork(), but not with
> threads ( pthread_create() ).  So depending on the number of threads, a
> single process can use multiple cpus (cores) and top will show that as a
> process with %CPU > 100.
> 
> https://stackoverflow.com/questions/807506/threads-vs-processes-in-linux?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa
> 
>   -- Bruce
> 
Thanks, that explains it.

ĸen
-- 
In my seventh decade astride this planet, and as my own cells degrade,
there are some things I cannot do now: skydiving, marathon running,
calculus. I couldn't do them in my 20s either, so no big loss.
            -- Derek Smalls, formerly of Spinal Tap
-- 
http://lists.linuxfromscratch.org/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to