Simple question about CPUs and processes

Ryan Sommers ryans at gamersimpact.com
Mon Jan 31 07:02:47 PST 2005


security at revolutionsp.com wrote:

> Hi list,
> 
> I'd like some insight on the following; Me and a friend were discussing
> tech stuff and he said that, when using dual (or more) CPU systems, it is
> the hardware itself (and alone) choosing which CPU will execute this or
> that process.

The OS and the OS alone chooses which processes to migrate (move from 
one CPU to the other), which process to execute, and all that. This is 
pretty much the entire job of the scheduler. All the CPU cares about is 
endlessly executing instructions fed to it and delivering 
interrupts/exceptions. What your friend might be confusing is the fact 
that the CPU can receive an interrupt or exception and the CPU will then 
  begin executing the handler for that situation. This does not mean it 
is choosing which process to execute though. The handler might then make 
the decision to perform a context switch (switch the executing process).

There are a great many sources on the web on topics like these.

-- 
Ryan Sommers
ryans at gamersimpact.com


More information about the freebsd-hackers mailing list