device kernel termination by the host, as is done by the debugger


From a post-debugging/ release point of view, how does the debugger manage to terminate work/ kernels running on a device, seemingly from the host?
And would one be able to follow the same method within host program code, if becomes evident (to the host) that the device is no longer responding or executing as it should?

I am confident that the host would be able to monitor the device in such a way, and this would aid program error detection/ correction and overall device/ kernel stability/ reliability, particularly when the kernel itself is lengthy, and thus runs for a significant amount of time, and particularly within a cluster context