Entries:
Comments:
Posts:

Loading User Information from Channel 9

Something went wrong getting user information from Channel 9

Latest Achievement:

Loading User Information from MSDN

Something went wrong getting user information from MSDN

Visual Studio Achievements

Latest Achievement:

Loading Visual Studio Achievements

Something went wrong getting the Visual Studio Achievements

Chittur Subbaraman: Inside Windows 7 - Service Controller and Background Processing

Download

Right click “Save as…”

  • High Quality WMV (PC)
  • MP3 (Audio only)
  • MP4 (iPhone, Android)
  • Mid Quality WMV (Lo-band, Mobile)
  • WMV (WMV Video)
At any given point, Windows is executing a lot of code. Some of this code runs in the background as services. In pre Windows 7 operating systems some services were set to auto run even though the configuration of the system (installed apps, hardware, etc) did not warrant them running. This had a four-fold potential effect:

1) Windows might start up slower as the service fires up
2) Users may experience sluggish performance as the service runs taking up processing and memory resources
3) Windows might take a long time to shut down as the service shuts down, unwinding itself and cleaning up it's resources
4) The surface area for code-level security breaches is larger(though, since Vista, most services run in a restricted security context)

Chittur Subbaraman, Windows kernel developer extraordinaire, and team spent a great deal of time thinking about and rectifying these problems by re-architecting the Windows 7 Service Controller. They also identified services that don't need to auto run (like a TabletPC Pen service that need not ever run on a desktop (non-Tablet) machine by default). But they went much further than simply figuring out which services can be set to manual start-up state in Windows 7. They added a new feature for service developers based on the trigger pattern: services can be started and shut down via triggers - this means developers are able to specify programmatically when a service needs to start or stop. This allows Wndows to control services in a much more dynamic way so less code has to run in any given user session. The Service Controller monitors and reacts to trigger events as opposed to just running services marked as auto when the system starts. Less code running in the background on Windows means more resources available for foregrond processing, faster start up of sessions and faster shut down.

The great work in the Windows 7 service controller by Chittur and team has a direct impact on the performance of Windows 7. Tune in to learn about the details and history of the service controller (and Task Manager).

Here are some great resources for you to read to get the details behind all of this great engineering in the background processing mechanisms deep inside Windows 7. 

·White paper on Designing Efficient Background Processes.

·PDC talk on Designing Efficient Background Processes.

Tags:

Follow the Discussion

  • Allan LindqvistaL_ Kinect ftw
    both wmv and wmv-high links are dead :/
  • CharlesCharles Welcome Change
    I get the Open/Save prompt when clicking on them. What's happening for you?
    C
  • Allan LindqvistaL_ Kinect ftw
    on this and most c9 posts in the last few days i get a 'cant dispplay page' on the wmv-high and a never ending page load for the vmv version. the SL player seems to work most of the time though Smiley sometimes it appears to be linking to the wmv version though O_o
  • Allan LindqvistaL_ Kinect ftw
    oh, nevermind, tried on another box (vista64 ie8b2) and it works fine Smiley i still get nothing win this (win7 32bit ie8b2) though..
    im gonna look through the security settings and see if i find anything
  • Are you using kaspersky anti-virus software with your win7? I noticed it is little bit dodgy. If yes you should configure your anti-spy and web av or change to avg Smiley i had trouble with internet connection on win7 as well but once i configured kaspersy it worked fine.
  • maight?
  • CharlesCharles Welcome Change
    Not any more...  Smiley Thanks for the heads up.
    C
  • Definitely a great video Charles. It gives a nice insight into how services and service management is becomming smarter in Windows 7.
  • CharlesCharles Welcome Change
    Thanks! Windows 7 runs less code than Windows Vista. There's a marketing slogan for you Smiley Run less code!

    Seriously, the work the kernel team has done (and the graphics team, the desktop search team, etc) really has surfaced in Windows 7 to bring us a more performant, reliable and usable OS. You will see more of these interviews. Next up is a dive into user mode scheduling with Windows kernel architect Dave Probert. Stay tuned.

    C
  • You can find more contetn in the PDC sessio: Designing Efficient Background Services -->  http://channel9.msdn.com/pdc2008/PC19/

  • Allan LindqvistaL_ Kinect ftw
    im actually running forefront Smiley its centrally managed though so that might have something to do with it.. the links works fine in ff though..

    ive been able to open wmv files from ie before in win7 and also with forefront installed so im a bit puzzeld O_o there should'nt be any diffrent with the server side config (gpo's and such) either..
  • Firstly, Charles & Chittur - thank you for a really interesting video.

    It's great to see this sort of thing is being worked on - from my experience (I've got the Win7 beta on my laptop) it appears to be helping and I'm pretty impressed with the speed improvements (things are not 100% but that's par for the course with something like this).

    Also, do you think now this more mature design is available, you (Microsoft) might be able to try some "tough love" with those hardware/software manufacturers who aren't doing a good job.  I'm thinking of the sort of scenario where you have some gadget that's incredibly useful, poor quality code probably won't make me stop using it (unless it's seriously flawed) but it drags down my whole machine to some extent... and all because they've got some lame service running permanently that needn't be.

    Typically speaking, even if you are able to pinpoint the performance on the item (which isn't always the case unless you're more technical than I am, but you can get a fair sense that it's negatively affecting things) you will get ZERO response from the software writer's / manufacturer's support - they already have your money, the guy dealing with support might not understand the issue or he might be jaded since there are countless false problems so he's going to ignore your legitimate problem.  Maybe sometimes they'll be dealing with it internally, but you won't ever get any acknowledgement.

    It would be great if you got onto their case either discretely "having a polite word" or (preferably to my mind, since it's more open) by publishing lists of widely used services where design could be improved by simple adjustments (i.e. run as a task under task host).

    Two particular cases that spring to mind, which must affect huge swathes of PCs:
    Sun's Java update check service
    Adobe's Acrobat Reader update check service

    These two things run always - they have a legitimate purpose (yes, it's good to get updates on these bits of software) but it doesn't merit their own schedulers starting every single time I boot Windows!  Also, if they used Task Scheduler, you could tweak the frequency of checking yourself (and there's no need to learn a new UI - Task Scheduler exists!)

    Anyway, just putting my two cents in...  Smiley

    Cheers,
    Neil

  • Running less code is the way to go and why my company decided to not use vista period .. vista is a hog without much to show for it other then a fancy GUI. GUI is nice when you don't care about burning resources, but most people want features they use as opposed to ones which they disable for performance reasons after a month.
     
    I am glad windows 7 is going back to fundamentals.. now they need to remove the registry and provide a simple configuration switch for CIS level modes for big business to save us time from having to clean up the security holes and they will be a contender again. 

    My hopes for Microsoft lay in W7, otherwise we are dumping them and converting to a *nix shop, which is a ton of work when looking at 20K+ workstations. Concentrate on automation on what is under the hood, not the gloss on the paint job;
     
    Form Follows Function.
  • I am a little confused about the IP Address trigger. With a NIC in a machine, there is always an IP address, right? Even if it is the APIPA address. Is Win7 able to  distinguish between APIPA and DHCP/static addresses, such that the trigger only occurs when a non-APIPA address is received? Thank you!
  • We have several appz written using .net's ServiceController class. Thus far we have been unable to get any of them to work with Windows 7. Calls to an instance of ServiceController's Start() or Stop() methods immediately throw an "InvalidOperationException". This was not the case with Windows XP or even Windows Vista. The problem persists when running as an administrator or even when User Account Control is turned off.

    Can anyone advise on how to make the .net ServiceController class work with Windows 7?

Remove this comment

Remove this thread

close

Comments Closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums,
or Contact Us and let us know.