Background (computer Software)
   HOME

TheInfoList



OR:

A background process is a
computer process In computing, a process is the instance of a computer program that is being executed by one or many threads. There are many different process models, some of which are light weight, but almost all processes (even entire virtual machines) are ro ...
that runs ''behind the scenes'' (i.e., in the background) and without user intervention. Typical tasks for these processes include logging, system monitoring, scheduling, and user notification. The background process usually is a child process created by a control process for processing a computing task. After creation, the child process will run on its own, performing the task independent of the control process, freeing the control process of performing that task. On a
Windows Windows is a group of several proprietary graphical operating system families developed and marketed by Microsoft. Each family caters to a certain sector of the computing industry. For example, Windows NT for consumers, Windows Server for ser ...
system, a background process is either a
computer program A computer program is a sequence or set of instructions in a programming language for a computer to execute. Computer programs are one component of software, which also includes documentation and other intangible components. A computer program ...
that does not create a
user interface In the industrial design field of human–computer interaction, a user interface (UI) is the space where interactions between humans and machines occur. The goal of this interaction is to allow effective operation and control of the machine f ...
, or a
Windows service In Windows NT operating systems, a Windows service is a computer program that operates in the background. It is similar in concept to a Unix daemon. A Windows service must conform to the interface rules and protocols of the Service Control Manage ...
. The former are started just as any other program is started, e.g., via
Start menu The Start menu is a graphical user interface element used in Microsoft Windows since Windows 95 and in other operating systems. It provides a central launching point for computer programs and performing other tasks in the Windows shell. It is name ...
. Windows services, on the other hand, are started by
Service Control Manager Service Control Manager (SCM) is a special system process under the Windows NT family of operating systems, which starts, stops and interacts with Windows service processes. It is located in the %SystemRoot%\System32\services.exe executable. Service ...
. In
Windows Vista Windows Vista is a major release of the Windows NT operating system developed by Microsoft. It was the direct successor to Windows XP, which was released five years before, at the time being the longest time span between successive releases of ...
and later, they are run in a separate session. There is no limit to how much a system service or background process can use system resources. Indeed, in the
Windows Server Windows Server (formerly Windows NT Server) is a group of operating systems (OS) for servers that Microsoft has been developing since July 27, 1993. The first OS that was released for this platform was Windows NT 3.1 Advanced Server. With the r ...
family of Microsoft operating systems, background processes are expected to be the principal consumers of system resources. On a
Unix Unix (; trademarked as UNIX) is a family of multitasking, multiuser computer operating systems that derive from the original AT&T Unix, whose development started in 1969 at the Bell Labs research center by Ken Thompson, Dennis Ritchie, an ...
or
Unix-like A Unix-like (sometimes referred to as UN*X or *nix) operating system is one that behaves in a manner similar to a Unix system, although not necessarily conforming to or being certified to any version of the Single UNIX Specification. A Unix-li ...
system, a background process or job can be further identified as one whose
process group In a POSIX-conformant operating system, a process group denotes a collection of one or more processes. Among other things, a process group is used to control the distribution of a signal; when a signal is directed to a process group, the signal is ...
ID differs from its terminal group ID (TGID). (The TGID of a process is the process ID of the process group leader that opened the terminal, which is typically the login shell. The TGID identifies the control terminal of the process group.) This type of process is unable to receive keyboard signals from its parent terminal, and typically will not send output to that terminal. This more technical definition does not distinguish between whether or not the process can receive user intervention. Although background processes are typically used for purposes needing few resources, any process can be run in the background, and such a process will behave like any other process, with the exceptions given above.


Windows services

In
Windows NT Windows NT is a proprietary graphical operating system produced by Microsoft, the first version of which was released on July 27, 1993. It is a processor-independent, multiprocessing and multi-user operating system. The first version of Win ...
family of
operating system An operating system (OS) is system software that manages computer hardware, software resources, and provides common services for computer programs. Time-sharing operating systems schedule tasks for efficient use of the system and may also i ...
s, a Windows service is a dedicated background process. A Windows service must conform to the interface rules and protocols of the
Service Control Manager Service Control Manager (SCM) is a special system process under the Windows NT family of operating systems, which starts, stops and interacts with Windows service processes. It is located in the %SystemRoot%\System32\services.exe executable. Service ...
, the component responsible for managing Windows services. Windows services can be configured to start when the operating system starts, and to run in the background as long as Windows runs. Alternatively, they can be started manually or by an event. Windows NT operating systems include numerous services which run in context of three
user account A user is a person who utilizes a computer or network service. A user often has a user account and is identified to the system by a username (or user name). Other terms for username include login name, screenname (or screen name), accoun ...
s: System, Network Service and Local Service. These Windows components are often associated with Host Process for Windows Services:
svchost.exe Svchost.exe (Service Host, or SvcHost) is a system process that can host from one or more Windows services in the Windows NT family of operating systems. Svchost is essential in the implementation of ''shared service processes'', where a number ...
. Since Windows services operate in the context of their own dedicated user accounts, they can operate when a user is not logged on. Before
Windows Vista Windows Vista is a major release of the Windows NT operating system developed by Microsoft. It was the direct successor to Windows XP, which was released five years before, at the time being the longest time span between successive releases of ...
, services installed as "interactive services" could interact with Windows
desktop A desktop traditionally refers to: * The surface of a desk (often to distinguish office appliances that fit on a desk, such as photocopiers and printers, from larger equipment covering its own area on the floor) Desktop may refer to various compu ...
and show a
graphical user interface The GUI ( "UI" by itself is still usually pronounced . or ), graphical user interface, is a form of user interface that allows users to interact with electronic devices through graphical icons and audio indicator such as primary notation, inst ...
. With Windows Vista, however, interactive services became
deprecated In several fields, especially computing, deprecation is the discouragement of use of some terminology, feature, design, or practice, typically because it has been superseded or is no longer considered efficient or safe, without completely removing ...
and ceased operating properly, as a result of
Windows Service Hardening There are a number of security and safety Features new to Windows Vista, features new to Windows Vista, most of which are not available in any prior Microsoft Windows operating system release. Beginning in early 2002 with Microsoft's announcement ...
. The three principal means of managing Windows services are: # Services snap-in for
Microsoft Management Console Microsoft Management Console (MMC) is a component of Microsoft Windows that provides system administrators and advanced users an interface for configuring and monitoring the system. It was first introduced in 1998 with the Option Pack for Window ...
# sc.exe #
Windows PowerShell PowerShell is a task automation and configuration management program from Microsoft, consisting of a command-line shell and the associated scripting language. Initially a Windows component only, known as Windows PowerShell, it was made open-so ...


Daemon

A daemon is a type of background process designed to run continually in the background, waiting for event(s) to occur or condition(s) to be met. These processes typically use minimal system resources and perform tasks which require little to no input from the user. When launched with the ''daemon'' function, daemons are disassociated from their parent terminal.


Launch and resumption on Unix

From a Unix command line, a background process can be launched using the "&" operator. The '' bg'' utility can resume a suspended job (sending
SIGCONT In Unix and Unix-like operating systems, job control refers to control of jobs by a shell, especially interactively, where a "job" is a shell's representation for a process group. Basic job control features are the suspending, resuming, or termina ...
), running it in the background. Using the '' fg'' utility will also reconnect standard input its parent terminal, bringing it into the foreground. The ''jobs'' utility will list all processes associated with the current terminal and can be used to bring background processes into the foreground. When a
login session In computing, a login session is the period of activity between a user logging in and logging out of a (multi-user) system. On Unix and Unix-like operating systems, a login session takes one of two main forms: * When a textual user interface i ...
ends, via explicit logout or network disconnection, all processes, including background processes, will by default be terminated, to prevent them from becoming
orphan process An orphan process is a computer process whose parent process has finished or terminated, though it remains running itself. Unix-like In a Unix-like operating system any orphaned process will be immediately adopted by an implementation-defined s ...
es. Concretely, when the user exits the launching shell process, as part of shutdown it sends a ''hangup'' signal (
SIGHUP On POSIX-compliant platforms, SIGHUP ("signal hang up") is a signal sent to a process when its controlling terminal is closed. It was originally designed to notify the process of a serial line drop. SIGHUP is a symbolic constant defined in the h ...
) to all its
jobs Jobs may refer to: * Job, an activity that people do for regular income gain People * Steve Jobs (1955–2011), co-founder and former CEO of Apple Inc ** Steve Jobs (disambiguation) * Laurene Powell Jobs (born 1963), widow of Steve Jobs * Lisa ...
, to terminate all the processes in the corresponding
process group In a POSIX-conformant operating system, a process group denotes a collection of one or more processes. Among other things, a process group is used to control the distribution of a signal; when a signal is directed to a process group, the signal is ...
. To have processes continue to run, one can either not end the session, or end the session without terminating the processes. A
terminal multiplexer A terminal multiplexer is a software application that can be used to multiplex several separate pseudoterminal-based login sessions inside a single terminal display, terminal emulator window, PC/workstation system console, or remote login session ...
can be used to leave a session running but detach a virtual terminal from it, leaving processes running as child processes of the session; the user can then reattach session later. Or, termination can be prevented by either starting the process via the
nohup nohup is a POSIX command which means "no hang up". Its purpose is to execute a command such that it ignores the HUP (hangup) signal and therefore does not stop when the user logs out. Output that would normally go to the terminal goes to a file ...
command (telling the process to ignore SIGHUP), or by subsequently running disown with the job id, which either removes the job from the job list entirely, or simply prevents SIGHUP from being sent. In the latter case when the session ends, the child processes are not terminated, either because they are not sent SIGHUP or because they ignore it, and thus become orphan processes, which are then adopted by the init process (the kernel sets the init process as their parent), and they continue running without a session, now called '' daemons''.


Example

In this example running on
Unix Unix (; trademarked as UNIX) is a family of multitasking, multiuser computer operating systems that derive from the original AT&T Unix, whose development started in 1969 at the Bell Labs research center by Ken Thompson, Dennis Ritchie, an ...
, the ''sleep'' utility was launched into the background. Afterward, the ''ps'' tool was run in the foreground, where it output the below text. Both were launched from the shell. PID TT STAT TIME COMMAND 54659 10 S 0:00.06 su (zsh) 54703 10 IN 0:00.00 - sleep 1000 54852 10 R+ 0:00.00 - ps -U botty -axd


Smartphones

Many newer versions of
smartphone A smartphone is a portable computer device that combines mobile telephone and computing functions into one unit. They are distinguished from feature phones by their stronger hardware capabilities and extensive mobile operating systems, whic ...
and PDA
operating system An operating system (OS) is system software that manages computer hardware, software resources, and provides common services for computer programs. Time-sharing operating systems schedule tasks for efficient use of the system and may also i ...
s now include the ability to start background processes. Due to hardware limits, background processes on mobile operating systems are often restricted to certain tasks or consumption levels. On Android, CPU use for background processes may be bounded at 5 - 10%. Applications on Apple's
iOS iOS (formerly iPhone OS) is a mobile operating system created and developed by Apple Inc. exclusively for its hardware. It is the operating system that powers many of the company's mobile devices, including the iPhone; the term also include ...
are limited to a subset of functions while running in the background. On both iOS and Android, background processes can be killed by the system if they are using too much memory.


See also

*
Batch processing Computerized batch processing is a method of running software programs called jobs in batches automatically. While users are required to submit the jobs, no other interaction by the user is required to process the batch. Batches may automatically ...
*
Computer multitasking In computing, multitasking is the concurrent execution of multiple tasks (also known as processes) over a certain period of time. New tasks can interrupt already started ones before they finish, instead of waiting for them to end. As a result ...
*
Process group In a POSIX-conformant operating system, a process group denotes a collection of one or more processes. Among other things, a process group is used to control the distribution of a signal; when a signal is directed to a process group, the signal is ...


References

{{DEFAULTSORT:Background Process Process (computing)