# Services. The life with/without. And WorkManager.

DevFeed: [Services. The life with/without. And WorkManager.](<https://devfeed.tech/articles/services-the-life-with-without-and-workmanager-26129.md>)

Original publisher: [Read original article](<https://medium.com/google-developer-experts/services-the-life-with-without-and-worker-6933111d62a6?source=rss-8735065c2497------2>)

Author: Yonatan (Yoni) Levin

Published: 2018-05-10T17:53:59Z

Content type: article

Language: en

Sources: [Yonatan V. Levin](<https://devfeed.tech/sources/stories-by-yonatan-v-levin-on-medium.md>)

Topics: [Process](<https://devfeed.tech/topics/process.md>), [Linux](<https://devfeed.tech/topics/linux.md>), [Kernel](<https://devfeed.tech/topics/kernel.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-app-development](<https://devfeed.tech/tags/android-app-development.md>), [background](<https://devfeed.tech/tags/background.md>), [google](<https://devfeed.tech/tags/google.md>), [jetpack](<https://devfeed.tech/tags/jetpack.md>), [kernel](<https://devfeed.tech/tags/kernel.md>), [linux](<https://devfeed.tech/tags/linux.md>), [linux-kernel](<https://devfeed.tech/tags/linux-kernel.md>), [memory](<https://devfeed.tech/tags/memory.md>), [memory-management](<https://devfeed.tech/tags/memory-management.md>), [oom](<https://devfeed.tech/tags/oom.md>), [out-of-memory](<https://devfeed.tech/tags/out-of-memory.md>), [pages](<https://devfeed.tech/tags/pages.md>), [processes](<https://devfeed.tech/tags/processes.md>), [processing](<https://devfeed.tech/tags/processing.md>), [ram](<https://devfeed.tech/tags/ram.md>), [releases](<https://devfeed.tech/tags/releases.md>), [star-wars](<https://devfeed.tech/tags/star-wars.md>), [state](<https://devfeed.tech/tags/state.md>), [system](<https://devfeed.tech/tags/system.md>), [workmanager](<https://devfeed.tech/tags/workmanager.md>)

## AI overview

The excerpt explains that Android has no swap space and uses the OOM Killer to free memory when resources run low. Activity Manager assigns processes scores based on application state; higher scores make a process more likely to be killed, subject to configurable free-memory thresholds. The article frames this memory-management background as context for comparing existing background-work solutions and WorkManager, but the supplied text ends before those sections provide details.

## Source excerpt

With recent Android releases dealing with background, it has become more complicated than ever. Much like the Star Wars plot, it has become more and more intertwined And so, Google has released WorkManager as part of JetPack -- to help us to deal with such a background. Before learning what WorkManager is -- it's essential to understand why we need it and what was a reasons behind building it. The developers who knows what happens under the hood of the components/libraries and understand why they use it -- is by far a better developers. Better developer It's going to be a long article, so prepare a good cup of coffee & a couple of cookies. It build in 3 parts: Part #1 -- Memory Basics Part #2 -- Existing Background Solutions Part #3 -- WorkManager Firstly, before starting with all background-ish things -- we need to understand some of the basics of Android processing memory management. And this is will be our first part: Part 1: Android Memory 101 A long, long time ago, in a galaxy far far away -- Android kernel was first developed it and it was based on Linux-Kernel. The main difference between Android and all other Linux-Kernel based systems is that Android does not have a thing called "Swap space." Swap space in Linux is used when the amount of physical memory (RAM) is full. If the system needs more memory resources and the RAM is full, inactive pages in memory are moved to the swap space. While swap space can help machines with a small amount of RAM, it should not be considered a replacement for more RAM. Swap space is located on hard drives, which have a slower access time than physical memory In Android, there is no such a thing as a "Swap space." When the system is running out of memory, it's using OOM Killer to save a galaxy. Out Of Memory Killer The guy's goal is to free up memory by killing the processes based on their "visibility state" and amount of memory consumed. Every process gave its oom_adj score by Activity Manager. It's a combination of application state