in OS X 10.10 Yosemite the photoshop window freezes on my Mac mini when I un-minimise it. It minimises fine but when I click on it in the dock for it to re-open it simply freezes on the way up and defaults to the home login screen and takes about a minute or two to get up an running again.
Are you saying the entire system is freezing and the system restarts? That would indicate a damaged OS install, a bad driver, or a failing piece of hardware (drive, video card, motherboard). If so, might be time to hit the Apple store.