iMac Screen Freeze

I just mentioned to my better half that I had been praising our iMac’s reliability (in another thread). She then surprised me by telling me that it freezes every three or four weeks. She is not too concerned. She just restarts it.

The screen freezes. It does not respond to the keyboard or to mouse clicks. However, the cursor still moves with the mouse. The menu bar and dock do not unhide when the cursor is moved to their locations. Network activity appears normal. A long press on the power button shuts it down.

It is an early 2008 20” iMac with 6 GB of RAM and running El Capitan. There is no obvious trigger for the freeze, though displaying high resolution photos may increase the probability.

I would be grateful for any thoughts on possible causes or cures?