A: Windows tracks the key files used during startup and logon and stores them in Layout.ini, which is in the %SystemRoot%\Prefetch folder (e.g. C:\Windows\Prefetch). You can view it in Notepad or any other text editor. The first part is shown below, and as you can see, it shows the files used, such as NTOSKRNL.EXE and HAL.DLL.

[OptimalLayoutFile]
Version=1
C:\WINDOWS\SYSTEM32\NTOSKRNL.EXE
C:\WINDOWS\SYSTEM32\PSHED.DLL
C:\WINDOWS\SYSTEM32\KDCOM.DLL
C:\WINDOWS\SYSTEM32\CLFS.SYS
C:\WINDOWS\SYSTEM32\CI.DLL
C:\WINDOWS\SYSTEM32\HAL.DLL
C:\WINDOWS\SYSTEM32\CONFIG\SYSTEM
C:\WINDOWS\SYSTEM32\CONFIG\SOFTWARE
C:\WINDOWS\SYSTEM32\C_1252.NLS
C:\WINDOWS\SYSTEM32\C_437.NLS
C:\WINDOWS\SYSTEM32\L_INTL.NLS
C:\WINDOWS\FONTS\VGAOEM.FON
C:\WINDOWS\SYSTEM32\DRIVERS\ACPI.SYS
C:\WINDOWS\SYSTEM32\DRIVERS\WMILIB.SYS
C:\WINDOWS\SYSTEM32\DRIVERS\AMDXATA:SYS
C:\WINDOWS\SYSTEM32\DRIVERS\ATAPI.SYS
C:\WINDOWS\SYSTEM32\DRIVERS\ATAPORT.SYS
C:\WINDOWS\SYSTEM32\DRIVERS\BOWSER.SYS
C:\WINDOWS\SYSTEM32\DRIVERS\CNG.SYS
C:\WINDOWS\SYSTEM32\DRIVERS\COMPBATT.SYS
C:\WINDOWS\SYSTEM32\DRIVERS\BATTC.SYS

When the system is idle, a scheduled task runs on non-SSD systems that uses the information in Layout.ini and moves all the files to the outer tracks of the disk, improving their performance. The process that moves the files is actually defrag.exe.