How does apt-get remove xterm
go through? And after it's been uninstalled, xterm
doesn't close and continues to function normally.
Is the xterm
process cached in RAM whilst it is running?
How does apt-get remove xterm
go through? And after it's been uninstalled, xterm
doesn't close and continues to function normally.
Is the xterm
process cached in RAM whilst it is running?
Not quite. The file is already open by the program. Deleting the file ( and then replacing it with another version ) does not affect the running program because the original file is held open ( though without a name on disk to open it again ) until the program is done with it. Only when all handles to the file are closed are its data blocks on disk released. Until then the open file can be read and written just like normal -- the only change is that nobody else can open it since its name has been removed.
While parts of the program may have already been read into ram when it is deleted, they may still be discarded and re-read later, or new parts of the program that had not previously been executed can still be loaded from the deleted file.