Methods, systems, and computer program products for resource recovery. A
region of code can be considered untrusted. To catch problems in the untrusted
region, entry points are wrapped with exception logic for processing exceptions
raised within the untrusted region. Until an exception has been raised within the
untrusted region, instructions corresponding to the entry points may be executed.
However, once an exception has been raised within the untrusted region, further
access to the untrusted code is prevented. A time element may be recorded for indicating
execution time within an untrusted display hardware driver. Once a threshold execution
time is reached, indicating a graphics processor hang, driver execution stops and
an exception raised. When execution continues, the exception is processed based
on the exception logic. Updating the display hardware then occurs without using
the graphics processor. The display hardware may notify a user that the graphic
processor is not functioning.