windows - What's the difference between an Application, Process, and Services?

23
2014-04
  • Justin L.

    How are these fundamentally different "things" on Windows?

    Aren't all running things Processes?

    It seems that every Application has an associated process that shuts it down if it is shut down. One process can manage more than one application instance, it looks like. And Services, I'm not even sure what they are, exactly.

    Are they not processes themselves?

  • Answers
  • nhinkle

    Both applications and services have processes associated with them.

    An application is a program which you interact with on the desktop. This is what you spend almost all of your time using on the computer. Internet explorer, microsoft word, iTunes, skype - they are all applications.

    A process is an instance of a particular executable (.exe program file) running. A given application may have several processes running simultaneously. For example, some modern browsers such as google chrome run several processes at once, with each tab actually being a separate instance/process of the same executable. In some cases, complicated applications may have multiple processes; for example, Visual Studio runs a separate process when it compiles code from when it displays the IDE. However, most often, a given application is running from a single process; for example, no matter how many microsoft word windows you have open, only a single instance of winword.exe is running.

    A service is a process which runs in the background and does not interact with the desktop. In Windows, services almost always run as an instance of the svchost.exe process, the windows service host process; however there are sometimes exceptions to this.

    Sometimes, processes may run in the background without interacting with the desktop, but without being installed as a service. Many device drivers with enhanced features do this. For example, a touchpad driver will usually have a process which runs when a user logs in and handles the special features of the touchpad, but isn't a service and doesn't show any windows to the user.

    Sometimes an application may depend on a certain service. Printing from any program requires that the print spooler service be active. Installation packages (.msi installers) require that the windows installer service be running. Antivirus programs usually employ a service so they can continue running even when the user is not logged in.

    Processes usually exit when an application is closed, however this is not always the case. Some programs, particularly download and backup programs, may continue to run in the background without displaying any windows. Antivirus is also an example of this - in addition to using a service, many antivirus applications run a process silently in the background which only displays an application to the user when action is required.

  • Ignacio Vazquez-Abrams

    Both applications and services are processes. Applications are meant to interact with a single user, whereas services work across the system, but don't interact with users directly.


  • Related Question

    operating systems - Maximum number of processes in Windows XP, Vista and 7
  • BlueGene

    How many processes can Windows support at the same time? This question is nothing to do with parellel processing of any sort. Processes can be running, waiting in the queue, sleeping etc,


  • Related Answers
  • Joshua

    There is an article: Pushing the Limits of Windows: Processes and Threads written by Mark Russinovich that explains everything relating to the maximum number of processes you can run in Windows. It's quite a fascinating read if you're actually interested in learning about the inner workings of Windows.