Same issue on a 2011 iMac 27, random black screen. Tried resetting Pram, holding shift D on startup, SMC fan control. Continued researching and came across this most basic, basic of advice – check the vents on top and bottom of computer body for dust built up enough to clog the airflow. Lo and behold, bottom vents were packed with a thick carpet of dust! Just vacuumed them 5x, as well as top vent. Can easily see how this would create a thermal problem. So far, so good... can't hurt, gotta help.