software (sw) layers
main sw layers in an IBM PC or Wintel-compatible computer [Wintel refers to the partnership of Microsoft Windows and Intel producing personal computers using Intel x86 (or x64) compatible processors running Microsoft Windows]
- [lowest layer]
- hardware (hw) architecture
- BIOS* or UEFI*
- implemented as firmware* on the motherboard
- launching the OS loader
- operating system (OS)⇒
(e.g. MS Windows 8/10 → Search/Cortana: System Information; Command Prompt: winver or systeminfo)- application programs, including
- – utility programs (as parts of the OS)
- command line interface⇒ (Command Prompt, CMD; PowerShell)
- file magagement utilities (This PC; Windows Explorer or File Explorer)
- accessories (e.g. Calculator, Notepad, WordPad, Paint, Windows Media Player etc.)
- Task Manager
- ...
- – utility programs (from external, preferably open sources; some of them can be considered as apps), e.g.
- antivirus utilities (e.g. ESET; cf. Windows Defender)
- file managers (e.g. Total Commander)
- image viewers (e.g. IrfanView)
- pdf readers (e.g. Sumatra)
- media players (e.g. VLC)
- ...
- – user application programs (apps)
- office applications (e.g. Microsoft Office: Word, Excel, PowerPoint etc.)
- browsers (e.g. Google Chrome, Firefox etc.)
- ...
- [highest layer]
The terms layer and interface, as well as client and service describe interaction between software components in an abstract way. In this case, we usually assume that the layers form a hierarchical structure.
Each layer provides an interface for the higher (i.e. more abstract) layer in a form of services implementing basic functions of the layer. So the higher layer can use the services through the interface in a standardized way without having to know the details of the implementation.
Sometimes the higher layer is called a client, and the lower layer that provides services (i.e. callable routines, functions, methods, access to shared objects etc.) for the client is called a server. The communication mechanism between them (called inter-process communication or IPC) is provided by the OS in order to manage shared data.
There are different approaches of IPC; e.g. shared memory buffers ("file mapping"), named pipes (following the FIFO principle), message passing through Asynchronous Local Procedure Calls (ALPCs), server mailslots or mailboxes, providing access to COM (Component Object Model) objects through method calls, access to shared resources through kernel mutexes ("mutual exclusion" synchronization objects) and semaphores etc.
further reading:
Wikipedia: IBM PC compatible
Wikipedia: Wintel
Wikipedia: Utility software
Wikipedia: Inter-process communication
Main components of the Windows operating system I.
Windows OS components running in kernel mode
(1.1) hardware abstraction layer (HAL) (sets of routines that provide access to hw resources through standardized or unified interfaces; the HAL layer depends on the actual configuration of the personal computer; the HAL layer is intended to hide the low-level hardware details from device drivers; therefore this abstract layer allows the programmers to write device independent apps)
- the HAL layer provides functions or routines that can be called and executed only in kernel mode; these functions are implemented in the hal.dll file in the \Windows\System32 folder (since 2020 it has been merged into ntoskrnl.exe in Windows 10)
- the functions that the hal.dll library provides are mostly prefixed with 'Hal'; below are some examples (cf. Windows 10 DLL File Information, 2026-03-21):
- HalInitializeBios
- HalInitSystem
- HalBeginSystemInterrupt
- HalEndSystemInterrupt
- HalSendSoftwareInterrupt
- HalRequestSoftwareInterrupt
- HalClearSoftwareInterrupt
- HalRequestClockInterrupt
- HalEnableInterrupt
- HalDisableInterrupt
- HalGetAdapter (obsolete; see IoGetDmaAdapter)
- HalPutDmaAdapter (obsolete; see PutDmaAdapter)
- HalSetBusData (obsolete; see SetBusData)
- HalGetBusData (obsolete; see GetBusData)
- HalAllocateCommonBuffer (obsolete; see AllocateCommonBuffer)
- HalFreeCommonBuffer (obsolete; see FreeCommonBuffer)
- HalFlushCommonBuffer
- HalGetEnvironmentVariable
- HalSetEnvironmentVariable
- HalMakeBeep (reserved for system use :-( )
- ...
(1.2) device drivers (a driver is a program that operates a particular type of device; it provides a software interface for a given device enabling the OS and other programs to access hw functions without needing to know precise details about the hardware being used; kernel mode drivers are located in files with *.sys extension)
(e.g. MS Windows 8/10 → Search/Cortana: [This PC → Properties → Settings →] Device Manager, e.g. Network Adapters → Realtek PCIe FE Family Controller [interfacing the CPU PCI Express bus to a Fast Ethernet (100Mbps) network] → Driver)
(1.3) (micro- or hybrid) kernel* (the core of the OS which is the first OS program to be loaded and always resident in memory; generally, the kernel facilitates and controls interactions between hardware and software components; specifically, the kernel provides the core functions of the OS like task scheduling and interrupt handling; the components of the kernel are located in the ntoskrnl.exe file in the System32 directory)
(1.4) executive (executive services provide higher level functions such as memory management, security, I/O management, IPC management, process and thread management, PnP management, power management etc.; the services are implemented as objects which can be accessed by handles through well-defined interfaces; the objects are managed by the Object Manager; the components of the executive are located in the ntoskrnl.exe file in the System32 directory)
- due to performance reasons the Windows subsystem runs in kernel mode; it is managed by the Window Manager and uses the Graphics Device Interface (GDI) functions; the functions of the windowing and graphics subsystem are located in the win32k.sys file in the System32 directory)
Windows handles are abstract pointers (i.e. unique identifiers) to the Windows executive objects (which represent system resources, e.g. files, images, threads etc.). Each handle has an entry in an internally maintained table and the entry, among others, contains the address of a given object. In order to manipulate (examine, modify etc.) the objects, the API functions use those handles to have access to the attributes (or properties) and the callable methods of the selected objects. For example, HANDLE hfile=CreateFile(L"example.txt",...); creates an instance of the file object; using this handle methods like read, write etc. can be called.
Main components of the Windows operating system II.
Windows OS components running in user mode
(2.1) subsystem DLLs* (the Windows Subsystem DLLs act as intermedieries between user applications and the Windows kernel, translating API calls into system functions)
Windows Subsystems (e.g. Windows Subsystem for Linux, WSL; Windows Subsystem for Android, WSA) are compatibility layers within the Windows OS that allow applications to run in different OS environments (e.g. Linux or Android); a given subsystem provides an environment and an interface between a user mode application and the Windows kernel; each subsystem typically provides an application programming interface (API) that allows applications to interact with the Windows kernel and other system components such as drivers and other services
- Windows Subsystem (Win32 or Win64 environment subsystem; the Windows API of the Windows Subsystem provides functions for the application programs to execute system calls via the corresponding native API functions)
- Windows API provides functions reside in libraries such as user32.dll, gdi32.dll, kernel32.dll etc.
- the Windows API functions run in user mode and call native API functions which communicate with the kernel which then executes the syscall in kernel mode; e.g.
ReadFile (Win32 API, kernel32.dll) in user mode
→ NtReadFile (Native API, ntdll.dll) in user mode
→ (syscall)
→ NtReadFile (Kernel Executive, ntoskrnl.exe) in kernel mode- native API functions reside primarily in the ntdll.dll library
- Windows Subsystem for Linux (WSL)
- Windows Subsystem for Android (WSA)
(2.2) Windows API* functions (the Windows application programming interface is the user-mode system programming interface for the Windows OS family; using the functions of Windows API we can develop applications that can run on the different versions of the Windows OS)
- Windows Native API functions (low-level and undocumented routines beneath the Win32 API; they are requested by system or supervisor (SVC) calls which trigger an interrupt into kernel mode; most of the native API functions are implemented in the ntdll.dll file in the \Windows\System32 folder; other functions reside in one or more corresponding DLL files following the form nt*.dll)
(2.3) Windows services* (Windows services are background processes that are launched by the OS and operate in the background independently from the logged-on users (similarly in concept to Unix daemons); they offer common services to the programs or processes in system, local or network context)
(e.g. MS Windows 8/10 → Search/Cortana: Services; Task Manager: Services; e.g. Device Setup Manager, DHCP Client, DNS Client, Windows Update etc.)
(2.4) system processes and threads,* including
– resident system processes* (they are always present and responsible for the boot process and the operation of the computer) – background processes (each providing a set of resources for running apps)
further reading:
Wikipedia: List of Microsoft Windows components
Wikipedia: Dynamic-link library
firmware (fw)
- fw is a sw that contains hardware specific ("low-level" or machine level) programs to control a given hw (e.g. computer peripherals etc.)
- fw implements basic functions of a spec device
- modern CPUs also contain fw which is specific to the applied motherboard (e.g. integrated GPU firmware)
- a specific fw is often called a microprogram; fw can be implemented as a set of microcodes
- modern complex CPUs are mostly microprogrammed, and only the simple, frequently used instructions are hardwired
- CPU microcode can translate complex assembly instructions into simpler (RISC-like) micro-operations
- a reduced instruction set (RISC) is designed to simplify the machine-code instructions of a complex instruction set (CISC); in principle, in a RISC computer each instruction performs only one function
- fw hides the hw spec details providing hw abstraction services to "high-level" sw (e.g. to the OS or apps)
- fw often provides a standardized interface for "high-level" programs (where the available basic functions for a hw device are independent from the different hw implementations)
- fw is held in non-volatile memory devices (such as ROM, EPROM, EEPROM, flash memory etc.)
In general, programs which provide hardware abstraction services to "high-level" software and stored in non-volatile memory devices are considered firmware (like BIOS and UEFI).
further reading:
Wikipedia: Firmware
BIOS (basic input-output system)
- implemented as a firmware*
- immediately after startup you have the option to activate a BIOS configuration or setup utility (BCU) by pressing a particular key or key sequence
- the BIOS setup utility allows the user to set system configuration options through an interactive menu system controlled through the keyboard
- formerly IBM-compatible PCs held the configuration settings in battery-backed RAM
- modern Wintel-compatible machines usually store the BIOS configuration settings in flash ROM (e.g. in the same flash ROM that holds the BIOS itself)
- when you turn on the computer (power-on startup), the first program that runs is a set of instructions kept in the computer's read-only memory (ROM); it is called booting process (from 1996 the BIOS boot specification is considered as a de facto standard)
- the BIOS firmware performs hw initialization
- it checks the PC for errors to make sure everything is functioning properly; the BIOS firmware tests the hw components of the computer system (power-on self test)
- CPU test
- memory test
- keyboard test
- HDD test
- ...
- once successful, the software will begin to activate the boot (or bootstrap) loader on the computer's boot device (e.g. the hard disk drive)
- in the booting process the BIOS loads the kernel of the OS into memory and turns control of the computer over to the operating system
- other services
- in the DOS era the BIOS set up small driver programs that controlled the various hardware units; the BIOS interrupt calls were provided for the keyboard, display, mass storage devices etc.
- the BIOS drivers standardized an interface to the OS and to the application programs (i.e. BIOS provided an interface between the hw units and the "higher" sw layers)
- more recent OSs do not use the BIOS interrupt calls after startup
- UEFI is a successor to the legacy BIOS
further reading:
Wikipedia: BIOS
UEFI (Unified Extensible Firmware Interface)
- like BIOS, UEFI initializes and tests system hw components (memory, PCI, USB etc.) and then loads the boot loader from a mass storage device or through a network connection
- unlike the legacy BIOS, UEFI does not rely on boot sectors; it defines instead a boot manager (as part of the UEFI specification)
- when the computer is powered on, the boot manager executes the specified OS boot loader according to the boot configuration (stored in NVRAM, Non-Volatile RAM)
- OS boot loaders can be automatically detected by UEFI (e.g. in removable devices such as USB flash drives); the automated detection relies on standardized file paths to the OS boot loader
- UEFI provides a shell environment (i.e. a command prompt and a set of commands) which can be used to execute other UEFI applications including UEFI boot loaders; the available UEFI commands can be used for obtaining various information about the computer system or the firmware itself
- UEFI also provides a GUI for the main settings (just like BIOS)
further reading:
Wikipedia: UEFI
kernel
there are different kernel architecture designs
- monolithic kernel (it runs entirely in a single address space executing services in supervisor mode, mainly for speed)
- microkernels (they run most of their services in user space like user processes do, mainly for resilience and modularity)
– the Linux kernel is both monolithic and modular; the system (or core) kernel is always resident in memory, but it can insert and remove loadable kernel modules at runtime- hybrid or modular kernel (an extension of the microkernel architecture on the basis of the monolithic kernel architecture; it is running most of the system services in kernel mode, in kernel or system address space (such as executive services, and the windowing and graphics system etc.)
– MS Windows NT and 8/10 implement a hybrid kernel
further reading:
Wikipedia: Kernel
Dynamic-link libraries (DLLs)
a DLL is a shared library in the Microsoft Windows operating system which can contain portable executable code, functions, data and other resources (e.g. icons, fonts etc.) in an executable file format; for example,
- the functions and routines of the hardware abstraction layer (HAL) are located in the hal.dll file
- user mode device driver files are implemented as DLLs in the Windows OSs (with .drv extensions; e.g. printer drivers that control the operation of the printers etc.)
- the Windows API functions reside in one or more corresponding DLL files
- other files in DLL format
- Control Panel files (with .cpl extensions)
- ActiveX Controls files (with .ocx extensions; e.g. selecting a date from a calendar etc.)
Note that executable files (.exe), DLL files (.dll) and driver files (.drv) use the same format.
further reading:
Wikipedia: Microsoft Windows library files⇒
Windows API (Application Programming Interface)
The Windows API provides core services to build desktop and server apps that can run successfully on all versions of MS Windows. The functions provided by the Windows API can be grouped into certain categories. (The functions reside in one or more corresponding DLL files in the \Windows\System32 folder.)
- Graphical User Interface (GUI) (providing functions to create and manage screen windows, basic controls and dialog boxes; it supports functions to display output, prompt for user input and receive keyboard and mouse input etc.; these functions reside in user32.dll on 32 bit Windows)
- Common Dialog Box Library (providing access to for standard dialog boxes to open and save files, choose color, font and size etc.; these functions reside in comdlg32.dll on 32 bit Windows)
- Common Control Library (providing access to controls such as buttons, scrollbars, icons, carets, lists, menus, dialog boxes, progress bars, toolbars, tooltips etc.; these functions reside in comctl32.dll on 32 bit Windows)
- Windows Environment
- Windows Search
- Windows Shell (e.g. managing files and folders, the desktop, taskbar, start menu etc. and organize them into a hierarchical system which can be accessed and manipulated by the File Explorer; providing functions to manage the user-system interaction by prompting users to input, interpreting it, sending it to the OS, and then handling the output from the underlying OS; these functions reside in shell32.dll on 32 bit Windows)
- Console (a console is an application that provides I/O services to character-mode applications)
- the CMD (Command Prompt, a command-line interface in Windows) is basically uses the Win32 Console API
- PowerShell is the moderm, object-oriented command-line interface in Windows which is built on the .NET API;* it uses its own scripting language that is designed primarily for system administration (configuration management etc.) and task automation; the commands ('cmdlets') of the PowerShell follow the patterm 'verb-noun' and they are interpreted either interactively or sequentially in a batch file with .ps1 extension; it provides backward compatibility with the CMD console application
- User input and messaging
- Data access and storage
- Diagnostics
- Graphics and multimedia
- Graphics Device Interface (GDI) (providing functions for representing and displaying graphics content to monitors, printers or other output devices; it supports apps in drawing lines and curves, rendering fonts, handling color palettes etc. in a scalable way; these functions reside in gdi32.dll on 32 bit Windows in user mode)
- ...
- Windows Media Audio and Video Codec and DSP (a codec is a program that encodes or decodes a data stream or signal; the name comes from coder/decoder)
(e.g. MS Windows 8/10 → Windows Media Player → Help → About WMP → Tech Support Inf)- Windows Media Foundation (WMF) (a "next generation" multimedia platform for Windows; it is part of the Windows SDK which contains libraries and build tools required to develop Windows applications)
- Windows Media Format (reading and writing Advanced System Format (ASF) files)
- ...
- Base Services (accessing to the basic resources, e.g. file system, devices, processes, threads and error handling etc.; these functions reside in kernel32.dll and KernelBase.dll on 32 and 64 bit Windows)
- Devices
- System services
- Advanced Services (accessing to functions beyond the kernel, e.g. access the Windows registry, shutdown or restart the system, create, start and stop a Windows service, manage user accounts etc.; these functions reside in advapi32.dll and advapires32.dll on 32 bit Windows)
- Security and identity
- Application installation and servicing
- System admin and management
- Network and Internet Services (providing functions to access to the various networking abilities of the OS, including remote procedure call (RPC), Dynamic Host Configuration Protocol (DHCP), domain name system (DNS) etc.; these functions reside in netapi32.dll on 32 bit Windows)
A reference of the Windows API functions (with the underlying constants, structures etc.) is available from the Microsoft Learn. Note that the description of the API functions in the reference is described in C++.
further reading:
Wikipedia: Windows API⇒
Windows API index - Win32 apps | Microsoft Learn⇒
.NET Framework
The .NET Framework (pronounced as "dot net") is a proprietary software framework developed by Microsoft that runs primarily on Microsoft Windows. The .NET ("dot net") is a free and open-source computer software framework for Windows, Linux, and macOS operating systems.
Both platforms provide various services (user interface, data access, database connectivity, cryptography, web application development, numeric algorithms, network communications etc.) for application program developers to build desktop, web, and mobile apps in a software environment that can be implemented and run on any OS.
The main components of the implementation of the .NET Framework in Windows are as follows:
- .NET applications written in managed code (consisting of binary Common Intermediate Language (CIL) instructions)
- .NET Framework Class Library (FCL) (a collection of types, classes, interfaces etc. that implements functionality needed by different applications within the .NET Framework)
- FCL is integrated with the Common Language Runtime (CLR) engine and supports high-level languages (like C#, Visual Basic etc.)
- Common Language Runtime (CLR) engine (an application virtual machine for the .NET Framework including a Just In Time (JIT) compiler that can translate CIL instructions to the underlying CPU native machine code; it also provides various services like garbage collection, memory management, security etc.)
- .NET API
- Windows kernel
further reading:
Wikipedia: .NET Framework⇒
Wikipedia: .NET⇒
Microsoft: What is .NET Framework?⇒
Microsoft: What is .NET?⇒
Windows services
Examples of Windows services
(1) native Windows system services (background processes that run without a user interface and provide core OS functionality; they are managed by the Service Control Manager or SCM system process that starts, stops and manages Windows services; SCM manages a database and acts as a supervisor of the installed services; SCM is located in the \Windows\System32\services.exe executable file)
(1.1) Remote Procedure Call (RPC, RpcSs); RPC a critical system service leading to BSOD (Blue Screen of Death) if the user stops it. RPC is a powerful, central IPC technology based on the client-server model; RPC enables a client process to call functions through the RPC server process across process or machine boundaries.
- To call a function from another process running in the local machine (LPC or ALPC), the call will be performed through a kernel port object ("mailbox") that is created and stored in the \RPC Control directory of a hierarchical object database by the Object Manager. The port object can be created, named and handled through the functions located in the Microsoft RPC (MSRPC) runtime library (rpcrt4.dll).
In case a standard local synchronous RPC (Advanced LPC, ALPC), the Windows Memory Manager creates an ALPC Section Object (in kernel mode) allocating enough physical memory for a large data payload, and then associate the Section Object with the ALPC port. The Section Object will handle memory mapping to facilitate communication between the client and the server processes via shared memory.
Memory mapping means creating a shared, common physical memory space for separate processes so that they can read and write data in user mode directly through their own virtual addresses to the shared memory (to avoid interrupts). When communicating, the calling thread is blocked and placed into a wait state by the kernel (i.e. waiting for the called process to return data).
Windows local asynchronous RPC (LRPC or Advanced LPC, ALPC) utilizes the APC mechanism for local inter-process communication (IPC).
- The RPC service implements a server process.
- When a client process makes an asynchronous RPC call, the kernel wakes up the RPC server thread directly to process the request. The kernel modifies the scheduling status of the blocked server thread from Waiting to Ready. (client → RPC server)
- The server process utilizes a thread pool to manage incoming requests. The elements in the pool are those threads that have been called by RPC calls. They eventually pick up, process, and return results to the RPC server as answers to RPC calls. (RPC server ↔ called threads)
- When the asynchronous RPC call completes, the system may queue a specified APC object to the APC queue of the client's thread which initiated the RPC call. When the the thread enters an alertable state, it executes the callback function to handle the result of the RPC call. (RPC server → client)
In older 32-bit systems (like legacy Windows) system calls invoked software interrupts. Modern 64-bit systems are capable to bypass the RAM-involved "traditional" interrupt system using alternative hardware features of modern CPU-s.(1.2) DCOM Server Process Launcher (DcomLaunch); a critical system service running inside svchost.exe. It is responsible for launching ("spawning") separate, independent background processes as COM servers to provide access to object-based software components for client processes.
The requested sw component should be registered as a COM object, and its host can be implemented as either an executable to be run directly, or it can be located in a dll file to be hosted by dllhost.exe. The COM server (as the host for the requested COM object) will run as a background process, and the DcomLaunch service returns a pointer to a serialized and aptly structured ("marshaled") data packet to the client which contains e.g. data and instructions how to find and access the requested COM object. After the data packet has been processed, the client process can communicate with the background COM server process using RPC and so directly bypassing the DcomLaunch service.
- COM (Component Object Model) is a Microsoft technology that allows different sw components or applications to communicate and share data regardless of the programming language used to create them.
- COM uses the Microsoft Interface Definition Language (MIDL) to define the interfaces that are used across processes.
- COM acts as a de-facto standardized, binary interface that enables IPC between the components or applications. It allows components written in C++, C#, Visual Basic, Python etc. to interact;
- COM enables developers to create modular applications where the software is built from smaller, reusable parts that are often stored in .dll or .exe files (e.g. an application can use the MS Excel functions using this technology).
- DCOM extends COM to support communication between objects located on different computers in a network using RPC.
Other examples of Windows services
- User Manager (UserManager; managing multiuser environment)
- DHCP Client (requesting the IP address from the router in network environment)
- DNS Client (translating the domain names to IP addresses)
- Windows Defender Antivirus Service (WinDefend)
- Windows Firewall (mpssvc)
- Local Security Authority Subsystem Service (lsass.exe; a critical security process responsible for the authentication of users, managing passwords etc.)
- Plug and Play (PlugPlay; recognizing new hardware components)
- Print Spooler (spoolsv.exe; managing all print jobs)
- ...
(2) third-party services (programs that are registered as background services by installed external applications (e.g. antivirus software, hardware drivers etc.); they are often located in the Program Files directory)
Note that for those DLL-based services which do not have their own executable (*.exe) file, the Service Host (svchost.exe) process (a generic host or "container" process) is responsible for hosting, executing and running background services launched by the Service Control Manager (SCM, services.exe) system process.*
processes and threads
In general, a program has an executable (*.exe) file which is a static sequence of instructions. A running program has its own unique process. A process is a container for a set of resources (memory, security context, handles to system objects, pointer(s) to at least one thread etc.) needed and used when executing the program. A process can contain multiple threads (a kind of "lightweight" processes) that share the same memory. Although most applications run as a single process, some applications (e.g. browsers) create multiple child processes.
- In Windows, a process is represented in the kernel by a specific data structure called Executive Process block (a kind of "identification card"). This data structure is created and managed by the Object Manager as an object which holds critical data (e.g. process ID, exit time, handles to resources like memory, pointers to threads etc.; also has embedded data structures containing the kernel stack pointer, thread priority etc.) concerning the execution of the thread(s) of the process which are essential for the OS to manage the execution environment.
When a client (a program or one of its processes) needs a particular resource, the corresponding process will serve the requested resource for the client by its promptly created instance or thread.
- In case the requested server process is not running, it is created by the client program or process that first needs its service (e.g. from the DLL file where the code of the process is located).
- For each program or process, the OS keeps track of the pointers or handles to the requested processes in a virtual table which is actualized (and then maintained) every time when a new thread of the process is created.
- The threads are removed from the memory by the OS when they are not used any more (sometimes this process is called garbage collection).
A program (or process) can create one or more processes each of which can also be a parent of one or more child processes. In this way the parent-child relationships between the processes form a tree hierarchy where each child process points to its parent process. In case a parent process is deployed ("killed") its child processes will be called orphans.
A thread is an instance of a process which can be executed. Multiple threads can run concurrently. There should normally be at least one thread for each running process, and a process can host many threads.
The tasks (i.e. the apps, the background processes, and the system processes including their threads) that are actually running on the computer can be explored by the Task Manager. Some noteworthy information provided by the Task Manager are as follows:
- the name of the current apps and background processes (click on More details at the bottom, and View → Group by type)
- when there is more than one thread of execution, the number of threads are indicated after the program or process name (in parentheses)
- the unique program or process ID (PID) can be displayed by right-clicking on the header row and selecting the PID option
- the details of each thread can be displayed by right-clicking on the name of the thread and select the Properties option
- the location of each thread can be displayed by right-clicking on the name of the thread and select the Location option
- the CPU, memory, disk and network usage of each program or process
Note that the parent and child processes may form a process tree but the Task Manager does not show the parent-child relationships between processes. Instead, we can use the Process Explorer from Sysinternals, or the tlist /t command from the Windows SDK.
further reading:
Wikipedia: Thread (computing)
Microsoft: Process Explorer⇒
system processes
- System Idle Process (PID 0, 1 instance or thread; it represents or measures the percentage of the CPU usage when it is idle and available for other tasks)
- System Process (PID 4; it is the NT kernel; it provides callable interfaces which contain functions or routines that can be executed in kernel mode; these interfaces form the Windows Executive Services, including e.g.
– File Cache Manager;
– Configuration Manager;
– Plug and Play (PnP) Manager;
– Power Manager;
– I/O Manager;
– Virtual Memory Manager (VMM);
– Process and Thread Manager;
– IPC Manager;
– Object Manager;
– Security Reference Monitor (SRM);
when a program or process running in user mode issues a system call through the ntdll.dll native library, the corresponding function of the kernel is resolved using the System Service Descriptor or Dispatch Table (SSDT);
the kernel process is located in the ntoskrnl.exe file in the System32 directory; the child process of sthe System Process is the smss.exe)
- ...
- Session Manager Subsystem (→)
- ...
- Session Manager Subsystem (SMSS; when the power is on, the System Process creates the first ("master") SMSS instance which resides in the memory even after the boot process; Session Manager Subsystem is located in the smss.exe file in the System32 directory)
- In the boot process the master SMSS process creates some instances of itself; these smss.exe child processes are as follows:
- [Session 0] the first instance of smss.exe is responsible for creating the wininit.exe system process which starts the csrss.exe process
- Windows Initialization Process (→)
- Windows Subsystem Process (→)
- [Session 1] the second instance of smss.exe represents the first logged-on user, and it is responsible for creating the winlogon.exe process which starts the crss.exe process
- Windows Logon Process (→)
- Windows Subsystem Process (→)
- [for each new session] a new instance of smss.exe will be created; it will create the winlogon.exe process which will start the crss.exe process
- Windows Logon Process (→)
- Windows Subsystem Process (→)
- All instances of smss.exe will exit after finishing their job.
- Windows Initialization Process (WININIT) (the windows initialization process is responsible for initializing and setting a lot of things; e.g. it sets the default environment variables, it creates the Services Control manager by launching the services.exe process, it creates the 'temp' directory in the system root directory etc.; its location is the wininit.exe file in the System32 directory)
- Local Security Authentication Service (→)
- Service Control Manager (→)
- ...
- Local Security Authentication Service (LSASS) (it is responsible for managing authentication on the machine; it has one instance; its location is the lsass.exe file in the System32 directory)
- Service Control Manager (SCM) (it is responsible for handling (e.g. start, stop etc.) services defined in the system; it launches the Windows services as child processes; it has one instance; its location is the services.exe file in the System32 directory)
- ...
- Service Host (a shared-service process that serves as a shell for loading a particular group of services from the corresponding DLL files; it has multiple instances; its location is the svchost.exe file in the System32 directory)
- ...
- Windows Subsystem Process (Client/Server Runtime Subsystem, CSRSS)
(the CSRSS environment or emulation subsystem provides the user mode side of the Win32 subsystem creating the Windows environment and implementing (or emulating) the Windows personality;
the CSRSS subsystem is primarily involved with
– process and thread management,
– console window (CMD) handling,
– side-by-side assembly loading (i.e. storing multiple versions of DLLs and loading them in demand), and
– the shutdown process;
– historically it was also responsible for window management and graphics rendering but they have been moved to kernel mode;
the CSRSS subsystem has one instance for each session; its location is the csrss.exe file in the System32 directory)
- Windows Logon Process (WINLOGON) (it handles everything related to user's logons/logoffs and user initialization; its location is the winlogon.exe file in the System32 directory)
- Logon User Interface (LogonUI.exe)
- User Initialization Process (userinit.exe)
- Explorer (→)
- Font Driver Host (fontdrvhost.exe)
- Desktop Window Manager (→)
- ...
- Explorer (it is a core shell process which generates the Windows Graphical User Interface (GUI) on the screen; it is an orphan process because its parent, the 'userinit.exe' process exits after launching the 'explorer.exe'; is has one instance for each logged on user; its location is the explorer.exe file in the System32 directory)
- ...
- (various apps)
- ...
- Desktop Window Manager (DWM) (a process that is responsible for rendering graphical objects (windows, icons etc.) and 2D or 3D graphical effects to enhance user experience using an off-screen buffer for each window; is has one instance for each logged on user; its location is the dwm.exe file in the System32 directory)
further reading:
Medium: Windows System Processes –
– An Overview for Blue Teams by Nasreddine Bencherchali⇒
Wikipedia: Client/Server Runtime Subsystem
GUI (graphical user interface; Windows)
- Desktop (Windows shell)
- icons
- Taskbar (including the Start Menu, search bar, pinned apps, hidden icons, internet access, loudspeaker, keyboard, current date and time, notifications etc.)
- separate windows
- give the operating system commands to be executed
- pointing to an icon and (double) clicking on it with a mouse
- using a menu and select an item (e.g. the start menu)
- ...
further reading:
Wikipedia: Windows shell