the modern world of computers can be intensely confusing for those of us who grew up with the notion that a program was something you loaded up, waited for that to finish, and then ran once it was all in memory

Follow

@millihertz
It might not be true for web "apps", but don't applications on e.g. mobile phones still work exactly like that? 🤔

@m0xee i don't know - but the way certain apps start instantly on my phone suggests not.

how i think it works is that the android runtime system translates bytecode files into executable code, which it then stores in the android cache, and can page back in in the same way Linux pages in any executable (including the Android runtime servers themselves); it also starts each app at startup, and requires all apps to die in such a way that they can be restarted in the same state (so they can be bumped out of the way in the background if, eg, memory runs out)

but my understanding of Android is as shallow as a puddle on tarmac on a hot day

@millihertz
No, I think it's pretty accurate. I think saving the state boils down to saving program's memory — when everything is position independent it's no longer a problem. And if this makes the program crash, it just gets relaunched. And of course its state gets cleared if the app was updated. I think even they have even implemented something like this for desktop applications in Mac OS X, but I'm not sure how it's done now.

@millihertz
However the part that on top of that Android applications are running in some sort of VM or at least get JIT-compiled slipped my mind completely. You're absolutely right, it is indeed more complex than things used to be 😄

Sign in to participate in the conversation
Librem Social

Librem Social is an opt-in public network. Messages are shared under Creative Commons BY-SA 4.0 license terms. Policy.

Stay safe. Please abide by our code of conduct.

(Source code)

image/svg+xml Librem Chat image/svg+xml