5 ms·
Don't forget fonts!
by _asummers 9y ago
Don't forget fonts!
- wolfgke 9y ago> Don't forget fonts! It is today considered a design mistake that GDI was moved to kernel mode in Windows NT 4.0 for performance reasons (https://en.wikipedia.org/w/index.php?title=Architecture_of_Windows_NT&oldid=782493134#Executive https://en.wikipedia.org/w/index.php?title=Architecture_of_W...). But with Windows 10 Anniversary Update font parsing is done in user mode within an AC ["AppContainer"] (source: https://blogs.technet.microsoft.com/mmpc/2017/01/13/hardening-windows-10-with-zero-day-exploit-mitigations/ https://blogs.technet.microsoft.com/mmpc/2017/01/13/hardenin...).
- _asummers 9y agoOh, I didn't know that! I haven't used Windows in any serious capacity since 7, so that's refreshing to hear.
- twoodfin 9y agoWas it really a mistake in a practical sense? Does Microsoft move their consumer base to the NT kernel via XP a few years later (a massive win for their platform overall) if GDI performance had to take a big hit?
- wolfgke 9y ago> Was it really a mistake in a practical sense? This is what many people on the internet say. This does not mean there there might be good arguments for the opposite standpoint, too. At least I can tell that Microsoft is working to move parts of GDI step by step from the kernel back to user mode again, which should provide evidence that they consider this decision as a historical mistake, too, because it opens too many potential gateways for security flaws.
- lmm 9y ago> which should provide evidence that they consider this decision as a historical mistake, too, because it opens too many potential gateways for security flaws. Or perhaps it was the correct decision at the time, but now (decades on, with computing power orders of magnitude cheaper and security vulnerabilities orders of magnitude more expensive) a different decision is appropriate?
- Analemma_ 9y agoI don't know about that... plenty of other operating systems didn't render fonts in the kernel at the time, and they seemed fast enough. Let's just say it was a mistake but that we can be happy Microsoft is now fixing it.
- lmm 9y ago> plenty of other operating systems didn't render fonts in the kernel at the time, and they seemed fast enough. Which ones? I'd be surprised if either of classic MacOS or BeOS didn't have the display layer in the kernel; Solaris had it in userspace but was pretty slow; BSD was still tangled in lawsuits and Linux barely existed.
- dgfgfdagasdfgfa 9y ago> BSD was still tangled in lawsuits and Linux barely existed. Yea, but they seemed fast enough with rendering fonts in the userspace (xfstt). Which is what I thought we were talking about.
- lmm 9y ago> Yea, but they seemed fast enough with rendering fonts in the userspace (xfstt). I don't remember there being enough GUI applications around on Linux/BSD to be able to talk about whether font rendering was fast or slow. Anything that used motif was slow, netscape was very slow. xterm was fast but fixed-font.
- wolfgang42 9y ago
- Animats 9y agoMark Russinovich, before Microsoft hired him, once demonstrated that moving the GDI into the kernel wasn't necessary for performance. Windows NT was a nice, clean system from Dave Cutler, but wouldn't run a lot of code that ran under Windows 95. Especially 16-bit programs, which ran in a compatibility box under NT which was not tolerant of 16-bit programs doing things they were not supposed to be doing. XP put a lot of marginal Windows 95 code in the NT kernel and supported bad 16-bit programs. It took a decade for Microsoft to dig out from that mess.
- Pxtl 9y agoHappy to hear they've got it sandboxed further than just "user mode". Whenever I hear fussing about code running in userland vs kernel I think of this comic: https://m.xkcd.com/1200/ https://m.xkcd.com/1200/
- jwilk 9y agoNon-mobile link: https://xkcd.com/1200/ https://xkcd.com/1200/
- lawnchair_larry 9y agoNote that this is only the case for untrusted fonts. Trusted fonts stayed in the kernel, which suggests that Microsoft still does believe the performance reasons are valid.
- myrandomcomment 9y agoThe most amusing part of this was in NT 3.x they made a big deal about everything not being in the kernel in all their marketing vs Netware where a bad NLM could crash a Netware server.