Posted By: Charles | Feb 2nd @ 12:11 PM | 79,301 Views | 16 Comments
Here, we continue our exploration of the morphology of Windows 7 on Going Deep with windows kernel architect Dave Probert. You may remember him from an early four part episode of Going Deep where he teaches us about general purpose operating system architectures and history: Part 1, Part 2, Part 3, Part 4

That was a great conversation from a few years ago and it's been way too long since we returned to Windows kernel world to converse with and learn from Dr. Probert. Not surprisingly, Dave has been busy innovating the Windows core.

Dave and team, working very closely with the Parallel Computing Platform People, have created a very compelling new user mode thread scheduling/management system in Windows 7. In a nutshell, the User Mode Scheduler provides a new model for high-performance applications to control the execution of threads by allowing applications to schedule, throttle and control the overhead due to blocking system calls. In other words, applications can switch user threads completely in user mode without going through the kernel level scheduler. This frees up the kernel thread scheduler from having to block unnecessarily, which is a very good thing as we move into the age of Many-Core... Speaking of Many-Core, remember the piece we did on the Concurrency Runtime (ConcRT)? ConcRT is built on top of UMS and is the best way to most effectively utilize this new user mode thread scheduling model in Windows 7

Make yourself comfortable and spend some time watching and listening to Dave make all of this crystal clear.

This is another great conversation with a fantastic OS architect and Windows kernel professor. Lots to learn here. Enjoy.
Rating:
9
0
rhm
rhm
Very interesting video.

So if I understand this correctly, this User-mode Scheduler feature of Windows 7 is basically about doing what Fibers do currently, but making them look and work like full threads from the user-mode code's point of view.

It's a shame they couldn't figure a way to do user-mode pre-emptive switching. That really would have been killer. Actually, all I'd need to implement something I've been thinking about (a special .NET Virtual machine with super-lightweight user-mode threads) is a way to get the OS to periodically interrupt designated unblocked OS threads and jump (not call) to a pre-set address, having saved off the registers to a pre-set location. I say "all I need...." there's probably a hundred big problems with implementing such a scheme, which is why I'm not a kernel developer and Dave is Smiley
Alphacore
Alphacore
An needed evil....

>>(a special .NET Virtual machine with super-lightweight user-mode threads)

My god , thats a terrible idea Sad...  one of plus of the windows kernel is its approach to multi thread.. you are purposing a way to create havoc inside an already butched kernel... ridded with shortcuts to improve gamming and graphics Sad

The original NT kernel was beautiful, a bit slow, but perfect in its original design, light years from unix.. now its a mix of hacks and tricks... Sad
What windows needs is to return to its origins an clean and Inspirated kernel based in very good ideas from VMS....
rhm
rhm
err, all I'm asking for is an entirely optional, leight-weight way to get your thread interrupted periodically. Doesn't affect any of the way the kernel operates, it's just a different way to interface with existing timer event functionality.

As for your views on the NT kernel evolution, the thing is speed matters a whole heck more than 'beauty' in the real world. Get used to it.
Charles I cannot thank you enough for this video.

Ever since you posted the video with Mark Russinovich briefly talking about UMS I've been quite interested in it but couldn't find much detail about it, so this video is a godsend.

Thanks a lot!  Keep up the great work Charles and the gang!
Cyonix
Cyonix
Me
Yeah awesome video Charles, Dave. Digging into the kernel is always fun
Facinating. The UMS stuff is very interesting and you can never have enough of Dave Probert talking about the Windows kernel design.
aL_
aL_
Rx ftw
i've a question, how is the tpl and plinq stuff related to the concRT stuff? is the tpl like a wrapper around concRT or are the paralell (haha) code bases or what? does the managed tpl use the ums in 7 as well?
also, joe duffy and the tpl guys are part of the pcp team right? id love to see an interview about the relation between the managed and unmanaged world here Smiley
This might be a little bit off-topic,

But a constant I've heard including this time, are optimizations to avoid hitting the kernel for the sheer cost of context switching and crossing the Kernel/User boundary, of course undertable the amount of operations that this requires.  But c'mon, this isn't a new problem guys like Robert are having this issue for at least 30 years.  Besides of GHz on the procesors , what are they doing to ease such switching.

Also Mr. Robert talked about the origin of the process/thread abstraction and  I've heard from Unix folks (not only linux bashers) that creating a process on Windows have a bigger impact that on *nix, where process are very ligth.  Perhaps Robert can shed some ligth on this.

Don't know, Charles, if this can even be included in an upcoming Going Deep video.

Thanx
Microsoft Communities