Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is an empty process in android and what is it’s use?

Tags:

android

What is empty process in android and what is it’s use. I have seen empty process in my device sometime and it shows process with 0 services ,0 activities means process with no components inside it . I also want to know if as a developer,it's of any use or it's just useful on OS level.

like image 560
amarnathpatel Avatar asked Dec 11 '22 00:12

amarnathpatel


2 Answers

What is empty process in android

It is a process with no running activities, services, or broadcast receivers (and where nothing presently is connected to one of the app's content providers, if any, though this is a fairly obscure case).

what is it’s use

Once upon a time, the process did have activities, services, and/or broadcast receivers. However, those components were destroyed as a part of their normal operation (e.g., a manifest-registered receiver returned from onReceive()). Right now, the process is being held onto, just in case that a process for the same app is needed again. Eventually, though, the empty process will be terminated, to free up system RAM for other processes.

I also want to know if as a developer,it's of any use or it's just useful on OS level.

Mostly, it is an OS-level optimization to improve device performance and responsiveness, compared with terminating the process immediately when the last running component was destroyed.

like image 99
CommonsWare Avatar answered Jan 31 '23 07:01

CommonsWare


What is Empty process?

Process that doesn't hold any active application components.

What is it use?

The only reason to keep this kind of process alive is for caching purposes, to improve startup time the next time a component needs to run in it.

The system often kills these processes in order to balance overall system resources between process caches and the underlying kernel caches.

like image 42
Rupesh Yadav Avatar answered Jan 31 '23 07:01

Rupesh Yadav