Web - Amazon

We provide Linux to the World


We support WINRAR [What is this] - [Download .exe file(s) for Windows]

CLASSICISTRANIERI HOME PAGE - YOUTUBE CHANNEL
SITEMAP
Audiobooks by Valerio Di Stefano: Single Download - Complete Download [TAR] [WIM] [ZIP] [RAR] - Alphabetical Download  [TAR] [WIM] [ZIP] [RAR] - Download Instructions

Make a donation: IBAN: IT36M0708677020000000008016 - BIC/SWIFT:  ICRAITRRU60 - VALERIO DI STEFANO or
Privacy Policy Cookie Policy Terms and Conditions
Daemon (computer software) - Wikipedia, the free encyclopedia

Daemon (computer software)

From Wikipedia, the free encyclopedia

In Unix and other computer multitasking operating systems, a daemon is a computer program that runs in the background, rather than under the direct control of a user; they are usually initiated as processes. Typically daemons have names that end with the letter "d"; for example, syslogd is the daemon which handles the system log.

Daemons typically do not have any existing parent process (PPID=1), but reside directly under init in the process hierarchy. Daemons usually become daemons by forking a child process and then having the parent process immediately exit, thus causing init to adopt the child. This practice is commonly known as "fork off and die." This is a somewhat simplified view of things, naturally, as other operations are generally performed (such as disassociating the daemon process from any controlling tty), convenience routines such as daemon(3) existing in some UNIX systems for that purpose.

Systems often start (or "launch") daemons at boot time: they often serve the function of responding to network requests, hardware activity, or other programs by performing some task. Daemons can also configure hardware (like devfsd on some Linux systems), run scheduled tasks (like cron), and perform a variety of other tasks.

Contents

[edit] Terminology

The term was coined by the programmers of MIT's Project MAC. They took the name from Maxwell's daemon, an imaginary being from a famous thought experiment that constantly works in the background, sorting molecules.[1] Unix systems inherited this terminology. Daemons are also characters in Greek mythology, some of whom handled tasks that the gods couldn't be bothered with, much like computer daemons often handle tasks in the background that the user can't be bothered with. BSD and some of its derivatives have adopted a daemon as its mascot, although this mascot is actually a cute stereotypical depiction of a demon from Christianity. (The alternative expansion of "daemon" as "disk and execution monitor" is also sometimes used, but is a backronym.)

In the Unix System Administration Handbook, Evi Nemeth has this to say about daemons:

"Many people equate the word daemon with the word demon, implying some kind of Satanic connection between UNIX and the underworld. This is an egregious misunderstanding. Daemon is actually a much older form of demon; daemons have no particular bias towards good or evil, but rather serve to help define a person's character or personality. The ancient Greeks' concept of a personal daemon was similar to the modern concept of a guardian angel --- eudaemonia is the state of being helped or protected by a kindly spirit. As a rule, UNIX systems seem to be infested with both daemons and demons." (p403)

[edit] Humor

The term daemon often leads to humorous connections with its mythical homonym; for example, systems might have an exorcise command to kill off undesired daemons[1], and the parody website OBJECTIVE: Christian Ministries[2] uses this to claim that Apple Computer's BSD-derived Mac OS X is Satanic due to its use of daemons.

[edit] Types of daemons

In a strictly technical sense, in the Unix world, a process comprises a daemon when it has process number 1 (init) as its parent process and no controlling terminal. The init process adopts any process whose parent process terminates. The common method for a process to become a daemon involves:

  • Disassociating from the controlling tty
  • Becoming a session leader
  • Becoming a process group leader
  • Staying in the background by forking and exiting (once or twice). This is required sometimes for the process to become a session leader. It also allows the parent process to continue its normal execution. This idiom is sometimes summarized with the phrase "fork off and die"
  • Setting the root directory ("/") as the current working directory so that the process will not keep any directory in use
  • Changing the umask to 0 to allow open(), creat(), et al calls to provide their own permission masks and not to depend on the umask of the caller
  • Closing all inherited open files at the time of execution (required files will be opened later) that are left open by the parent process. Those include file descriptors 0, 1 and 2 (stdin, stdout, stderr) too.
  • Using a logfile, the console, or /dev/null as stdin, stdout, and stderr

In common Unix usage a daemon may be any background process, whether a child of init or not. Unix users sometimes spell daemon as demon, and most usually pronounce the word that way.

In the 1970's, "DAEMON" was pronounced "DAY-mon", because it stood for "DAy/Evening MONitor", referring to any system-based program (as opposed to a user application) that ran all day long, recording and reporting on various system statistics, such as number of users, time spent online, input/output processes, file accesses, etc. DAEMONs were used in Digital Equipment Corporation (DEC) computers. [citation needed]

In the Microsoft DOS environment, such programs were written as Terminate and Stay Resident (TSR) software. On Microsoft Windows systems, programs called services perform the functions of daemons, though the term daemon has started to creep into common usage on that platform as well. [citation needed]

On the original Mac OS system, similar programs were known as extensions. Mac OS X, being a Unix-like system, has daemons. (There are services as well, but these are completely different in concept.)

[edit] References

  1. ^ Fernando J. Corbató (January 23, 2002). Take Our Word for It. Retrieved on 2006-08-20.

[edit] See also

[edit] External links

Our "Network":

Project Gutenberg
https://gutenberg.classicistranieri.com

Encyclopaedia Britannica 1911
https://encyclopaediabritannica.classicistranieri.com

Librivox Audiobooks
https://librivox.classicistranieri.com

Linux Distributions
https://old.classicistranieri.com

Magnatune (MP3 Music)
https://magnatune.classicistranieri.com

Static Wikipedia (June 2008)
https://wikipedia.classicistranieri.com

Static Wikipedia (March 2008)
https://wikipedia2007.classicistranieri.com/mar2008/

Static Wikipedia (2007)
https://wikipedia2007.classicistranieri.com

Static Wikipedia (2006)
https://wikipedia2006.classicistranieri.com

Liber Liber
https://liberliber.classicistranieri.com

ZIM Files for Kiwix
https://zim.classicistranieri.com


Other Websites:

Bach - Goldberg Variations
https://www.goldbergvariations.org

Lazarillo de Tormes
https://www.lazarillodetormes.org

Madame Bovary
https://www.madamebovary.org

Il Fu Mattia Pascal
https://www.mattiapascal.it

The Voice in the Desert
https://www.thevoiceinthedesert.org

Confessione d'un amore fascista
https://www.amorefascista.it

Malinverno
https://www.malinverno.org

Debito formativo
https://www.debitoformativo.it

Adina Spire
https://www.adinaspire.com