daemon的由来

在Unix/Linux中常常看到sshd、httpd、ftpd等,末尾的字母d其实就是daemon,读音为/ˈdiːmən/或/ˈdeɪmən/。
代表这是一个后台程序。
daemon一词是麻省理工学院MAC项目组的程序员们最先使用的,后来被Unix继承下来。

更多可见
http://en.wikipedia.org/wiki/Daemon_(computer_software)

In Unix and other computer multitasking operating systems, a daemon (pronounced /ˈdiːmən/ or /ˈdeɪmən/[1]) 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, the daemon that handles the system log, or sshd, which handles incoming SSH connections.

In a Unix environment, the parent process of a daemon is often (but not always) the init process (PID=1). Processes usually become daemons by forking a child process and then having their parent process immediately exit, thus causing init to adopt the child process. This is a somewhat simplified view of things as other operations are generally performed, such as disassociating the daemon process from any controlling tty. Convenience routines such as daemon(3) exist 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.



Terminology

The term was coined by the programmers of MIT's Project MAC. They took the name from Maxwell's demon, an imaginary being from a famous thought experiment that constantly works in the background, sorting molecules.[2] 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.)

posted @ 2008-04-10 12:04  h2appy  阅读(516)  评论(0编辑  收藏  举报