Thread: what thread management Windows7 use ?

  1. #1
    Registered User smahdi1991's Avatar
    Join Date
    Nov 2009
    Posts
    32

    what thread management Windows7 use ?

    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?

  2. #2
    Registered User
    Join Date
    Jun 2005
    Posts
    6,815
    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.
    Right 98% of the time, and don't care about the other 3%.

    If I seem grumpy or unhelpful in reply to you, or tell you you need to demonstrate more effort before you can expect help, it is likely you deserve it. Suck it up, Buttercup, and read this, this, and this before posting again.

  3. #3
    Registered User smahdi1991's Avatar
    Join Date
    Nov 2009
    Posts
    32
    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?

  4. #4
    Registered User
    Join Date
    Jun 2005
    Posts
    6,815
    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.
    Right 98% of the time, and don't care about the other 3%.

    If I seem grumpy or unhelpful in reply to you, or tell you you need to demonstrate more effort before you can expect help, it is likely you deserve it. Suck it up, Buttercup, and read this, this, and this before posting again.

  5. #5
    Registered User smahdi1991's Avatar
    Join Date
    Nov 2009
    Posts
    32
    can you please give me a linke about win32api supported models ,for that i read it?

  6. #6
    Registered User smahdi1991's Avatar
    Join Date
    Nov 2009
    Posts
    32
    thank you alot
    Thread (computing) - Wikipedia, the free encyclopedia
    at last i found an article that talking about my question.

  7. #7
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    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.

  8. #8
    Registered User
    Join Date
    Oct 2006
    Posts
    3,445
    Quote Originally Posted by smahdi1991 View Post
    can you please give me a linke about win32api supported models ,for that i read it?
    I'm sure google has lots of great stuff discussing a comparison of win32 threading models.
    What can this strange device be?
    When I touch it, it gives forth a sound
    It's got wires that vibrate and give music
    What can this thing be that I found?

  9. #9
    Registered User smahdi1991's Avatar
    Join Date
    Nov 2009
    Posts
    32
    Quote Originally Posted by Mario F. View Post
    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.
    is hybrid better than one to one or ?i ask because linux only using one to one!?

  10. #10
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    Quote Originally Posted by Elkvis View Post
    I'm sure google has lots of great stuff discussing a comparison of win32 threading models.
    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.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. NAT in Windows7
    By Lieta in forum Windows Programming
    Replies: 1
    Last Post: 04-22-2013, 10:53 AM
  2. DLL Properties @ Windows7 using g++
    By artur in forum C++ Programming
    Replies: 11
    Last Post: 05-30-2012, 06:41 AM
  3. how to run linux makefile in windows7??
    By huda in forum C++ Programming
    Replies: 1
    Last Post: 02-23-2012, 11:14 AM
  4. WindowsXP to Windows7
    By KIBO in forum Windows Programming
    Replies: 1
    Last Post: 06-09-2011, 05:52 AM
  5. regarding thread management in C
    By zahid990170 in forum C Programming
    Replies: 3
    Last Post: 04-24-2011, 12:25 PM

Tags for this Thread