Android OS - nikitachebotarev/docs GitHub Wiki
JIT (just-in-time)
- Each time when the app is run, it dynamically translates a part of the Dalvik bytecode into machine code. As the execution progresses, more bytecode is compiled and cached. Since JIT compiles only a part of the code, it has a smaller memory footprint and uses less physical space on the device.
AOT (ahead-of-time)
- During the app’s installation phase, it statically translates the DEX bytecode into machine code and stores in the device’s storage. This is a one-time event which happens when the app is installed on the device. With no need for JIT compilation, the code executes much faster.
Processes
- Foreground process (activity which onResume() method has been called, BroadcastReceiver which onReceive() method is executing, service executing onCreate(), onStart(), or onDestroy())
- Visible process (activity which onPause() method has been called, service that is running through startForeground(), hosting a service that the system is using for a particular feature that the user is aware, such as a live wallpaper, input method service, etc.)
- Service process (A service process is one holding a Service that has been started with the startService() method)
- Cached process (These processes often hold one or more Activity instances that are not currently visible to the user, the onStop() method has been called and returned)
Doze mode
Ограничивает возможность приложух аксесить нетворк, cpu, alarm manager, во время того как устройство не используется. Разрешает все работы в определенные короткие периоды времени, время от времени.
Pipelines
- JVM (java -> javac -> .class -> [JVM: classloader -> Java Runtime System -> NativeOS])
- Dalvik (.java -> javac -> .class -> dex compiler -> .dex -> dexopt -> .0dex -> [DVM: classloader -> Dalvik Runtime System -> NativeOS])
- ART (.java -> javac -> .class -> dex compiler -> .dex -> dexopt -> .0dex -> dex2aot -> .elf -> ART)