1

I read somewhere that Android/Linux keeps programs in working memory after they close so that when they're opened later then they can be opened faster. Is this true? If it is not, is there a way to enable this option (such as autocopying programs to a ramdisk for execution)?

3

Not the program as it is executed in memory but the page cache keeps all the files (executable, libraries, and configuration files). Thus the time for the disk access may be saved on the second execution. But the dynamic linking has to be done again.

  • So the program binary is kept in the page cache? – Mr. Minty Fresh Jan 8 '16 at 20:00
  • 1
    @Mr.MintyFresh Yes but I think that the page cache does not treat the binary file different just because it is currently executed. If more data is read after the program has started than the cache can hold then the file will be dropped from the cache. But if you start the program again after a short time or rather after reading / writing little data then you have this effect. – Hauke Laging Jan 9 '16 at 0:09
-2

i've read recently about the Sticky Bit.

Source One [sorry]: programs are loaded after startup into memory

Source Two [sorry, german https://de.wikipedia.org/wiki/Sticky_Bit]: programs are kept in memory after exiting.

It also says, modern implementation don't support it (the functionality) any more, so check your distro!

  • Sticky bits was a thing in the 1970s (1980s?). AFAIK Linux doesn't use it at all. Todays's OSes do a much better job than humans would. – Gilles Jan 8 '16 at 23:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.