No. The concept if "idle" is not applicable for all processes, only to a part of them, when a process awaits of a user input from a console. "Normal" UI threads do not use it, but the thread is kept in a wait state (and uses zero CPU) until the user input is dispatches to the application main window, which wakes up the thread. This is not the same as idleness. Besides, you cannot know what the process is about to do next. So, in a general case, there is no a way to tell if a process is "safe to terminate". That's why, if you try to shutdown the system in a regular way, it can request you for the confirmation for termination of some processes. This thing is pretty trivial and is based on the fact that normal UI processes can process notifications from the OS which is about to shut down and terminate themselves in a graceful way. Some applications can veto or block shutdown or simply "hang". It nothing happens "soon enough", some application can be considered "handing".
There is an interesting short article explaining Microsoft patented way shutting down the OS:
http://www.conceivablytech.com/2530/products/microsoft-patents-operating-system-shutdown[
^].
—SA