1. A computer-implemented method for managing memory, the computer- implemented method comprising: receiving a notice of a shortage of real memory; responsive to receiving the notice, comparing, for each active thread, the thread classification of the active thread to a global hierarchy of thread classifications, wherein the global hierarchy of thread classifications defines the relative importance of each thread classification, to identify a selected thread to affect; determining an action to take for the selected thread to form a determined action; and performing the determined action for the selected thread.