5
1
I'm running multiple processes on my CPU simultaneously, and now I am trying to find out how much CPU power each of them can use until they start disturbing each other:
For simplicity's sake let's assume a machine with a single CPU, and assume CPU is the only resource that is relevant.
We now have two different processes running on our single CPU on a Windows 7 64-bit machine at equal CPU priority. We'll call them P1
and P2
. Both P1
and P2
use 20% of the CPU each.
Will they both run the same way as they would if the respective other wasn't running aswell?
Logically they would since there is more than enough CPU power for both of them to run. However due to sharing of the CPU the actual situation may be different.If the answer to 1. is yes: At what point will they begin interfering with each other?
Will they only begin interfering with each other once both of them try to use more than 50% of the total CPU power, or will they interfere much earlier for whatever reason?Would the answers to the previous questions be different if it was more than 2 processes, or different kinds of processes (with multiple threads each for example), and how would they be different?
Really good answer +1. So the only possible issue would be waiting times resulting from one process being ready earlier? Are these waiting times noticeable? And is there a way to reduce the waiting times of one process at the cost of the other process's waiting times? Like with changing priority or something? – Wingblade – 2014-10-05T01:48:57.973
1There's effectively no change by what program is ready first. Wait times are nearly insignificant in a windows environment; they don't become a problem unless you're hardware is severely underpowered.
Changing a priority only changes how the queue gets sorted, the queue sorted (called a scheduler) the thread scheduler will attempt complete all tasks from the higher priority program first, and a good one will not forget about the lower priority programs, and give them a fair share of the CPU. – Gregory Mullen – 2014-10-05T01:51:23.737
So I have nothing to worry about then? Would giving one of my processes higher priority still help it in some way (say if there is a sudden spike in CPU usage)? – Wingblade – 2014-10-05T01:54:42.123
1No, with the exception of the
realtime
priority you can't really hurt other programs execution, if you're constantly near 100% you might get screwed, but not in day to day usage. But still be careful with what you change. E.g. changing Chrome to a higher priority won't make it faster, it will only make everyone else have to wait just a little longer. The only times you will ever notice a change being helpful is lowering something that's hard on CPU cycles like transcoding A/V, or rendering, that way your computer works normally and it gets what's left. (PS I edited my first comment.) – Gregory Mullen – 2014-10-05T02:04:46.980That pretty much covers all my concerns, answer accepted. One of my processes is in fact A/V encoding-related, so I will put that to lower priority. – Wingblade – 2014-10-05T02:08:42.097