Linked by Eugenia Loli on Sat 17th Dec 2005 16:33 UTC, submitted by mono
Windows "TechWorld is reporting that Microsoft plans to move graphics outside of the Windows Vista kernel by pulling the Windows Presentation Foundation (WPF, formerly codenamed 'Avalon') out of the Vista kernel. MSWatch asked Microsoft for clarification. Here's the official statement: "Because WPF is largely written in managed code on the common language runtime, it never ran in kernel mode."
Order by: Score:
ho, nice
by molnarcs on Sat 17th Dec 2005 16:51 UTC
molnarcs
Member since:
2005-09-10

So this is "you had no idea of what you were writing about" kinda statement. So Microsoft won't move graphics out of kernel space in Vista, because it was never intended to run in kernel mode in the first place...

On the other hand, the TechWorld article is not entirely wrong - it is a change compared to WindowsXP, so yeah, they move graphics out of the kernel, but not out of the Vista kernel, because it was never inside it, and not even outside the XP kernel, because WPF isn't written for XP...

Reply Score: 2

RE: ho, nice
by Anonymous on Sat 17th Dec 2005 17:04 UTC in reply to "ho, nice"
Anonymous Member since:
---

That's what happens when you put php+mysql @ 3.95mo kids writing tech articles...

Reply Score: 2

RE[2]: ho, nice
by Anonymous on Sun 18th Dec 2005 03:21 UTC in reply to "RE: ho, nice"
Anonymous Member since:
---

a lot like this site... heh

Reply Score: 0

RE: ho, nice
by Anonymous on Sat 17th Dec 2005 21:57 UTC in reply to "ho, nice"
Anonymous Member since:
---

No, they don't move graphics out the kernel: Avalon is a high-level-layer, more like an API. It's likely rendered by some lower-level stuff like OpenGL or normal Windows graphics drivers.

Reply Score: 0

RE[2]: ho, nice
by n4cer on Sun 18th Dec 2005 00:20 UTC in reply to "RE: ho, nice"
n4cer Member since:
2005-07-06

No, they don't move graphics out the kernel: Avalon is a high-level-layer, more like an API. It's likely rendered by some lower-level stuff like OpenGL or normal Windows graphics drivers.

This isn't about Avalon. It's about Vista's display driver architecture (VDDM). Display drivers written for Vista consist of a display driver and a miniport driver. This is not unlike the Windows 2000/XP driver model except in those OSes both driver components and the graphics engine were in kernel mode.

In Vista, the graphics engine and display driver are in user mode while the miniport is still in kernel mode.

Here are a couple of diagrams to make things clearer:
2000/XP
http://msdn.microsoft.com/library/en-us/Display_d/hh/Display_d/Vide...

Vista
http://msdn.microsoft.com/library/en-us/Display_d/hh/Display_d/Disp...

beat me to it Anonymous (IP: 70.70.144.---) :-)

Edited 2005-12-18 00:27

Reply Score: 1

RE[3]: ho, nice
by Anonymous on Sun 18th Dec 2005 02:25 UTC in reply to "RE[2]: ho, nice"
Anonymous Member since:
---

What is really important to note is this is the FIRST time that the rendering extensions portion of the driver (the GFX engine components supplied by OEM's) has actually been moved out of kernel mode or OS subsystem address space.

Most people (including nearly every post on OSNews) misunderstand the NT 4 architectural changes that were made. In that case, user+GDI windowing and graphics subsystems (Microsoft supplied) components were moved out of the user mode win32 subsystem (csrss.exe) and moved into kernel mode as a driver (win32k.sys). The vendor supplied components (miniport and hardware specific rendering routines) were always either in kernel mode or ran in the same address space as vital operating system code (csrss.exe). The code was NEVER isolated in a separate (non-OS critical) address space.

It is also very important to note that any failure that occurred in csrss.exe, despite running in user mode, would take the system down with a bluescreen indicating that a fault in a critical subsystem (csrss.exe) had occurred. Csrss.exe is the user mode integral win32 application environment subsystem and, as such, the system can’t function with out it.

The stability issues with NT 4 were a result of a rushed development process, not fundamental architectural issues. The moving of user+GDI code to kernel mode made tremendous sense as there was little logic to keeping it in csrss.exe when all sorts of “rule breaking” and resource expensive tricks were needed to improve performance (thread paring, special fast context switch routines, shared buffers, etc.). Windows Server 2003 is very stable by any measure (the most stable version of NT to date) and is based on what is a nearly identical graphics driver model to NT4.

Now, what has changed in Longhorn is that some of the hardware specific rendering routines (Direct3d related) that used to run in kernel mode have been moved into user mode via the D3d runtime environment used by D3d application and the new compositing display engine (uxss.exe), which is completely Direct3d based on the output or backend via the Direct3d runtime environment.

It is interesting to note that user+GDI applications still call (via stub dll) into routines hosted in the KERNEL mode win32k.sys driver which in turn calls functions in the new DirectX kernel mode subsystem rather than the old vendor supplied routines. This new DirectX kernel subsystem has a GPU scheduler, memory manager and the ability to render GDI apps either directly to the screen (via the miniport driver if the compositor is turned off) or to an off-screen texture buffer which is then used as a texture by the compositor (uxss.exe) and placed on top of a 3d surface. This is how Longhorn can switch dynamically between composited and traditional modes on the fly.

It is VERY important to note that this new Microsoft supplied kernel mode subsystem takes over much of the work the old vendor supplied routines were responsible for. Only the D3d implementation specific code is left for the vendor to implement and that runs in the user mode uxss.exe process (that aforementioned compositor) or the user mode address space of a Direct3d application. It is through both a combination of Microsoft taking over a large amount of the hardware control process and moving vendor supplied portions of code to user mode that a big gain in stability is expected (note: nowadays, it is very rare that Microsoft supplied kernel mode code is responsible for system stability issues)

In short, the user+GDI pieces that were moved to kernel mode as of NT 4 are still in kernel mode. Also, the lowest level hardware control driver, the miniport driver, is still in kernel mode. However, much of the code the vendor used to write has been subsumed by the DirectX kernel mode subsystem. What remains, that isn't miniport, is in user mode as part of the D3d runtime environment.

All of this, by the way, sits BELOW Avalon, which is a display PROGRAMMING model that wraps around the D3D engine to provide an easy to use device independent vector based presentation engine (think of it as a super-wrapper for D3D).

I hope this clears things up.

Reply Score: 3

RE[4]: ho, nice
by ivans on Sun 18th Dec 2005 03:52 UTC in reply to "RE[3]: ho, nice"
ivans Member since:
2005-12-03

In short, the user+GDI pieces that were moved to kernel mode as of NT 4 are still in kernel mode. Also, the lowest level hardware control driver, the miniport driver, is still in kernel mode.

I think that this is crucial for (mis)understanding the claim that "Vista moves graphics out of kernel". The only thing that has been moved is SOME part of vendor-supplied driver logic that has been moved to userland (ring3) - the user mode display driver.

Inside the ring0 (kernel-mode) there are still:

1) vendor-supplied display miniport driver

2) win32k.sys which on NT 5.2- contanis USER/GDI/CON logic and on Vista this has all been mostly routed to kernel-mode DirectX driver

3) dxgkrnl.sys which is basically the core of Vista graphic subsystem as even OpenGl is routed onto it, and it's obviously NOT "moved out of kernel".

So basically user-mode WPF components are something analogue to gdi32.dll/user32.dll/comctl32.dll etc. for USER/GDI that we have today on winXP.

Also, WinFX redistributable (which contanis WPF/WCF/WWF) will be back-ported to winXP (you can download beta now), and I think that this very fact dismisses most claims of moving graphics to userland, since winXP DOESN'T and WON'T support LDDM and you DON'T need to reinstall your GPU drivers after winFX installation.

Reply Score: 2

RE[5]: ho, nice
by kaiwai on Sun 18th Dec 2005 04:07 UTC in reply to "RE[4]: ho, nice"
kaiwai Member since:
2005-07-06

So from how you explained it (ivans), Microsoft has basically taken on more of the back end work so that the vendor needs to do less to get their driver up and running - now in theory, that sounds nice, but it simply pushes the responsibility for (in)stability back to Microsoft - its a nice way of Microsoft to implicitly state, "the driver manufacturers can't get their shit together, so we're going to take on a large portion of the work involved".

As for instability, per say, it isn't always the drivers fault; I've seen instability that can be basically put right down to the poor quality of the actual hardware - I've run Matrox cards for most of my computing existance, and coupled with their drivers, I've never experienced the kinds of instability that I saw with my first (AND LAST!) Nvidia graphics card.

The issue shouldn't be so much "lets copy [operating system]" but asking HOW and WHY they can get performance so similar to Windows and yet, their graphics 'gear' sits on the outside of kernel space - Windows Vista was the perfect time to let loose with the slicer and remove the crap that was causing problems, but like so many other releases, Microsoft crumpled like a styrofoam cup, and scaled back their vision to something also resembling a service pack.

Reply Score: 1

RE[6]: ho, nice
by makfu on Sun 18th Dec 2005 05:00 UTC in reply to "RE[5]: ho, nice"
makfu Member since:
2005-12-18

"its a nice way of Microsoft to implicitly state, "the driver manufacturers can't get their shit together, so we're going to take on a large portion of the work involved". "

They did it for that reason, and because they needed to implement a controlled gfx pipeline, video memory management and device virtualization. The new directX kernel mode subsystem is a very sophisticated (I highly recommend reading some of the published documentation, it's really cool stuff) and, well, the old model just wasn't going to cut it going forward.

-Mak

Reply Score: 2

RE[7]: ho, nice
by kaiwai on Sun 18th Dec 2005 06:27 UTC in reply to "RE[6]: ho, nice"
kaiwai Member since:
2005-07-06

RE: makfu

Yes, but what I am saying is this, does it actually *REALLY* fix the inherient flaws that exist within the Windows driver framework or is it simply a matter of moving the chairs on the deck?

Yes, its all very nice to have sexy, sophisticated technologies, but if the underlying structured is completely buggered, is it really smart to all that based on a rotting copse?

Microsoft needs to have a good long hard look at the MacOS X driver kit, and same goes for the way they've done their 3d and 2d accelerated framework - and its not about copying copying something, but accepting that if someone works, then why not research it.

The only thing that actually helps Microsoft from its NIH syndrome is the massive R&D - if it weren't for all the cash they have on hand, the ability for them to unjustifiably re-invent the wheel each release would difficult; what Microsoft needs is some hardship, the $50billion taken off them, then maybe they would finally take pragmatic approaches to fixing problems using existing technologies rather than reinventing the world for the sake of it.

Reply Score: 1

RE[5]: ho, nice
by makfu on Sun 18th Dec 2005 04:51 UTC in reply to "RE[4]: ho, nice"
makfu Member since:
2005-12-18

I decided to finally register.

I wrote the rather long description that you summed up pretty well. The real issue that is causing so many people to misunderstand the LDDM is that the industry press (populated by people who really don't know very much about ComSci or OS internals) keeps making sweeping statements that mischaracterize the statements made by Microsoft.

All of this is very clearly (in my mind) publicly documented in the MSDN library.

Reply Score: 4

managed code
by MamiyaOtaru on Sat 17th Dec 2005 17:12 UTC
MamiyaOtaru
Member since:
2005-11-11

"Because WPF is largely written in managed code on the common language runtime," "2GB is the ideal configuration for 64-bit Vista".

Sorry for stitching together quotes from two different sources. Of course the situation is a bit more complex than that, but I can imagine Vista's out-there hardware requirements have something to do with using managed code.

Reply Score: 2

RE: managed code
by Tom K on Sat 17th Dec 2005 18:30 UTC in reply to "managed code"
Tom K Member since:
2005-07-06

Oh, you mean those fake hardware requirements that were made up at some point, and then subsequently posted all over the Internet as the official Vista hardware requirements?

Yeah, don't believe it. Vista will run fine on 512 MB -- and I know this because the latest Betas do so along with all of their debug/unoptimized code.

Reply Score: 4

RE[2]: managed code
by Anonymous on Sat 17th Dec 2005 18:44 UTC in reply to "RE: managed code"
Anonymous Member since:
---

An irony, of course, is that by the time Vista is sold these fake statements may not be different from the reality.

Today's budget notebook or PC goes with 512MB RAM, and more often than not you can get 1GB RAM with a new decent personal computer.

By the time Vista sold preloaded on new PCs, 1 GB RAM could become a low-budget option.

Reply Score: 0

RE[3]: managed code
by n4cer on Sat 17th Dec 2005 23:56 UTC in reply to "RE[2]: managed code"
n4cer Member since:
2005-07-06

An irony, of course, is that by the time Vista is sold these fake statements may not be different from the reality.

That still doesn't make those statements true as they were usually touted as requirements to run Vista. Just because the mainstream new computers of the time might meet those fake requirements doesn't mean you suddenly can't run Vista on lesser hardware that will be detailed in the official requirements.

Reply Score: 1

RE[4]: managed code
by segedunum on Sun 18th Dec 2005 17:09 UTC in reply to "RE[3]: managed code"
segedunum Member since:
2005-07-06

That still doesn't make those statements true as they were usually touted as requirements to run Vista.

The requirements to simply run Windows and the requirements to run Windows and actually run applications and get work done have historically been two different things with ;-).

If you were to try and run any of the Vista builds as a day to day OS, and install your usual software on it you'll find those hardware requirements are more than accurate. In many ways it looks as if they will be quite conservative.

Reply Score: 1

RE[5]: managed code
by Tom K on Sun 18th Dec 2005 17:31 UTC in reply to "RE[4]: managed code"
Tom K Member since:
2005-07-06

Oh yeah, because you're a Microsoft engineer now or something? Give it a break.

Vista will run fine with 512 MB -- because it already does. Once the debug cruft is cleaned out, and the code optimized, it will run perfectly.

Reply Score: 2

RE[2]: managed code
by Anonymous on Sun 18th Dec 2005 17:47 UTC in reply to "RE: managed code"
Anonymous Member since:
---

glad to hear that Vista has improved since beta one was released when it needed an infinite ammount of memory dependent on how often you felt like rebooting it.

Reply Score: 0

Not compatable with C++ kernal
by Anonymous on Sat 17th Dec 2005 17:29 UTC
Anonymous
Member since:
---

This managed structure doesn't fit into the scheme.
No one will us it xept for basic webpages. I do use a managed form of code but not locked in to only managed, this shows that .NET isn't compatible with C++. Too bulky.
For open source coding compatibility is most importnet I think. Just another large wrapper.

Reply Score: 0

RE: Not compatable with C++ kernal
by Simba on Sat 17th Dec 2005 18:14 UTC in reply to "Not compatable with C++ kernal"
Simba Member since:
2005-10-08

"No one will us it xept for basic webpages. I do use a managed form of code but not locked in to only managed, this shows that .NET isn't compatible with C++. Too bulky."

... That statement doesn't make any sense... Can you clarify it?

What do webpages have to do with it at all? And of course .NET isn't compatible with native C++. Native C++ doesn't run as managed code, and that defeats pretty much the entire purpose of .NET

Reply Score: 2

jayson.knight Member since:
2005-07-06

And now I need you to clarify...what do you mean by ".Net isn't compatible with native C++?"

Reply Score: 1

kaiwai Member since:
2005-07-06

It also depends on what you mean by native C++; .NET allows C++ to be used, the only down side, is you have to drop of a few unsafe C++ calls and start pulling in stuff from the .NET Framwork - thats no different to how Apple says that Cocoa supports native C++ through Objective-C++ support.

As for managed code, I think people need, especially the elitist ivory tower residing coders, and see it as a benefit which will allow them to tackle larger, more complex problems, and leave the mundane, accident prone crap to be taken care of by a managed environment - it isn't about duming down programmers, its about handing over mundane crap to a manager as to allow the individual to concerntrate on the more important things.

Reply Score: 2

Simba Member since:
2005-10-08

"And now I need you to clarify...what do you mean by ".Net isn't compatible with native C++?""

Well, I think what the original poster meant is that you can't run native C++ binaries under .NET... Well duh...

Edited 2005-12-18 01:54

Reply Score: 1

Vista Display Driver Model
by Anonymous on Sat 17th Dec 2005 18:47 UTC
Anonymous
Member since:
---

This is a pretty complete and authoritative source on what's going on:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/Di...


It seems to indicate that everything runs kind of like linux DRI, with a (not so) small kernel mode component to handle memory and I/O resources and a user-mode component to create the command streams for the graphics card. It seems to be done in this complicated way so that many surfaces can be rendered at once. The scheduling and DMA architecture is pretty complicated.

Reply Score: 1

The best idea in years isnt true..
by Anonymous on Sat 17th Dec 2005 21:59 UTC
Anonymous
Member since:
---

Too bad I thought Microsoft where copying X windows, the BEOS and the MAC + name you own favourite system with a user mode graphics server.
But it seems not this time, or not yet.

Reply Score: 0

Anonymous Member since:
---

With WPF the rendering pipline can be marshalled over the wire so that all rendering of the graphics developed with WPF can be rendered on a client machine using whatever capabilities the client can offer.

So for example you can have a terminal session that send rendering instructions rather than bitmaps to the client and if the client has a Direct3D 9 capable graphics card then all the work will happen on the client GPU.

Reply Score: 0

rayiner Member since:
2005-07-06

So you're saying that Vista is X11 + GLX?

No offense to Microsoft --- if a good idea is available, you're stupid if you don't copy it!

Reply Score: 0

Anonymous Member since:
---

Actually, truth be known. X11 was not a good idea. The only reason we got stuck with it is because the alternatives (which were technically superior) were closed and proprietary standards. X11 was open, and so ultimately we got stuck with an inferior system.

Reply Score: 0

Completely distorted comments
by Anonymous on Sat 17th Dec 2005 23:35 UTC
Anonymous
Member since:
---

First of all WPF (Windows Presentation Foundation, fomerly Avalon) is an API built on top of Direct3D. It is designed to give developers a simple and powerful API for developing future applications. The WPF was only going to be release with Vista but has since been back ported to XP. I should also point out that the API is backed by an XML based declarative language to make developing tools for UI extremely pratical.

What is new and unique in Vista is the Vista Display Driver Model (VDDM) which has the graphics driver moving out of kernel space and into user space. This will allow a couple of benefits. The first is that Graphics Drivers (which cause something like 70% - 80% of BSODs) can't bring down the system anymore. The other advantage is that a driver can be upgraded and installed without having to reboot.

Reply Score: 2

.NET is indeed compatible with Native C++
by Anonymous on Sun 18th Dec 2005 14:32 UTC
Anonymous
Member since:
---

What do you mean .NET isn't compatible with Native C++? Of course it is, although it requires magic underneath the covers. Lookup IJW (It Just Works), the name Microsoft gave to the ability to mix native C++ with managed C++ and therefore .NET.

Reply Score: 1

Simba Member since:
2005-10-08

It's basically Microsoft's equivalent to JNI. It allows you to run native, unmanaged code outside of .NET. This is usually not a good idea unless there aren't any other options.

Reply Score: 1

RE[2]: managed code
by MamiyaOtaru on Tue 20th Dec 2005 20:09 UTC
MamiyaOtaru
Member since:
2005-11-11

Not having tested the betas, I don't have that experience with which to judge the veracity of verious hardware requirement claims. I was a bit suspicious when the source claimed you needed double the RAM to run the 64 bit version though hehe

Of course I know not everything on the internet is true, I'll take the blame for going with what google turned up ;)

Reply Score: 1