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)?

2 Answers 2

4

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.

2
  • So the program binary is kept in the page cache? Jan 8, 2016 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. Jan 9, 2016 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!

1
  • 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. Jan 8, 2016 at 23:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .