daemon and process
the_return_of_the_Ring
Member Posts: 119
in Linux+
what is the difference between them? I noticed that in "system-config-services", the process has an pid number, while the items marked as "daemon" have no pid. anyone can tell me more about this thanx!
Comments
-
bighornsheep Member Posts: 1,506a daemon is a listener. A service, usually a server of some sort. ie. Apache, MySQL, Samba, etc...
A daemon runs in the background, ie. OS Supervisor-mode.
A process runs in the foreground, ie. OS User-mode.Jack of all trades, master of none -
bighornsheep Member Posts: 1,506Extra info:
newer versions of Linux probably doesnt work this way anymore.
But in Operating System Design, a daemon is by definition a process that is started directly in supervisor mode, bypassing the fork() system call, thus it doesnt have a Process ID. A process however requires access to the kernel via a system call running in supervisor-mode, usually requiring the fork() system call to generate a Process ID.
In OS design, the OS is actually:
1) The kernel-
memory management,
process management,
Intput/Output,
file system
-
drivers etc.
-
applications
programs
In *theory*, Microsoft Windows doesnt have a supervisor space, and everything is in user-space, there are however APIs to bridge user-space and kernel.Jack of all trades, master of none -
blackzone Member Posts: 82 ■■□□□□□□□□I just call daemon "back ground process". It's just a process that you can't interact with after it start.
Daemon does have a process ID(at least under Linux), type "ps -ax" and you should be able to see the PID.
Below is an unofficial link to give more info
http://www.unixguide.net/unix/programming/1.7.shtml