Its executable image, or (for 32-bit services running on 64-bit systems) runs in multiple instances, each hosting one or more services. Services running in SvcHost are implemented as
dynamically-linked libraries (DLLs). Each service's registry key must have a value named under the subkey, pointing to the respective service's DLL file. Their definition is of the form ; (i.e. ). Services sharing the same SvcHost process specify the same parameter, having a single entry in the
SCM's database. The first time that a SvcHost process is launched with a specific parameter, it looks for a value of the same name under the key, which it interprets as a list of service names. Then it notifies the SCM of all the services that it hosts. SCM does not launch a second SvcHost process for any of those received services; instead, it simply sends a "start" command to the respective SvcHost process containing the name of the service that should be launched within its context, and whose respective DLL SvcHost loads. According to a 2003 Microsoft presentation, the minimum
working set of a shared service is approximately instead of for a standalone process.
Changes to Service Host grouping in Windows 10 Starting with Windows 10 version 1703, Microsoft changed the way services are grouped into host processes. On client computer systems with more than 3.5 GB of memory, services are no longer grouped into shared host processes. Instead, each service is run in its own process. This results in better isolation of services, making the computer system more resilient to service failures and vulnerabilities and easier to debug. However, it adds some memory overhead.
Service tags Starting with Windows Vista, the internal identification of services inside shared processes (svchost included) is achieved by so-called service tags. The service tag for each thread is stored in the SubProcessTag of its
thread environment block (TEB). The tag is propagated across all threads that a main service thread subsequently starts, except for threads created indirectly by Windows
thread-pool APIs. The set of service tag management routines is currently an undocumented
API, although it is used by some Windows utilities like
netstat to display the
TCP connections associated with each service. Some third-party tools like also make use of this API. == Identification and management of hosted services ==