Architecture of Windows 9x
The architecture of Windows 9x series OS kernel is monolithic. The basic code is considered similar in function to MS-DOS - as a 16-/32-bit hybrid, it requires MS-DOS support to operate.
Critical files
Windows 95 boots through following set of files.
32-bit shell and command line interpreter
- SHELL.DLL and SHELL32.DLL – Shell API
- EXPLORER.EXE – Windows 4 shell and file manager
- COMMAND.COM – command line shell executable.
Windows 95 Core
- KERNEL32.DLL and KRNL386.EXE – Windows API for Windows 4 OS resources
- ADVAPI32.DLL Functionality additional to the kernel. Included are things like the Windows registry, shutdown and restart the system
- GDI32.DLL and GDI.EXE - Graphic device interface
- USER32.DLL and USER.EXE - GUI implementation
- COMMCTRL.DLL and COMCTL32.DLL - Common controls
- DDEML.DLL Dynamic Data Exchange Management Library (DDEML) provides an interface that simplifies the task of adding DDE capability to an application
- MSGSRV32.EXE It acts as a 32-bit message server and will never appear in the Windows task list
- WIN.COM - responsible for loading the GUI and the Windows 4.xx portion of the system.
Registry and other configuration files
- SYSTEM.DAT, USER.DAT - contains Windows Registry
- MSDOS.SYS - contains some low-level boot setting such as disabling double-buffering or the GUI logo
- WIN.INI and SYSTEM.INI - configuration files from Windows 3.1, processed in Windows 9x as well
Virtual Machine Manager and configuration manager
- VMM32.VXD - Virtual machine manager and default drivers. Essentially Windows 9x 32-bit kernel.
Installable file System Manager
- IFSHLP.SYS - enables Windows to make direct file system calls bypassing MS-DOS methods
- IFSMGR.VXD - 32-bit driver for installable file system
- IOS.VXD I/O Supervisor (IOS) that controls and manages all protected-mode file system and block device drivers.
- MPREXE.EXE MPRSERV.DLL and MPR.DLL, Multiple Provider Router, required for network authentication and user profiles
- MSPWL32.DLL Password list management library
Device drivers
- IO.SYS - executable handling all of the basic functions, such as I/O routines
- HIMEM.SYS - DOS device driver which allows DOS programs to store data in extended memory via the Extended Memory Specification (XMS)
- SYSTEM.DRV, MMSOUND.DRV, COMM.DRV , VGA.DRV, MOUSE.DRV, BIGMEM.DRV, KEYBOARD.DRV - 16-bit drivers
- CP 1252.NLS, CP 437.NLS, UNICODE.NLS, LOCALE.NLS - keyboard layouts
- RMM.PDR Real Mode Mapper Virtual Device
The system may also use CONFIG.SYS (which contains settings and commands executed before loading the command interpreter) and AUTOEXEC.BAT (which is a batch file automatically executed after loading COMMAND.COM), but these two files aren't critical to the boot process, as Windows 9x IO.SYS contains a default setting for both, in case they're absent in the system. In Windows ME, CONFIG.SYS and AUTOEXEC.BAT are not processed. LOGO.SYS may be used as splash screen.
Boot sequence
The Windows 9x startup process consists of 6 phases. The first 2 of these steps are common to any operating system booting using the classic combination of BIOS and Master Boot Record - i.e. all IBM PC-compatible OSes of the era and the majority until the mid 2000s (compare UEFI and GUID Partition Table).
- Phase 1 - The ROM BIOS Bootstrap Process
The ROM BIOS starts the execution at the physical memory address FFFF0h. During this phase, BIOS first executes Power-on self-test (POST), then checks the existence of boot disk on A drive. If it is not found in the A drive, the ROM BIOS checks for a hard disk. If the computer has a Plug and Play BIOS, in addition: BIOS checks RAM for I/O port addresses, interrupt lines, and DMA channels for Plug and Play devices, disables found devices, creates maps of used and unused resources and re-enables devices.
- Phase 2 - The Master Boot Record and Boot Sector
Master boot record is loaded at address 7C00h, and then it loads the boot sector of Windows Disk partition. The boot sector contains the disk boot program and BIOS Parameter Block (BPB) table which to finds the location of the root directory and IO.SYS file, and then loads IO.SYS file into memory.
- Phase 3 - IO.SYS file initialization
IO.SYS initializes minimal FAT driver and reads MSDOS.SYS into memory. Then it displays "Starting Windows", depending on BootDelay=<n> line in MSDOS.SYS file. Then it loads LOGO.SYS file and displays a startup image on the screen. If the DRVSPACE.INI or DBLSPACE.INI file exists, it also loads drivers for compressed disks. Windows then tries to open the registry file SYSTEM.DAT. If that fails, it tries with SYSTEM.DA0. If configured in MSDOS.SYS or in registry, the double buffering is also enabled.
- Phase 4 - CONFIG.SYS, and real mode configuration
Windows 95 and Windows 98 now analyze CONFIG.SYS and load MSDOS real mode drivers. Windows ME ignores this. If the CONFIG.SYS file does not exist, the IO.SYS file loads drivers: IFSHLP.SYS, HIMEM.SYS and SETVER.EXE. Windows reserves all upper memory blocks (UMB) for Windows 95 operating system use or for expanded memory EMS. Windows 95 and Windows 98 execute COMMAND.COM to process AUTOEXEC.BAT. It loads terminate and stay resident (TSR) programs into memory. Windows ME ignores this step.
- Phase 5 - Initialize drivers
IO.SYS now runs WIN.COM. WIN.COM loads the VMM32.VXD file into memory or it is accessed from the hard disk. This file contains most important drivers, but they can be replaced. The real-mode virtual device driver loader checks for duplicate virtual device drivers (VxDs) that exists both in the Windows\System\Vmm32 folder and the VMM32.VXD file. In a case of duplicates, the driver in the Windows\System\Vmm32 directory will be loaded. Windows 95 and 98 now query real mode drivers calling INT 2Fh, and looks for drivers in registry entry HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\VxD marked to be loaded as external file. Then vmm32 analyzes [386 Enh] section of the Windows\System.ini file, and loads drivers mentioned there. Some most important drivers are loaded even if they are not mentioned in Windows Registry, SYSTEM.INI or in Windows\System\Vmm32 directory.
Once the real-mode virtual device drivers are loaded, driver initialization, on Windows 95 and Windows 98 occurs. Vmm32 then switches CPU from real mode to protected mode. The next step is initialization of protected mode drivers. It is executed in three phases for each device: critical part of initialization (while interrupts are disabled), device initialization (when file I/O is allowed) and InitComplete phase. After initialization of display driver, Windows switch to graphical mode.
- Phase 6 - Win32 initialization
After all the drivers are loaded, the Kernel32.dll, gdi32.dll, Gdi.exe, user32.dll, User.exe, shell32.dll and Explorer.exe are loaded. The next step in the startup process is to load the network environment. The user is prompted to log on to the network that is installed. When a user logs on, his desktop settings are loaded from the registry, or the desktop configuration uses a default desktop. Windows then starts programs defined in the StartUp folder, WIN.INI, and programs defined in registry keys Run, RunOnce, RunServices and RunServicesOnce inside branches HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion and HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\. After each program in the RunOnce registry key is started, the program is removed from the key. Hourglass pointer is turned off.
Kernel
The Windows 9x kernel is a 32-bit kernel with virtual memory. Drivers are provided by .VXD files, or since Windows 98 the newer WDM drivers can be used.[1] However the MS-DOS kernel stays resident in memory and Windows will use the old MS-DOS 16-bit drivers if they are installed.
See also
References
- ↑ Microsoft (2002-04-15). "Windows Driver Model (WDM)". Microsoft. Archived from the original on 2013-01-18. Retrieved 2016-05-27.
Further reading
- Schulman, Andrew (November 1994). Unauthorized Windows 95 - Developer's Resource Kit (1st ed.). Foster City, California, USA: John Wiley & Sons, Inc. ISBN 1-56884-305-4. ISBN 978-1-56884-305-6.
- Schulman, Andrew; Brown, Ralf; Maxey, David; Michels, Raymond J.; Kyle, Jim (1994). Undocumented DOS: A programmer's guide to reserved MS-DOS functions and data structures - expanded to include MS-DOS 6, Novell DOS, and Windows 3.1 (2nd ed.). Reading, Massachusetts: Addison Wesley. ISBN 0-201-63287-X. ISBN 978-0-201-63287-3.
- Paul, Matthias (2002-04-10). "[fd-dev] HMA access from TSR".
[…] MS-DOS 7.0+ […] introduced a […] for the most part undocumented RMD data structure usually located in the HMA. The kernel collects and records configuration and Real Mode Driver data during boot (type of driver, interrupts hooked by driver, CONFIG.SYS line of invocation, etc.) and stores this information in a […] complicated […] growing data structure. Presumably […] meant to be used by the Windows core to get a better picture of the loaded Real Mode drivers […] or even attempt to unhook or unload some of them, […] it is only used to a very limited extent ([…] some of the info reflected in the log files created on […] startup, and some parts of the […] configuration manager also make use of it), […] leaving room […] beyond the technical side […] because nothing of the interesting stuff is documented […]
- King, Adrian (1994). Inside Microsoft Windows 95 (2nd ed.). Redmond, Washington, USA: Microsoft Press. ISBN 1-55615-626-X. ISBN 978-1-55615-626-7.
- Programmer's Guide to Microsoft Windows 95: Key Topics on Programming for Windows from the Microsoft Windows Development Team. Technical Reference (1st ed.). Redmond, Washington, USA: Microsoft Press. 1995-07-01. ISBN 1-55615-834-3. ISBN 978-1-55615-834-6. Retrieved 2016-05-26.
- Oney, Walter (1995). Systems Programming for Windows 95 (1st ed.). Redmond, Washington, USA: Microsoft Press. ISBN 1-55615-949-8. ISBN 978-1-55615-949-7.
- Pietrek, Matt (November 1995). Windows 95 System Programming Secrets. The Secrets Series (1st ed.). John Wiley & Sons, Inc. ISBN 1-56884-318-6. ISBN 978-156884-318-6. Retrieved 2016-05-26.
- Hazzah, Karen (1997). Writing Windows VxDs and Device Drivers - Programming Secrets for Virtual Device Drivers (2nd printing, 2nd ed.). Lawrence, Kansas, USA: Miller Freeman, Inc. ISBN 0-87930-438-3. ISBN 978-0-87930-438-6.
- Mitchell, Stan (1997-05-11). Schulman, Andrew, ed. Inside the Windows 95 File System. Nutshell handbooks (1st ed.). Sebastopol, California, USA: O'Reilly & Associates, Inc. ISBN 1-56592-200-X. ISBN 978-1-56592-200-6. Retrieved 2016-05-26.
External links
- Microsoft. "Windows 95 Architecture Components". Microsoft. Archived from the original on 2014-10-17. Retrieved 2016-05-27.
- Microsoft (2006-11-15). "Description of the Windows 95 Startup Process". 1.1. Microsoft. Q174018. Archived from the original on 2014-02-14. Retrieved 2016-05-27.
- Microsoft (2013-10-26). "Understanding Win16Mutex". 5.0. Microsoft. KB125867. Q125867. Archived from the original on 2014-01-16. Retrieved 2016-05-27.