Archives for posts with tag: _Win7UnderHood

Windows 7 is capable of certain levels of self-repair, as you’ve learned. One of the new capabilities in Windows is its ability to recover from serious failures that can impact the OS’s ability to boot. How does Windows 7 handle these errors? Can you boot Windows 7 into Safe Mode or to an earlier functional state when something really bad happens? Yes. You can, depending on the nature of the problem. How?

Stephan Doll, Pavan Kasturi, Desmond Lee and Baskar Sridharan make up most of the team that has enabled Windows 7 to be the most recoverable version of Windows to date. By ensuring that every Windows 7 machine has the ability to automatically diagnose and recover from most boot failures with little or no interaction from the user, this team’s work promises to greatly reduce—or even eliminate—the impact of a serious issue that would otherwise cause significant pain for Windows 7 users.

Tune in.

in reply to Inside Windows 7: Recovering Windows from System Degradation and Boot Failures

Windows 7 is here, available to all for purchase and ships today with new PCs! To celebrate this momentous occasion for Windows and Microsoft, Technical Fellow Mark Russinovich joins me in a discussion that extends the great conversation we had last year on Windows 7 internals. In his previous C9 interview, Mark told us about many of the new additions to the Windows kernel which enable Windows 7 (and Windows Server R2) to scale to large numbers of processors. Well, removing the kernel dispatcher lock is not all that the great Arun Kishan did. He also developed a new scheduling mechanism known as Distributed Fair Share Scheduling (DFSS). Mark describes what this is and how it works.

We also discuss NUMA, non-uniform memory access, (and Mark explains NUMA to us while showing a demo or two on a 256 processor machine!)

Moving on to Windows memory management, the domain of the great engineer Landy Wang, Mark discusses the new additions to the Windows Memory Manager and explains why they matter to those of us who spend all of our time and in user mode.

Learn about all of this and much more as Mark digs into the insides of Windows 7, way deep down in the system (the culmative effects of which help to make Windows 7 Microsoft’s most reliable, scalable and efficient general purpose operating system to date). As usual, Mark explains very complex mechanisms and concepts in a readily understandable way. This is a very conversational piece and we cover a lot of ground in a relatively short period of time. We also learn exactly why Mark is so passionate about operating systems and what the spark was that set off his passion and curiosity of how things work internally.

Mark will be presenting at PDC09 in the Technical Leaders track and the free Windows 7 Developer Boot Camp. His talks will be very deep and will explore all aspects of the new, improved Windows 7 kernel. I highly recommend that you attend both of these talks if you are going to PDC (you’re going, right?!).

Check out the Windows area on 9 for more great Windows 7 content, all rolled up into a nice experience!

Enjoy!

Note: Check out all the 9 Guys Mark has. :) Also, you should subscribe to his incredible blog.

RADAR is a memory leak detection technology built into Windows 7 and integrated with Watson (error reporting) and AutoBug (automatic bug filing). It allows Microsoft product teams and third parties to discover and fix memory leaks early in the product cycle and after release. Since RADAR runs on customer machines, leaks can be caught during public betas, after release, and by third parties, thus ridding the entire ecosystem of memory leaks. RADAR-shipped components are highly optimized to have no appreciable performance impact.
 

Meet RADAR developers Stephan Doll, Baskar Sridharan, Anthony Lorelli‎ and Keshava Subramanya. They dig into the architecture, design and implementation of this great technology. RADAR helps make Windows more reliable and stable by automatically pinpointing memory leaks in code that are then packaged up in bug reports that land in the hands of developers responsible for the memory leaking code. This means quicker to market solutions and knowledge gain that will prevent the same bugs from cropping up again: developers learn what went wrong and why so wthey won’t make the same mistakes again. You’ll learn about the most common mistakes made and you should use this to prevent memory leaks in your own native code.

Tune in. Learn.

Windows Development Manager Melur Raghuraman and team have taken troubleshooting and diagnostics to a whole new level in Windows 7. For one thing, Windows 7 uses managed code “natively” as PowerShell has become the de facto language used for creating diagnostic algorithms that live inside of diagnostic packages. So, when something goes wrong eventually a PowerShell script runs and diagnosis happens.

You’ve probably already noticed the information flag that appears in your task bar notification area when Windows wants to tell you something important. Well, in order for Windows 7 to inform you of a problem and its solution it must first diagnose the issue and collect troubleshooting steps. Sometimes, and more so than ever before, Windows will simply fix the problem and let you know about it – this is a trend that will only become more common over time and with each iteration of Windows going forward. This troubleshooting fabric has both client and server (cloud) components.

How does this all work, exactly? What’s the story?

Tune in. Lots to learn here. The new troubleshooting and diagnostics capabilities in Windows 7 marks a signficant step forward in the evolution of Windows supportability. Of course, you, the human user, can write your own diagnostic scripts – so you’ll be more efficient  when you need to diganosis and then fix some computer problem.

!Analyze is an automatic root cause analysis tool for software failures. For years, it has provided insight to engineers both inside and outside of Microsoft. It is a key enabling technology behind numerous higher-level feedback systems, including Windows Error Reporting and Watson.

!Analyze runs millions of times each day, producing actionable results from reliability telemetry data sent to Microsoft. Ordinary debugging tools report the file and function where a failure ended. !Analyze pinpoints where the failure started.

How does it work, exactly? What’s the story behind !Analyze?

Meet two of the Software Developers behind !Analyze, David Grant and Ryan Kivett. They share with us how !Analyze works, it’s history and provide a glimpse into it’s potential future.Tune in.

Great job, !Analyze team!

The Fault Tolerant Heap (FTH) is a subsystem of Windows 7 responsible for monitoring application crashes and autonomously applying mitigations to prevent future crashes on a per application basis. For the vast majority of users, FTH will function with no need for intervention or change on their part.

Principal Development Lead and rock star developer Silviu Calinoiu is the mastermind behind FTH. Here, we go deep into how FTH works and why it’s designed the way it is.

The Fault Tolerant Heap is another example of the low level efficiency built into the system: FTH automatically corrects memory faults that cause applications to crash which has the pleasant side effect of preventing future crashes. How does FTH work, exactly? What types of memory problems does it address, specifically? How do developers monitor FTH events and can they override FTH’s behavior? What does this all mean to the average user?

FTH, as an autonomous monitoring and correction system, represents a step in the right direction for the evolution of a more homeostatic general purpose operating system. Simply, Windows is getting smarter in the sense that it’s increasingly becoming better at self-regulation and self-healing. Yes, there’s a very long way to go, but we’re making real progress.

You will continue to learn about recoverability in Windows over the coming months here on C9.  

Tune in.

One of the central engineering and design themes of Windows 7 is efficiency: efficiency in user experience (things work as and when expected, reliably), efficiency in processing, execution, diagnostics, performance, scheduling, window managment, graphics, desktop search, etc. Well, not surprisingly, Windows 7’s audio system has been engineered to provide very efficient user experience (when you plug your headphones in the system streams music to your headphones as expected. When you remove them Windows will switch the stream to flow into your speakers - this is known as real time stream switching – but how does it work, exactly?). What, exactly, is new in the Windows audio system? What’s been improved since Vista? What is sound, really? (Yes, we talk about this at the end of the interview – interesting stuff indeed). You first learned about some of the updates to Windows audio in an interview with Larry in September ‘08. We dig into more detail here (whiteboard included plus we discuss a few things you probably do not know about…)

Here, Architect Elliot H Omiya, Principal Software Developer Larry Osterman and Principal Software Developer Frank Yerrace take us through the details of Windows 7 audio, including some history, some design decisions, some hard problems and overall a great conversation about how Windows makes noise (or music – it’s all relative :) ).

Enjoy. Lots to learn here. Elliot, Larry, Frank and the Windows audio team have done excellent work in this iteration of Windows. Find some time (I know. It’s hard.) Get comfortable and learn all about the innerworkings of Windows 7’s audio.

PerfTrack is the feedback and monitoring system inside of Windows 7 that performs measurements on, well, all things related to the overall performance of the OS, especially as it relates to system responsiveness to user actions. So, when you click on something (an icon, a folder name, etc…), how long does it take for the user to receive an expected reaction from the system? What are the bottlenecks that lead to a poor experience (user-observable latency) when using some feature in Windows? Is the root problem in the design of the feature itself or with the underlying OS? Enter PerfTrack.

Here, Development Manager David Fields and Group Program Manager Bill Karagounis share their wisdom and experience in the world of OS performance analysis. David and Bill explain how PerfTrack works and we digress into an interesting conversation about power management.

PerfTrack is an example of a technology that provides incredibly important real-world information to Windows engineers that can be used to solve performance problems in Windows.

Enjoy!

You’ve learned about many of the new features of the latest version of the Windows kernel in the Mark Russinovich Inside Windows 7 conversation here on Channel 9. One of Mark’s favorite kernel innovations is the way the Windows 7 kernel manages scheduling of threads and the underlying synchronization primitives that embody kernel thread management.

Prior to Windows 7 (and therefore Windows Server 2008 R2) the Windows kernel dispatcher employed a single lock, the dispatcher lock, which worked well for a relatively small numbers of processors (like 64). However, now that we find ourselves in the midst of the ManyCore era, well, 64 processors aren’t that many… A new strategy was required to scale Windows to large numbers of processors since a single lock is limited in capability, by design: The masterful David Cutler, one of the world’s greatest software engineers, wrote the NT scheduler in a time when the notion of affordable 256-processor machines was more science fiction than probable. 

As we learned in the Mark Russinovich video, Windows 7 can now scale to 256 processors thanks to the great engineering of Arun Kishan, a kernel architect you’ve met on C9 back in the Vista days. In order to promote further scalability of the NT kernel, Arun completely eliminated the dispatcher lock and replaced it with a much finer grained set of synchronization primitives. Gone are the days of contention for a single spinlock. How did Arun pull this off, exactly, you ask? Who is this genius? Well, tune in. Lots of answers await…

Arun’s work directly benefits the overall performance of Windows running on many processors and means, simply, Windows can now really scale. Thank you, Arun!

 


Spinlocks are synchronization primitives that cause a processor to busy-wait until the state of the lock’s memory location changes.

 
As the name implies, the dispatcher lock is the fundamental lock associated with the kernel dispatcher, or the scheduler.

 

in reply to Arun Kishan: Inside Windows 7 – Farewell to the Windows Kernel Dispatcher Lock