As you already checked PSU by putting in another pc, try putting another PSU in your PC, Second thing if you have
UPS try running without UPS for some time It will not harm anything if
AC does not fluctuates very much in your area. or Borrow A UPS from your friend and try using that...
Send me a PM with results of above and I will help you solve the problem.
Thanks, I agree with all the 3 reasons that you have given to me. In fact as I am writing this to you, my pc again restarted automatically and it stayed on for about 75 minutes, so the problem has not gone yet. In my area there is no power fluctuation or load shedding happening. The power is always there plus other electronic devices work fine in my house, so I believe that UPS is not required that much but I will keep this in mind no doubt. Can you please tell me a good brand or two for the UPS and the cost if you have any idea?
----------
For CPU thing, while OS is booting press the Pause button on your Keyboard, it should halt booting process now leave the PC in that state, if it does not reboot from there then problem is with either RAM/Mobo or CPU. Because in this condition none of these components are being used ...
Send me a PM with results of above and I will help you solve the problem.
Yes, I will do this and let you know ASAP. Thanks your help has been very encouraging.