Mailing List Archive

Support open source code!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tlug: Overwriting running executable



Stephen J. Turnbull wrote:

> No, if they leave memory they end up in swap.  Only if you demand-load
> DLLs (eg, the GNU Emacs in Debian-JP does this) will any executable
> code be left on disk.  Unix systems don't do overlays and silliness
> like that, they use virtual memory.  However ...

I thought just dirty pages ended up in swap. An executable image isn't
writable, so doesn't tend to get swapped. Or is my example a special
situation, and the memory is flagged as swappable?
 
>     Neil> Then I had a more devious idea. Maybe the old executable is
>     Neil> still on the disk, but is just no longer referenced by any
>     Neil> directory entries. Its inode's reference count would be
>     Neil> still be non-zero, the reference being the currently running
>     Neil> instance of the old executable.
> 
> This is why you can do something like `prog data; rm data' with no
> ill-effects.

Sorry, I couldn't glean from your message which method you said it would
use with my "wmaker" example. Does it keep the old image on the disk,
island-like unreferenced by any directory and marked as free when I
exit, or does it load the whole image into memory?

Neil.
---------------------------------------------------------------
Next Nomikai: 20 November, 19:30 Tengu TokyoEkiMae 03-3275-3691
Next Technical Meeting: January, 1999 (details TBA)
---------------------------------------------------------------
Sponsor: PHT, makers of TurboLinux http://www.pht.co.jp


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links