MacOS – the difference between ‘Application’ and ‘Process’ in OS X

applicationsmacmacosservices

As I increasingly dabble with AppleScript and OS X tweaking in general, I arrive at this question:

What is the difference between these two words in terms of OS X's inner operations – e.g. do some processes operate 'within' applications (or vica versa), or two processes operate as part of one 'application' in terms of what the user interacts with GUI-wise (or, vica versa)?

Also – I come originally from a Microsoft Windows background. Do 'application' and 'process' have any relationship to 'service' in OS X, (given 'service' and 'program' are different things in Windows), and is there indeed a third category in OS X called 'service' as well?

Best Answer

The standard way of approaching these terms is to say that an "application" is a specific, static program on storage. It's some piece of code stored on a hard drive, a CD-ROM or elsewhere.

A "process" on the other hand is a specific instance of a running program. I.e. it is registered by the operating system as executing or being able to execute whenever the operating system feels like it.

If you take for example Calculator.app, it is a single application. However you can have multiple Calculator processes if you start the program multiple times.

As chananelb wrote, it is also possible to have processes which are not "just" ordinary applications that have been started up. That could be for example kernel processes, or simply ordinary processes spawning up subprocesses to do specific tasks.

Regarding services, I chananelb's answer leads you in the wrong direction. His answer tells you about what is called a "Service" in Mac OS X... but you asked about what is called a "Service" in Windows.

The counterpart to a Windows Service is a Daemon on Mac OS X (and other Unix-derived systems).

Daemons are normally categorized by running in the "background", i.e. without direct user interaction through a graphical or non-graphical user interface. The distinction is a bit blurry though, as a Daemon might for example have a web interface for user interaction.

Daemons on Mac OS X are controlled by the launchd program, which is responsible for for example starting up daemons on boot, and letting the user start and stop daemons at request.