My Mac's UI has locked up.
Is there any way to unfreeze the system short of cycling the power?
If you have SSH enabled on it, you might be able to ssh in from another computer and at least give it a graceful restart with, e.g., sudo shutdown -r now
Depends on what exactly has occurred. With Mac OS X would be unusual to see the entire system frozen. Much more likely a crashed app.
Have you tried a 'Force Quit' via command-option-escape?
I'd like more to find the reason for lock-ups and not just workarounds for symptoms.
UI freezing sounds very much like overheating video chips --- a common problem with many Macs, especially now during the summer in northern hemisphere.
I suggest you use e.g. smcFanControl2 and tweak up the minimum fan speeds to keep your Mac running cooler.