c# - CPU Utilisation -
i have small program attempts find largest prime factor of large number. have written program in c#. brute force , take quite sometime complete. deliberate i'm trying understand how cpu utilised.
how can utilise cpu. @ moment ever uses 25% while 68% of time cpu idle:
why program not use available cpu cycles?
update:
the cpu history 4 cores looks this
why none of these right @ top?
if computer has multicore architecture (which likely), way you'll high amount of usage if make use of multiple threads.
for example, if computer quad-core, you'll use 25% of cpu if use single thread.
by using multiple threads (either via explicit multithreading code or via parallel.for) you'll close 100%, not - there overheads keep programs achieving full usage. nature of algorithm (i.e. how parallelisable is) makes big difference. ray tracing embarrassingly parallel , overheads miminal.
Comments
Post a Comment