Daemon Service/Process
- concept in operating system
- runs in the background on a computer system.
- typically started at boot time and runs until the system is shut down.
- often used to provide system-level functionality, such as:
- logging
- networking
- printing
Daemon Threads
- concept in java/python
- low priority thread that keeps running in background
- once the main thread exits and all non-daemon threads are also done, program exits and all the daemon threads will be killed
- Since they abruptly terminate, you should never use them with I/O tasks which can corrupt data
- some examples:
- garbage collection
- sending keepalive packets