Windows as Multi-Threaded OS

UaVaj

Golden Member
Nov 16, 2012
1,546
0
76
why is Windows NOT a multi-threaded operating system?

multi-threading as in. regardless of software/game running. the operating system takes the given task and divide it among the available cpu cores and then combine the sub-results for a final result.

obviously there some latency/waiting/check-points depending on how much each individual divided task takes to complete before results can be recombine. even so. this would be much faster than having only only 1 or 2 core to completing the whole task.
 

jkauff

Senior member
Oct 4, 2012
583
13
81
Parallel programming is not easy to do. That would be a massive undertaking for an operating system like Windows, and not likely to happen. You'll probably see certain Windows functions go multi-threaded in the future, but not the whole enchilada.

The only way I can see this happening is if Microsoft adopts an experimental parallel OS from some university research lab and builds a new Windows on top of it, similar to what Steve Jobs did when he licensed the Mach kernel from CMU for the NeXT OS, and then later built OS X on top of that.
 
Last edited:

ninaholic37

Golden Member
Apr 13, 2012
1,883
31
91
multi-threading as in. regardless of software/game running. the operating system takes the given task and divide it among the available cpu cores and then combine the sub-results for a final result.
Easier to let the software have control over what it wants to do.
 

Merad

Platinum Member
May 31, 2010
2,586
19
81
It would require a complete overhaul of how the windows kernel operates. It's pretty likely that it would break compatibility with essentially all existing windows software, and that software would require extensive modifications to work on the new model. Also, the overwhelming majority of developers would have to totally re-learn how to design their programs.

However, the real issue is that most programs simply aren't very computationally intensive. You're talking about a radical change that would only benefit a small minority of programs that run on windows.

Lastly, if you have a program that would really benefit from the highly parallel task based model, there are already good tools for building those applications, like Intel Thread Building Blocks.
 

UaVaj

Golden Member
Nov 16, 2012
1,546
0
76
merad. thanks for that explanation. does make sense as to why microsoft choose not to implement this on windows.

anyway - was thinking in terms of an API that would take over control of the multi threading process. software -> API -> spread load over multi cpu -> API -> software.
 

Merad

Platinum Member
May 31, 2010
2,586
19
81
anyway - was thinking in terms of an API that would take over control of the multi threading process. software -> API -> spread load over multi cpu -> API -> software.

That's essentially what Intel's Thread Building Blocks library does. You take whatever work your program needs to do and split it up into small-ish "chunks", or tasks. You then feed the tasks into TBB, and the library handles executing the tasks to make the best use of the computing resources available.

The problems are twofold. First, your program has to be designed to use this kind of system. It's simply impossible to take an arbitrary program and automatically split it up into tasks. Second, many problems just aren't well suited to being split up into tasks or threads. For example you often have shared resources that can only be accessed by one task at a time, so your tasks end up stalled waiting to access the resource and performance is no better than the single threaded variant, possibly even worse.
 

UaVaj

Golden Member
Nov 16, 2012
1,546
0
76
yeal. was asking for a "smart" api that can take any program and automatically split up the load.



based on what you are saying. looks like microsoft is already working on it. just not seamless yet.

perhaps microsoft will perfect it by time the next windows launches. that will definitely be a real reason to upgrade.



be nice to be able to run any given program and to have it automatically spread over all available cpu cores.
just like multi-gpu profiles where it distribute overall gpu load among all available gpu cores.
 

VirtualLarry

No Lifer
Aug 25, 2001
56,571
10,206
126
yeal. was asking for a "smart" api that can take any program and automatically split up the load.



based on what you are saying. looks like microsoft is already working on it. just not seamless yet.

perhaps microsoft will perfect it by time the next windows launches. that will definitely be a real reason to upgrade.



be nice to be able to run any given program and to have it automatically spread over all available cpu cores.
just like multi-gpu profiles where it distribute overall gpu load among all available gpu cores.

Sounds good in theory... EXCEPT... for "Amdahl's Law" scaling. Graphics is generally different, most graphics is infinitely scalable (up to the resolution of the display, or higher if super-sampliing is utilized).
 

UaVaj

Golden Member
Nov 16, 2012
1,546
0
76
not too concern about scaling... just want spread the load.

kinda pathetic that with a 4930k when play starcraft2. that 2.5 core are working their heart out while the other 3.5 core are on vacation.
 

TheELF

Diamond Member
Dec 22, 2012
4,027
753
126
Can't happen,windows would have to decompile the game (lawsuits bonanza,project doomed right there) and then decide, on an automated level, which things can run in parallel from each other,make the changes on its own and then recompile the game to run it.

And as it was said before, a lot of things in games are just serial in nature they can't be changed,it's like making a sandwich,even if you have a team of 6 people to make one they would have to put the bread down first THEN spread the butter on it THEN the cheese and so on(if the 6 people would smash the ingredients of a sandwich together at the same time you would get something but it would be a random mess and not the sandwich you were after) all these steps are one person jobs and if you would put two people on them they would just get in each others way and cause delays.
 

Merad

Platinum Member
May 31, 2010
2,586
19
81
perhaps microsoft will perfect it by time the next windows launches. that will definitely be a real reason to upgrade.

If Microsoft (or anyone else) can figure out how to do that within our lifetime it will be a nearly miraculous breakthrough.
 

matricks

Member
Nov 19, 2014
194
0
0
If this was as easy as you think, AMD should be rolling in cash with their more cores-approach. Are they?

You are asking Windows to do what only the programmer has the means to do. There are many tasks that can't be parallelized due to their nature. Even with tasks that can be parallelized, not all programmers can do parallel programming well, how can software written by humans fix poor code written by humans?