When you log in to safe mode, Windows uses only those programmes absolutely necessary to run itself. In normal mode, all sorts of applications and Windows modules are constantly accessing files on your hard drive.
To do its job, defrag needs to have files left alone and unchanged as it moves them about; when a file is accessed, defrag is not sure if the file has been changed or not, so it begins again.
You may want to investigate using DiskkeeperLite (free); this is the original programme that MS uses in XP for disk defragmentation. The benefit of Diskkeeper is that it will run even when programmes are accessing files or you are working on the computer; the drawback is that it will only work in a manual mode and only do one drive at a time. It is also faster (PERHAPS not as thorough as the Windows version).
If you elect to use DKL, then use it exclusively, and do not use the Windows defrag programme. Below is a link to download it:
http://www.freedownloadscenter.com/Best/diskeeper-light.htmlHope this explains the constant restarts and provides a workable alternative.
Regards,
John