How does the OS run on a multi-core system?
Posted: Wed Aug 24, 2011 11:37 am
Hi,
In a multi-core system, I've learnt, the application processes (user) exploit the availability of multiple CPUs by dynamically creating threads and asking the OS to run them on particular cores (using APIs) . On receiving such a request, the scheduler schedules the said task on the requested CPU (if it's available).
But, how does the OS itself run on a muti-core system? Does every core run it's own copy of the OS independently? Or does the OS scale itself to run on multiple cores? The kernel is multi-threaded. But are these threads (of the kernel) scheduled to run on multiple CPUs dynamically?
To put the question in a better way - A user application achieves true parallelism by breaking itself into threads and running each thread on a different core. Does the OS also run that way?
In a multi-core system, I've learnt, the application processes (user) exploit the availability of multiple CPUs by dynamically creating threads and asking the OS to run them on particular cores (using APIs) . On receiving such a request, the scheduler schedules the said task on the requested CPU (if it's available).
But, how does the OS itself run on a muti-core system? Does every core run it's own copy of the OS independently? Or does the OS scale itself to run on multiple cores? The kernel is multi-threaded. But are these threads (of the kernel) scheduled to run on multiple CPUs dynamically?
To put the question in a better way - A user application achieves true parallelism by breaking itself into threads and running each thread on a different core. Does the OS also run that way?