In-depth understanding and optimization of WinXP startup (a)

  
                              

The system is started in three steps. The first step starts from the power-on, and the system BIOS performs a routine power-on self-test on the hardware device, that is, the so-called POST (Power On Self Test) check, including RAM check, soft and hard drive, and CD-ROM drive detection. . Next, the BIOS reads the boot loader of the active partition master record MBR (Master Boot Record). Finally, when the boot loader initialization is complete, the operating system boot process begins. Starting the operating system involves a lot of tasks and therefore takes the longest time. Typical tasks include booting the operating system kernel, loading disk volumes, loading device drivers, reading registration information, finding new hardware devices, initializing display devices, and displaying Out of the user interface, etc. At the same time, it also connects to the network and implements various user-defined configurations, such as security configuration. Win XP speeds up the boot process by collaborating more effectively with hardware.
If you are planning to purchase a new motherboard running XP, consider whether the motherboard's BIOS supports SBFS, the Simple Boot Flag Specification, or the "Simple Boot Mark Specification", which is better optimized with the operating system. Boot speed, such as minimizing BIOS memory detection time, no longer initializing devices for plug-and-play operating systems, and more.

Win XP's NTLDR boot loader has also been optimized. The task of starting the loader is to read and load the operating system kernel and related system files. In Win XP, the boot loader caches file and directory information, and reads the system files in just one I/O cycle, significantly increasing the speed of loading the operating system kernel. The XP kernel is also optimized to increase boot speed. Now, disk I/O operations and device initialization operations can overlap to some extent by detecting the device and loading the driver into memory while the disk is being read. In addition, the driver written for XP must be done, only the device that will be used will be initialized. In XP, the network is also initialized when the system is started, not later.

Win XP uses "pre-read" technology to load device drivers, services, and shell programs before actually using them. The key to pre-reading technology is to learn the previous boot process and optimize the load mode for the various files used during the boot process. This optimization technique is also used in the application software. The system analyzes the first few startups of each application, then creates a virtual "memory image" that describes the application requirements and saves this information to the WINDOWS\\PREFETCH file. folder. Once the image is built, the application software is loaded much faster. XP's pre-read data holds information about the last 8 system startups or application startups.

The effect of pre-reading technology can be seen through a simple experiment: delete the pre-read data corresponding to an application software in the WINDOWS\\PREFETCH directory, and then see if there is pre-read data and no pre-read. Read the difference in the data. Take Word as an example. If you haven't used it before, start it a few times and then use it in the normal way; then, record how long it takes for Word to start from clicking on the icon. Next, delete all WINWORD.EXE.*.PF files in the WINDOWS\\PREFETCH directory, click on the Word icon again to start it and see how long it takes to start. As you can see, the time difference between the two starts is very large. But don't worry, Win XP will start collecting pre-read data for Word again. After several startups, Word will start up very quickly. For boot loaders, there are also pre-read data files that work similarly, but if you're just experimenting, it's best not to delete them.

Briefly explain the naming rules for files under the PREFETCH folder. As mentioned earlier, each application (including the boot process of XP) has a corresponding pre-read file in the PREFETCH directory. The pre-read file describes the loading order of each module when the application starts. The name of the prefetch file is based on the name of the application executable file, plus a "-" and a hexadecimal value describing the full path of the executable file, plus the file extension .PF, such as MMC.EXE-461B77C5. Pf. However, on any system, XP starts pre-reading files with the same name, NTOSBOOT-B00DFAAD.PF.

Pre-read data also helps with Win XP's defragmentation tools. The information about the optimal pre-reading order is saved in the Layout.ini file in the WINDOWS\\PREFETCH directory. You can open this file with Notepad and see how Win XP thinks how to arrange the physical location of the file on the disk to be the fastest. The startup speed. The basis for the defragmentation tool to transfer file locations is here. In fact, when Win XP notices that the computer is idle, it will run the defragmentation tool and try to optimize the location of the file.

Win XP has the ability to buffer network connections and configuration, which allows XP to respond to network operations faster than previous Windows. By default, Win XP prefers a buffered network view instead of a real-time detected network view. That is to say, when you open the network view, Win XP displays the previously buffered network view, and it tries to establish a connection in the background. This processing method reduces the network operation delay time, even if the domain, DHCP or DNS server on the network fails, giving the user a smooth operation feeling.

Copyright © Windows knowledge All Rights Reserved