## Services vs. Daemons

Windows NT services function similar to UNIX daemons. They are processes that are started at startup and run until the system is shut down or rebooted. Most UNIX daemons read configuration data from their own configuration files or from the command line. For example, Sendmail does both. Under Windows NT, services read configuration data from the registry upon startup. You can also specify command-line options using the Services utility on the Control Panel or when starting services from the command prompt.

In addition to starting and stopping a Windows NT service, you can pause and resume the service. UNIX administrators might assume that is similar to sending a UNIX process the SIGSTOP or SIGTSTP signals (kill –TSTP) to suspend execution of a process and sending the SIGCONT (kill –CONT) to resume execution.

However, in Windows NT, the effect of pausing a service varies according to service. For example, pause prevents the server service from accepting new connections, and resume allows it to accept new connections. Neither pause nor resume affects anyone already connected to the service. Whereas pausing the Netlogon service on a PDC stops the service from processing logon requests, which results in the service simply managing the user account replication between domain controllers. Resuming a service always returns the service to its full functionality.

A closer UNIX analogy would be the operation of servers started from inetd. If you remove, or comment-out, a server from the inetd.conf file and send the HUP signal to the inetd process, you prevent inetd from accepting new connections to a particular server, but do not affect those servers that are already running. To start accepting new connections to a server, you would reverse the change and re-enable the server.

Windows NT services perform a specific function, much like their UNIX counterparts. If they are providing a TCP/IP resource to the network, they will be associated with a specific TCP or UDP port number. For example, the DNS server for Windows NT listens on port 53, just like the UNIX named daemon.

When the operation of a service depends on another service, Windows NT warns you of the dependencies during installation or removal of the service, or possibly when stopping a service. For example, when you attempt to stop the workstation service, it tells you that the alerter, computer browser, messenger, and possibly Netlogon services are dependent services—stopping the workstation service also stops these services.

©1997 Microsoft Corporation. All rights reserved. Legal Notices.
Last Updated: December 1, 1997