Originally Posted by cospengle
When you run a program, the file containing the program is read into your system's memory and the process uses this information to run. If you delete the file in secondary storage (on your hard disk) the program is still contained in the memory so it can still run until the memory is cleared
I don't think that is exactly correct.
When you run a program, the file containing the program is mapped
into your virtual address space. Individual pages are read on demand. The file is still required.
If you tell the OS to delete the file, the directory entry will go away. But the OS will recognize that a process still needs the file and won't really delete the file. When the process closes the file, the OS will remember that the file has no directory entry and will delete it then.