what is the difference between power off and restart?
The only difference is the signal sent to the hardware at the very last moment. To switch off/reboot the computer, the OS will send a special signal to the hardware once it is finished shutting down.