When shutting down XP has to "kill" any live applicationsor processes that are currently running. So close all applications first. However, some applications and processes are always running in the background. You can reduce amount of time that Windows XP waits for those applications and processes to close before Windows XP kills them. To reduce this time considerably follow these simple steps:-
1) Go to Start>Run>regedit
2) Navigate to HKEY_USERS\.DEFAULT\Control Panel\Desktop.
3) Highlight Desktop. In the right pane set "WaitToKillAppTimeout" value to 1000. Set the "HungAppTimeout" to 1000 as well.
4) Navigate to HKEY_LOCAL_MACHINE\System\CurrentControlSet|Control. Set "WaitToKillServiceTimeout" to 10000.
5) Close the registry editor
To shut down your PC in 2 seconds go to http://techkranti.blogspot.com/2009/09/quick-shutdown-windows-xp-ytddd-dfgd.html
Now you will be at peace while shutting down your machine...