Android Operating System




Download 0.67 Mb.
bet9/10
Sana22.12.2019
Hajmi0.67 Mb.
#4574
1   2   3   4   5   6   7   8   9   10

Process Management


Android provides several means on different layers to compose, execute and manage applications.
    1. Processes


A process is an instance of a program that is being executed. In Android, there are five different stages a process goes through in its lifecycle. The various types have different importance levels which are strictly ordered. The importance hierarchy is (descending from highest importance)

  1. Foreground Process: This is the app currently in use by the user. Other processes can be considered foreground processes if theyre interacting with the process that’s currently in the foreground. There are a few foreground processes at any given time



  1. Visible Process: This is a process that isn’t in the foreground but is still affecting what is seen on the screen. For example, a foreground process maybe a diaplog but the visible process is the app in the background of the screen which triggered the dialog.



  1. Service Process: This is a process that isn’t tied to any app on screen but is still doing something in the background such as playing music or downloading files



  1. Background Process: These are processes that are currently not visible to the user and therefore do not have any impact on the user experience. These are apps that are paused and are kept in memory for quick access in the future. They do not use valuable CPU time and other resources apart from memory



  1. Empty Process: This does not contain any app data anymore. They are kept around for caching purposes to speed launch later but maybe killed by the system if necessary.

Usually only background and empty processes are killed by the system and so the user experience stays unaffected. Android only kills apps when the memory usage goes too high but usually Android does not kill apps

Processes can contain multiple threads such as in Linux based systems. Most Android applications implement thread to separate the UI from inout handling and I/O operations or long running calculations.




    1. Download 0.67 Mb.
1   2   3   4   5   6   7   8   9   10




Download 0.67 Mb.