ArticleslgStudy

computer science

Background process

Background process is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Background process rather than just read about it. In short: A background process is a computer process 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.

Key takeaways

  • Background process belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Background process to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Background process from memory before moving on to harder problems.

Reference excerpt

A background process is a computer process 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 Windows system, a background process is either a computer program that does not create a user interface, or a Windows service. The former are started just as any other program is started, e.g., via Start menu. Windows services, on the other hand, are started by Service Control Manager. In Windows Vista and later, they are run in a separate session. On a Unix-like system, a daemon would be a background process. However, in a shell that supports job control, a process that is in a process group whose process group ID differs from its terminal group ID (TGID) would be a background process. (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 family of operating systems, a Windows service is a dedicated background process. A Windows service must conform to the interface rules and protocols of the Service Control Manager, 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 accounts: System, Network Service and Local Service. These Windows components are often associated with Host Process for Windows Services: svchost.exe. 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, services installed as "interactive services" could interact with Windows desktop and show a graphical user interface. With Windows Vista, however, interactive services became deprecated and ceased operating properly, as a result of Windows Service Hardening. The three principal means of managing Windows services are:

Services snap-in for Microsoft Management Console sc.exe Windows PowerShell

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. When launched with the daemon function, daemons are disassociated from their parent terminal.

Background jobs in Unix

From a Unix command line, a background process can be launched using the "&" operator. The bg command can resume a suspended job (sending SIGCONT), running it in the background. Using the fg command will also set the foreground process group of the controlling terminal of the session to the process group of the job, bringing the job into the foreground. The jobs command will list all processes associated with the current terminal and can be used to bring background processes into the foreground. When a login session ends, via explicit logout or network disconnection, all processes, including background processes, will by default be terminated, to prevent them from becoming orphan processes. Concretely, when the user exits the launching shell process, as part of shutdown it sends a hangup signal (SIGHUP) to all its jobs, to terminate all the processes in the corresponding process group. To have processes continue to run, one can either not end the session, or end the session without terminating the processes. A terminal multiplexer 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 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, 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.

Smartphones Many newer versions of smartphone and PDA operating systems 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 are limited to a subset of functions while running in the background. On both iOS and Android, background processes, as well as background or unused apps, can be killed by the system if they are using too much memory or too much battery power.

See also Batch processing Computer multitasking Process group

References

Worked examples

Example 1 — a first encounter with Background process

Start with the simplest possible case. Write down what Background process claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Background process before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Background process ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Background process

In research
Background process appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Background process in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Background process is common in secondary-school and first-year university syllabi. It links to neighbouring topics Process (computing), so understanding it makes those chapters shorter.
In everyday life
Look for Background process outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Background process” →

How to study Background process in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Background process means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Background process out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Background process in simple terms?

A background process is a computer process 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.

Why does Background process matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Background process?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Background process.

Tags

  • Process (computing)

Keep exploring