Differences and linkages between Windows services and processes

Source: Internet
Author: User

Windows Service is a long-running application that is primarily used in a server environment and does not require a user interface or any analog output. Any user message is usually recorded in the Windows event log. Windows Service can start at the start of the operating system, has been running in the background, when necessary can also be started manually, we can be managed through the management tools within the unified management of services.
when the system is started, the Windows service does not need to go through the landing page to start, and we launch a generic EXE file to first login to Windows before launching it.

Windows Service is a program that starts with the Windows operating system, runs in the background, and typically does not interact with the user. It cannot be run by double-clicking, similar to the Unix daemon (daemon processes), which does not stop when the user logs off.
The Windows service consists of three parts: 1. A service executable file; 2. A Service Control program (SCP); 3. Service Management Manager (SCM), responsible for the HKLM\System\CurrentControlSet\Services Under Create service key value. Users can control the start, stop, pause, etc. of the service through the SCP, and the SCP invokes the service program through the SCM.
Window Standard EXE executable usually has a user interface, console or GUI, usually by the user to start or stop
Windows Service is an application running under the specified user in Windows background (the default system), it does not have a standard UI interface, like a standard EXE program, Windows service is created at the beginning of the service, and destroyed at the end of the service, You can also set whether the service starts together with the operating system and shuts down together. It supports three ways: 1) automatic mode 2) manual mode 3) disabled. Automatic mode, the Windows service will start running automatically after the OS is started, but manually the service will not be started if it is disabled. In addition, the standard EXE uses the currently logged-on user by default, while the Windows service uses the system user by default, which is especially important when accessing systems resources.
What is the maximum amount of memory that a single process on Windows can access? Is it the same as the maximum virtual memory of the system? What impact does this have on system design?
The maximum amount of memory that a single process on a 32-bit Windows can access is 4G, because the operating system needs to allocate 2G of space to the core of the system, so the average user program's process can use a maximum of 2G.
Not necessarily, the maximum amount of memory that the process of a 32-bit operating system can access is 4G, which contains the virtual RAM, and the maximum amount of storage that a process can access is 4 G, so process memory accesses are independent of virtual memory when physical memory is greater than or equal to 4G, and when physical memory is less than 4G, The amount of memory that is accessed by the process increases as virtual memory increases until 4G
Windows uses a system: a virtual addressing system. The system maps the memory addresses available to the program to the actual addresses in the hardware memory, which are fully windows backend management, and the actual The result is that each process on a 32-bit processor can use 4GB of memory------No matter how much hard disk space is on the computer (this value will be larger on a 64-bit processor). This 4GB memory actually contains all the parts of the program------including executable code, all the DLLs that the code loads, and the contents of all the variables that the program uses to run. This 4GB memory is called the virtual address space, or virtual memory.
What is the difference between EXE and DLL?
exe is an executable file, you can double-click it, it can run, and DLL is a dynamic link library file, that is, it does not run on its own, it is necessary to run the other functions of a program, it can run, for example, if your QQ to upgrade, That QQ inside about the upgrade DLL file it will run.
EXE is an application with a program entry (Main) that can be executed directly by the end user, and as its boot system generates a corresponding process.
DLLs are dynamic-link libraries that do not include program execution portals, are not directly executed by end users, and themselves need to be attached to existing processes to run.
However, both are based on the PE format, the runtime is loaded into the disk by the image of the callee's memory or the shared space to execute, including the program's data information, but EXE also includes the code information of the program.
DLLs can be shared by multiple programs, but EXE is not, and can only be performed separately.

Differences and linkages between Windows services and processes

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.