It's as easy as a cron job.
Although to be honest, Windows hasn't randomly rebooted on me in a very long time. I don't recall seeing this behaviour in Windows 7. But it still happened a few times in Windows Vista, and of course in Windows XP.
These days, to get Linux to better mimic Windows behaviour, you'd need to write a mod to the software update tool - so that between downloading the patches and actually installing them, you were forced to shut down and reboot.