Mobile/Android

Android Processes and Threads

데먕 2020. 5. 26. 14:32

1. Overview

2. Process

In Android, each running program (application) gets its own task and this task is associated with an isolated execution environment (sandbox). Together they constitute a process.

2.1 Corollary

Since processes are sandboxed in Android, one application can't access the environment of another application. (reliability, security)

3. Threads

In Android, each process can host one or more tasks. These are threads. Unlike processes, threads aren't sandboxed. So each thread gets its own tasks but threads don't get their own execution environment. Threads share the execution environment of the parent process, so they can communicate and exchange data easily.

3.1 Multithreading

Decomposition of application's logic into multiple concurrent tasks.

4. Reference

https://medium.com/@techyourchance