|
|
Jim Henderson <nos### [at] nospamcom> wrote:
> I think that would depend on the comparitive niceness levels, though,
> wouldn't it?
If two cpu-intensive processes have the same nice level, then the OS
will share the CPU among them about equally.
Naturally if one of the processes has a higher nice value then the OS
will give less CPU to it and more to the other (I'm not exactly sure
about the formula the OS uses for that; could even depend on the OS;
it would be interesting to know what the linux kernel does).
However, I got the impression from the original claim that if the
OS would run POV-Ray at maximum efficiency (ie. giving it almost 100%
of CPU time) then it would somehow be difficult for anything else to
do anything, and that everything else would go really slow. I got the
impression that he thought that if POV-Ray has (almost) 100% of CPU,
it would have something like "hijacked" the entire computer to itself
and that it would be difficult to get the resources back.
But of course that's not the case in Unix systems (nor in Windows).
The task scheduler has full control of the machine and nothing can go
over it. It will always schedule tasks at regular intervals (I think
that in a typical linux OS it does so each millisecond) and there's
nothing a program can do about it. This means in practice that the
task scheduler can for example completely stop a program from running
if it wants (and it doesn't matter if that program was using 99.9% of
CPU or whatever). The task scheduler has complete control. It cannot
be "hijacked" by any program in any way.
--
- Warp
Post a reply to this message
|
|