Several terms in the Windows user and programming documentation have different meanings in different contexts. For example, the word
Windows API functions. Documented, callable subroutines in the Windows API. Examples include
Native system services (or system calls). The undocumented, underlying services in the operating system that are callable from user mode. For example,
Kernel support functions (or routines). Subroutines inside the Windows operating system that can be called only from kernel mode (defined later in this chapter). For example,
Windows services. Processes started by the Windows service control manager. For example, the Task Scheduler service runs in a user-mode process that supports the
DLLs (dynamic-link libraries). A set of callable subroutines linked together as a binary file that can be dynamically loaded by applications that use the subroutines. Examples include Msvcrt.dll (the C run-time library) and Kernel32.dll (one of the Windows API subsystem libraries). Windows user-mode components and applications use DLLs extensively. The advantage DLLs provide over static libraries is that applications can share DLLs, and Windows ensures that there is only one in-memory copy of a DLL’s code among the applications that are referencing it. Note that nonexecutable .NET assemblies are compiled as DLLs but without any exported subroutines. Instead, the CLR parses compiled metadata to access the corresponding types and members.
Processes, Threads, and Jobs
Although programs and processes appear similar on the surface, they are fundamentally different. A
A
An executable program, which defines initial code and data and is mapped into the process’ virtual address space
A list of open handles to various system resources—such as semaphores, communication ports, and files—that are accessible to all threads in the process
A security context called an
A unique identifier called a
At least one thread of execution (although an “empty” process is possible, it is not useful)
Each process also points to its parent or creator process. If the parent no longer exists, this information is not updated. Therefore, it is possible for a process to refer to a nonexistent parent. This is not a problem, because nothing relies on this information being kept current. In the case of ProcessExplorer, the start time of the parent process is taken into account to avoid attaching a child process based on a reused process ID. The following experiment illustrates this behavior.
EXPERIMENT: Viewing the Process Tree
Вильям Л Саймон , Вильям Саймон , Наталья Владимировна Макеева , Нора Робертс , Юрий Викторович Щербатых
Зарубежная компьютерная, околокомпьютерная литература / ОС и Сети, интернет / Короткие любовные романы / Психология / Прочая справочная литература / Образование и наука / Книги по IT / Словари и Энциклопедии