Daemon

From WikiMD's Wellness Encyclopedia

Daemon

A daemon is a background process that runs on a computer system, typically without direct user interaction. Daemons are often initiated at boot time and run continuously, providing various services to the system and its users.

Etymology[edit | edit source]

The term "daemon" is derived from the Greek word "δαίμων" (daimōn), which refers to a supernatural being or spirit. In computing, the term was popularized by the Project MAC at MIT in the 1960s.

Functionality[edit | edit source]

Daemons perform a variety of tasks, including handling network requests, managing hardware devices, and performing system maintenance. Common examples of daemons include:

Characteristics[edit | edit source]

Daemons typically have the following characteristics:

  • They run in the background and do not have a controlling terminal.
  • They are often started at system boot and run continuously.
  • They can be controlled through init systems like systemd, Upstart, or SysVinit.

Implementation[edit | edit source]

To create a daemon, a process usually follows these steps: 1. Fork off the parent process. 2. Create a new session and process group. 3. Close all open file descriptors. 4. Change the working directory to the root directory. 5. Reset the file mode creation mask. 6. Handle signals appropriately.

Examples of Daemons[edit | edit source]

  • inetd - The internet super-server daemon.
  • named - The BIND DNS server daemon.
  • cupsd - The CUPS printing system daemon.

Related Concepts[edit | edit source]

  • Service - A similar concept in Microsoft Windows operating systems.
  • Background process - A process that runs in the background but is not necessarily a daemon.
  • Init - The first process started during booting of the computer system.

See Also[edit | edit source]

WikiMD
Navigation: Wellness - Encyclopedia - Health topics - Disease Index‏‎ - Drugs - World Directory - Gray's Anatomy - Keto diet - Recipes

Search WikiMD

Ad.Tired of being Overweight? Try W8MD's physician weight loss program.
Semaglutide (Ozempic / Wegovy and Tirzepatide (Mounjaro / Zepbound) available.
Advertise on WikiMD

WikiMD's Wellness Encyclopedia

Let Food Be Thy Medicine
Medicine Thy Food - Hippocrates

WikiMD is not a substitute for professional medical advice. See full disclaimer.
Credits:Most images are courtesy of Wikimedia commons, and templates Wikipedia, licensed under CC BY SA or similar.

Contributors: Prab R. Tumpati, MD