1. Gyanastra
  2. Operating Systems
  3. UGC NET: Windows Operating System
  4. Windows Design and System Components
Free lesson, no account needed 11 min read 25 practice questions after it
Asked in past papers6 times
  • UGC NET201620152014201320122007

Operating Systems · UGC NET: Windows Operating System

Windows Design and System Components

Overview

The Windows NT family, which includes Windows NT, 2000, XP, Vista and later versions, uses a layered hybrid kernel design.
User applications run in user mode, while the core operating-system services run in kernel mode above a hardware-hiding layer called the HAL. The design separates hardware-dependent code, kernel scheduling, executive managers, and user-mode environment subsystems.
For UGC NET, you must know which component does what, how a Win32 call reaches kernel mode, how Windows threads behave, and the standard Windows terms such as Unicode, WOW32, object handles, thread states and hibernate.

Key concepts

  • Windows NT architecture is a layered, hybrid kernel design. It is not a pure microkernel because most Executive services, such as memory and I/O management, run in kernel mode.
  • Hardware Abstraction Layer (HAL) is a kernel-mode dynamic link library, usually hal.dll, placed directly above the hardware.
    It hides processor- and platform-dependent details: interrupt controllers, DMA, timers, I/O buses, cache and multiprocessor differences. Processor-dependent code is isolated in the HAL.
  • Kernel is the low-level core in ntoskrnl.exe. It performs thread scheduling and dispatching, context switching, interrupt and exception handling, trap handling, and low-level synchronization using spinlocks and dispatcher objects.
  • Executive is the kernel-mode layer above the kernel.
    It is a set of managers, not one monolithic block: Object Manager, Process Manager, Memory Manager, I/O Manager, Cache Manager, Security Reference Monitor, Plug and Play Manager, Power Manager, Configuration Manager and Local Procedure Call facility.
  • Object Manager manages named kernel objects such as files, processes, threads, events, mutexes, semaphores, sections and tokens.
    A process refers to an object through a handle; operations are performed through system services on that handle. This is why Windows NT is sometimes called object-oriented at the kernel-object level.
  • Process Manager creates and terminates processes and threads and maintains process and thread objects.
  • Memory Manager provides virtual memory, paging, working sets, section objects and memory protection.
  • I/O Manager converts I/O requests into I/O Request Packets (IRPs), manages device drivers, device objects and file systems.
  • Security Reference Monitor enforces access checks, uses access tokens, and audits security events.
  • Environment subsystems are user-mode processes that provide APIs to applications. The Win32 environment subsystem, with csrss.exe and the kernel-mode graphics component win32k.sys, provides the Windows API environment.
  • WOW32 means Windows on Windows 32-bit. It is a compatibility environment that runs 16-bit Windows 3.x applications on 32-bit Windows NT-family systems. It is not a Win32 API library and not a file system.
    WOW64 runs 32-bit applications on 64-bit Windows.
  • Important system processes: smss.exe is the Session Manager Subsystem, the first user-mode process started by the kernel; it initialises sessions and starts csrss.exe and winlogon.exe.
    winlogon.exe handles interactive logon and starts the user shell. services.exe is the Service Control Manager. lsass.exe is the Local Security Authority Subsystem Service and enforces security policy.
    csrss.exe is the Client/Server Runtime Subsystem.
  • Windows 2000 thread states are: Initialized, Ready, Standby, Running, Waiting, Transition and Terminated. Some exam lists omit Initialized and ask for Ready, Standby, Running, Waiting, Transition, Terminated.
  • User-level threads are invisible to the kernel and managed by a library. Their major disadvantage is that if one user-level thread makes a blocking system call, the kernel blocks the whole process.
    Kernel-level threads are visible to and scheduled by the kernel.
    Multithreading models are many-to-one, one-to-one and many-to-many. Many-to-one maps many user threads to one kernel thread; one-to-one maps one user thread to one kernel thread; many-to-many maps many user threads to a smaller or equal number of kernel threads.
  • Windows character set: Windows 2000 and later native wide-character strings use 16-bit UTF-16 code units.
    UGC answers normally say 16-bit Unicode. A UTF-16 code unit is 16 bits; characters above U+FFFF need a surrogate pair.
  • Windows programming terms: a Win32 GUI application starts at WinMain, not main. The compiler produces an .obj object file. MFC means Microsoft Foundation Classes, the C++ class library for Windows programming.
    OLE means Object Linking and Embedding, used to embed or link objects such as sound into a Word document. INI files are plain-text initialisation files.
    MDI means Multiple Document Interface: a frame window contains an MDI client window, which contains child document windows.
  • Other exam facts: Windows is a preemptive operating system. Hibernate saves RAM contents to hiberfil.sys and powers off without closing running applications.
    Windows XP and Vista support FAT-16, FAT-32 and NTFS. Windows XP can act in workgroup peer-to-peer mode and domain client-server mode, and transport protocols are loadable drivers.
    Windows 2000 is a server-capable system for client-server networks. Windows Vista Disk Management can shrink and extend volumes.
    In Active Directory, every object has an access control list, and the schema is the blueprint of all objects in the domain.
  • Classic batch edit run: in a batch transaction system, the operator supplies the raw transaction file; an edit/validation program reads it and creates the edited transaction file ready for execution.
    The key idea is the validation/edit step, not the file extension.

How it works

  1. Firmware starts the Windows boot manager, which loads the kernel and HAL. The kernel initialises the Executive and then starts smss.exe, the first user-mode process.
  2. smss.exe creates sessions and starts csrss.exe and winlogon.exe; after interactive logon, the user shell and services are started.
  3. An application calls a Win32 API function in a user-mode DLL such as kernel32.dll, user32.dll or gdi32.dll.
  4. The API call usually reaches ntdll.dll, which contains user-mode stubs. A privileged operation causes a controlled transition to kernel mode.
  5. The kernel-mode system service dispatcher routes the request to the correct Executive manager.
  6. The Executive manager may use the kernel, a device driver, or the HAL. Results return to user mode.

Thread scheduling happens after a thread becomes Ready. The kernel dispatcher chooses a thread for each processor; the chosen thread enters Standby, then Running. If it waits for an event it enters Waiting; after the event it becomes Ready or Transition before it can run again.

Figure. Follow the downward path from user-mode applications through the subsystem and API layer to system services, Executive managers, kernel, HAL and hardware. The nearby text also notes that results return to user mode.

Formulas

  • Let a Windows process ii have tit_i threads, with nn processes and one primary thread per process.

  • Total threads: T=∑i=1ntiT=\sum_{i=1}^{n} t_i

  • Primary threads: P=nP=n

  • Non-primary threads: N=T−P=∑i=1n(ti−1)N=T-P=\sum_{i=1}^{n}(t_i-1)

  • If MM managers each use KK kernel services and each service calls HH HAL routines once per call, total HAL routine calls C=M×K×HC=M\times K\times H.

  • Symbols: tit_i is thread count of process ii; nn is number of processes; TT is total threads; PP is primary threads; NN is non-primary threads; MM is number of managers; KK is kernel services per manager; HH is HAL routines per service call.

Worked examples

Example 1: match-the-list style. Match: A HAL, B Kernel, C Executive, D Environment subsystem. Functions: i hides hardware differences and DMA; ii schedules threads and handles interrupts; iii contains object, process, memory and I/O managers; iv provides Win32 API environment in user mode.

A matches i; B matches ii; C matches iii; D matches iv. Answer: A-i, B-ii, C-iii, D-iv.

Example 2: thread count. A process has 4 threads and another has 7 threads. Each process has exactly one primary thread. Total threads =4+7=11=4+7=11. Primary threads =1+1=2=1+1=2. Non-primary threads =11−2=9=11-2=9. Answer: 11 total, 2 primary, 9 non-primary.

Example 3: request path. Ramesh clicks Print in a Win32 application.
The application calls a Win32 API; the call passes through a user-mode DLL and ntdll.dll; a system-call transition enters kernel mode; the Executive I/O Manager builds an IRP; the device driver and HAL handle hardware details; control returns to user mode.
Answer: Win32 API → ntdll → kernel transition → Executive I/O Manager → driver/HAL → return.

Example 4: statement type. I: The kernel schedules threads and provides low-level synchronization. II: The Executive contains object, memory and I/O managers. III: The HAL is a user-mode API environment. I and II are true; III is false because HAL is kernel-mode and hardware-hiding. Answer: I and II only.

Example 5: two-step numeric. An Executive has 4 managers. Each manager uses 2 kernel interfaces, and each interface calls 3 HAL routines. If every manager uses every interface once, total HAL routine calls =4×2×3=24=4\times2\times3=24. Answer: 24 HAL routine calls.

Comparison

ComponentModeMain responsibility
HALKernel modeHides hardware differences; handles buses, DMA, interrupt controllers, timers
KernelKernel modeThread scheduling, context switch, interrupts, low-level synchronization
ExecutiveKernel modeObject, process, memory, I/O, cache, security, PnP and power management
Environment subsystemUser modeProvides API environments such as Win32 to applications
PointUser-level threadsKernel-level threads
VisibilityUnknown to kernelKnown and scheduled by kernel
Blocking callOne blocking call blocks whole processOther threads can still run
SchedulingApplication/library dependentKernel controlled
SwitchingNo kernel privileges requiredRequires kernel involvement
Main drawbackPoor concurrency on blocking callsHigher overhead
PointUser modeKernel mode
ExamplesApplications, environment subsystems, system processesHAL, kernel, Executive, drivers
PrivilegeRestrictedFull hardware and privileged instructions
Fault effectProcess can crashSystem can crash
EntrySystem calls, exceptions, interruptsReturn to user mode after service
TermMeaning
WOW32Runs 16-bit Windows 3.x apps on 32-bit Windows
WOW64Runs 32-bit apps on 64-bit Windows
HibernateSaves RAM to disk, powers off, keeps running apps
SleepLow-power state with RAM maintained

Revision summary

  • HAL hides hardware; Kernel schedules; Executive manages; Environment subsystem provides API.
  • Windows is a hybrid kernel, not a pure microkernel.
  • smss.exe is the first user-mode process; winlogon.exe handles logon; lsass.exe handles security.
  • WOW32 is for 16-bit apps on 32-bit Windows; WOW64 is for 32-bit apps on 64-bit Windows.
  • User-level thread blocking call blocks the whole process.
  • Windows 2000 thread states: Initialized, Ready, Standby, Running, Waiting, Transition, Terminated.
  • Unicode in Windows is normally 16-bit UTF-16 code units.
  • Hibernate does not close running applications; it saves RAM to hiberfil.sys.
  • Kernel objects are accessed through handles; the Object Manager owns the namespace.
  • WinMain is the Win32 GUI entry point; MFC is the C++ class library; OLE supports embedded/linked objects.
  • MFC is the standard class library; a key naming win.txt is doubtful and should not be treated as a real Windows module.

Previous-year exam insights

  • Direct concept questions ask the primary responsibility of HAL, kernel, Executive, Object Manager or environment subsystem; first identify whether the component is user mode or kernel mode.
  • Match-the-list questions commonly pair HAL with hardware hiding, kernel with scheduling, Executive with managers, and environment subsystem with user-mode API.
  • Statement/assertion questions test whether Windows is a microkernel, whether Executive is modular, and whether kernel mode contains HAL, kernel and Executive.
  • Numeric questions count total threads, primary threads, non-primary threads, or manager–kernel–HAL call chains; write the multiplication clearly.
  • Sequence questions ask the path of a Win32 call requiring privilege: user API DLL → ntdll.dll → kernel transition → Executive manager → driver/HAL.
  • Common traps: calling HAL the scheduler, calling Executive the user-mode API layer, confusing WOW32 with WOW64, confusing smss.exe with winlogon.exe, and forgetting that user-level thread blocking blocks the whole process.
  • Miscellaneous Windows facts appear as one-liners: 16-bit Unicode, preemptive scheduling, hibernate, thread states, object handles, NTFS/FAT support, Vista volume shrink/extend, INI as text, MDI child windows, OLE.
  • A doubtful old key may name virtual memory management as the non-portable portion; standard architecture says the hardware-dependent code is isolated in HAL, so check the layer being described before choosing.

Practice at PARIKSHA

You are ready for the PARIKSHA tests of this sub-topic when you can:

  1. Name the mode and main function of HAL, kernel, Executive and environment subsystem.
  2. Explain how a Win32 API call reaches kernel mode and returns.
  3. Distinguish Object Manager, Process Manager, Memory Manager and I/O Manager.
  4. List Windows 2000 thread states and explain Standby and Transition.
  5. Compare user-level and kernel-level threads and state the blocking-call drawback.
  6. Identify smss.exe, winlogon.exe, services.exe, lsass.exe and csrss.exe by role.
  7. Solve thread-count and manager–kernel–HAL numeric questions without missing primary threads.
  8. Explain WOW32, Unicode size, hibernate, object handles and preemptive scheduling in one line each.
  9. Handle match-the-list and Statement I/II questions on Windows architecture without mixing layers.

Attempt the sub-topic test first, then the subject test.

Pages 1–2 of 2