Daemon (computer software)
From Free net encyclopedia
- This article is about a class of computer software. For other uses, see Daemon (disambiguation).
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 instantiated as processes. Typically daemons have names that end with the letter "d"; for example, syslogd is the daemon which handles the system log.
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 |
Terminology
The programmers of CTSS coined the term by analogy to Maxwell's demon, and all the systems descended from it, including Unix, have inherited the terminology. Daemons are 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 Christian demon. (The alternative expansion of "daemon" as "disk and execution monitor" is also sometimes used, but it appears to be a backronym.)
Types of daemons
In a strictly technical sense, Unix recognises as a daemon any process that has process number 1 (init) as its parent process. The init process adopts any process whose parent dies without waiting for the child's status, so the common method for launching a daemon involves forking once or twice, and making the parent (and possibly the grandparent) die while the child (or grandchild) process begins performing its normal function. The idiom is sometimes summarized with the phrase "fork off and die".
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 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. On the original Mac OS similar systems 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.
See also
External links
- takeourword.com: Article on the origin of the term "daemon"
- Tutorial: Unix Daemons in PERL
- HowTo: Linux Daemons in C++cs:Démon (software)
de:Daemon es:Demonio (informática) fr:Disk and execution monitor hr:Daemon it:Demone (informatica) lt:Demonas (programa) nl:Daemon pl:Daemon ru:Демон (программа) sv:Daemon