ive searched alot but icant find some thing about windows 7 (n6.1 and after)could anyone please tell me,does windows7 using 1 to 1 method(in os we have 3thread management many to many.many to 1 .and one to one) like xp?or another method?
ive searched alot but icant find some thing about windows 7 (n6.1 and after)could anyone please tell me,does windows7 using 1 to 1 method(in os we have 3thread management many to many.many to 1 .and one to one) like xp?or another method?
The win32 API supports both the one-to-one and many-to-many models (in the thread library and fiber library respectively).
Windows 7, like all of the NT family, supports the win32 API.
but in many article in net they only talk about windows xp(it has win32 api?yes!) that use 1 to 1 method.why they didnt mentioned about many to many method that xp support?
You'd have to ask the author of the articles you have found. I can't read their minds.
Practically, fibers are not used all that often, AFAIK - probably related to them needing to be explicitly scheduled. That may be a factor.
Last edited by grumpy; 11-04-2014 at 07:02 AM.
can you please give me a linke about win32api supported models ,for that i read it?
thank you alot
Thread (computing) - Wikipedia, the free encyclopedia
at last i found an article that talking about my question.
Windows 7 supports kernel threads. So it must be a one to one model or many to many model.
But it is in fact a hybrid that supports both models. By default it will use traditional one to one scheduling, but depending on the number of scheduling entities available to the OS (based on the number of processors and cores), you can force it into a many to many scheduler. The operating system itself will never shift automatically. You must explicitly tell it to.
Note that the 32bit version of Windows 7 does not support M:N scheduling. Only the 64bit version.
Originally Posted by brewbuck:
Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.
Linux can also support M:N through libraries like RIBS2, just as windows would through the fiber API.
Hybrid is always better because you have an option to optimize thread scheduling, whereas before you had only one choice. But to take actual advantage of a many to many scheduler is another matter altogether. It will greatly depend on your need for a very large number of threads and what they are actually doing. I don't know the exact details though, since I was never involved in high performance projects with the need to create a very large number of threads. It is my understanding however that programming the threads becomes simpler, but managing them becomes harder. In particular you spend a lot of time in the testing phase trying to optimize your threads to the much more complex scheduler.
Originally Posted by brewbuck:
Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.