Does OS allocate each process to a separate core?
Hire the world's top talent on demand or became one of them at Toptal: https://topt.al/25cXVn
and get $2,000 discount on your first invoice
--------------------------------------------------
Music by Eric Matyas
https://www.soundimage.org
Track title: Hypnotic Puzzle3
--
Chapters
00:00 Does Os Allocate Each Process To A Separate Core?
00:43 Accepted Answer Score 12
01:09 Answer 2 Score 3
01:46 Answer 3 Score 3
02:30 Answer 4 Score 2
03:47 Thank you
--
Full question
https://superuser.com/questions/187566/d...
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#computerbuilding #multicore
#avk47
ACCEPTED ANSWER
Score 12
The OS cannot split an individual single-threaded process across multiple cores (although it may change which core an application is running on, but that's a different question), however it can run multiple processes, each on its own core. So, yes, if you have multiple processor intensive applications running in the background, it is likely you will still have a spare core sitting around doing little or nothing you can use to run other applications.
ANSWER 2
Score 3
To add to @heavyd's answer, the reason for this is the OS does not have the ability to determine which parts of the process are OK to run in parallel and which are not. If a program is not designed to run on parallel cores, you can have routines within the application that are designed to run sequentially running at the same time. This can cause all sorts of issues (like if 2 routines use the same memory block but are not meant to run at the same time).
The OS can use multiple cores for multiple processes since it does that anyways, but spreading a single-core application across multiple cores will cause all sorts of unexpected behavior.
ANSWER 3
Score 3
When it comes down to it, it doesn't matter if a processor is at 1% usage or 95% usage (as long as it is stable at 95% and not peaking), programs will be running at the same speed as long as it isn't hitting 100%. Unused CPU cycles are simply wasted.
Because of this, Windows 7 (on compatible processors) has a technology known as "core parking" which basically disables unused cores on your computer in order to save electricity.
Single threaded applications are automatically put across to alternate cores - I am not sure on the technology behind this, but I know it works quite well.
ANSWER 4
Score 2
Your initial sentiments are correct - there IS a negative slant toward multiple cores, and it's not really all that deserved.
Back in the day when most users only used their desktop PC for simple word processing, there may have been an argument. But these days, with things like browsers with multiple tabs, each in their own process (chrome and ie do process level separation for tabs) plus things like video decoders within web pages and extra tasks which could easily be offloaded like on-the-fly rendering of effects aka css3, even the browser alone can justify a reason for lots more ram, and a few cores.
Add to that the fact that some users might also be gaming on this PC, or using tools like garageband, imovie, handbrake, multiple cores can be a huge benefit.
It's not true to assume that you need to max out (ie. 100% cpu usage on a single core) a core in order for another core to be useful. Because we are talking parallelism here. Task switching within a cpu usually performs a batch of operations before it swaps its stack to another process. Not all of these tasks are cpu bound, so you won't see a cpu spike even though the core is locked.
Basically, you're right, but what is the most efficient number of cores? 2? 4? 12? This would most likely depend on the users habits... I tend to this 2-4 for most users, but I'm only guessing.