Originally posted by: Viditor
I have a friend who is a software engineer, and he was telling me of a project he was doing (speculatively) that involved breaking the CPU up into 1000+ virtual cores, and running each thread on it's own core...
This was way over my head, but he assures me that Windows can be modified to accomplish this fairly easily and that the results would not only double processing efficiency, but enable almost a 100% secure environment.
The immediate reaction is that it's rubbish.
As Markbnj stated, Windows, just like any pemt-capable OS, already do all that.
It's not called 'virtual cores' though. It's called sheduling and context shifts.
Also, there's really not much point in running each thread on it's own core. Why, would one want to do that? It kinda hints at some fundamental misunderstandings about what threads are and about how a processor works.
There is also the question about whether he really said what you understood him to say. And to what degree he put the things in inadequate terms in order to paint a picture for you.
But let's give it a benefit of doubt and assume you understood him correctly, and that your friend works for Microsoft and has access to Windows source code. If he doesn't, you kinda have my answer already.
What does 'virtual cores' mean? Essentially, it should be to have a Windows version that supports 1000 CPUs (What would that be, BTW?), and to fool the sheduler to release 1000 threads simultaneously to something else than the processor/processors. That "something else" is also in itself essentially a sheduler too. And, that "something else" would also need to run on a thread.
Now what's the point in doing that?
What he implies is that he has an idea for a better sheduler than Windows' current.
So why doesn't he say that instead?
Why not just replace the Windows sheduler?
"double processing efficiency"? Where is this processing inefficiency that he intends to take a bite of?
Well, if you run 1000 threads, you might want to reduce quanta length, and then you might want to do something about the context shifts.
If your friend's claims are valid, I would guess he is intending to somehow reduce the amount of housekeeping in some 'replacement context shift'. That's it.
But that isn't something that is easy to achieve.
You can do it with a completely different architecture. One that separates code from data and doesn't allow non-reentrant code. But that's not Windows, ...or any *nix.