Executable programs that run under DOS may be either memory-resident or non-resident. A memory-resident program leaves its code (or part of it) in memory after termination. After that, the program operates in parallel with other programs, often functioning as an interrupt handler. A non-resident program does not leave its code in memory after termination and the memory area that it occupied is freed.
A program that stays in the active RAM of the computer while other programs are running. Accessory software is often of this type, as is activity monitoring and resident scanning software. Viruses often attempt to "go resident". This is one of the functions an activity monitor may check.
Executable programs are divided into memory-resident and nonresident ones. A memory-resident program leaves its code or part of if in RAM after termination and DOS allocates a memory area necessary for program operation. After that, the memory-resident program operates in parallel with other programs; some TSR-programs may be unloaded from memory. A nonresident program does not leave its code in memory after its termination, and the memory area occupied by it is cleared.