Background (computer software)
Encyclopedia
A background process is a computer process
Process (computing)
In computing, a process is an instance of a computer program that is being executed. It contains the program code and its current activity. Depending on the operating system , a process may be made up of multiple threads of execution that execute instructions concurrently.A computer program is a...

 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.

On a Unix system, a background process or job can be further identified as one whose group ID differs from its terminal group ID. This type of process is unable to receive keyboard signals from and typically will not send output to its parent 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 requiring few resources, any process can be run in the background, and even though the process is running in the background, where it can't be seen, it behaves like any other process.

Example

In this example running on Debian
Debian
Debian is a computer operating system composed of software packages released as free and open source software primarily under the GNU General Public License along with other free software licenses. Debian GNU/Linux, which includes the GNU OS tools and Linux kernel, is a popular and influential...

 GNU/Linux, 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 an instance of the bash shell. The TPGID header indicates the foreground process group of the listed process, and the PGID is the process' group ID.

PPID PID PGID SID TTY TPGID STAT UID TIME COMMAND
...
1 3537 3537 3537 tty2 1311 Ss 0 0:00 /bin/login --
3537 463 463 3537 tty2 1311 R 1000 0:00 \_ -bash
463 1245 1245 3537 tty2 1311 S 1000 0:00 \_ sleep 300
463 1311 1311 3537 tty2 1311 R+ 1000 0:00 \_ ps axjf
...

Launch & Resumption on Unix

From a Unix command line, a background process can be launched using the "&" operator. The bg
Bg (Unix)
bg is a job control command in Unix and Unix-like operating systems that resumes execution of a suspended process without bringing it to the foreground; the resumed process continues to execute in the background without receiving user input from the terminal. bg is required to be included in an...

utility can resume a suspended job, running it in the background. Using the fg
Fg (Unix)
fg is a job control command in Unix and Unix-like operating systems that resumes execution of a suspended process by bringing it to the foreground and thus redirecting its standard input and output streams to the user's terminal...

utility will associate a background process with 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.

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.

Smartphones

Many newer versions of smartphone
Smartphone
A smartphone is a high-end mobile phone built on a mobile computing platform, with more advanced computing ability and connectivity than a contemporary feature phone. The first smartphones were devices that mainly combined the functions of a personal digital assistant and a mobile phone or camera...

 & PDA operating systems now include the ability to start background processes. Due to hardware constraints, background processes on mobile operating systems are often restricted to certain tasks or consumption levels. On Android, CPU usage for background processes is bounded at 5 - 10%. Third-party applications on Apple's iOS are limited to a certain set 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 of the system's memory.
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK