User Mode Scheduling efficiency vs kernel mode scheduling
-
Wednesday, March 07, 2012 10:30 AM
Hi
I want a performance change report with using user mode scheduler instead of kernel mode scheduler!
and I also wonder what is "UMS is recommended for applications with high performance requirements that need to efficiently run many threads concurrently on multiprocessor or multicore systems." means exactly? I mean which process is high performance and with which measure we can tell an application is high performance and it is good to use ums for that or not!
All Replies
-
Tuesday, March 13, 2012 5:32 AMOwner
Hi Ali,
If you are creating and using threads today, by default, you are using the kernel mode scheduler. If you would like to switch to UMS, then you have to follow the API set in the link you posted above to implement your own. However, that said, it is not trivial to implement a UMS scheduler on your own and you have to carefully weigh the benefits.
Are you using PPL and ConcRT? If so, we allow you to choose a UMS scheduler underneath (in Visual 2010 only)- by simply setting the scheduler option. http://msdn.microsoft.com/en-us/library/dd492562.aspx
High performance application is loosely defined as any application, whose success is extremely sensitive to performance e.g. media processing, games etc. What UMS promises is three things:
1. Very low context switch overhead (about 10X faster that kernel mode context switching).
2. Response to kernel level blocking. Say your application is using 4 threads on a 4 core box. If one of the threads does a I/O call, or blocks on a critical section, UMS gives you the ability to respond to the blocking call by creating additional user mode threads.
3. Developer control of which user mode thread to execute next (as opposed to letting the OS scheduler round robin through them). There are a class of apps that this is useful for.
If your app falls in the category where it can take advantage of the promises, then you will find UMS beneficial.
Rahul V. Patil
- Proposed As Answer by Rahul V. PatilModerator Tuesday, March 27, 2012 11:29 PM
- Marked As Answer by DanielMothMicrosoft Employee, Owner Sunday, May 20, 2012 4:15 AM

