RAM is like a dinner table. Once one group is done eating, it needs to be cleared so that the next group has a place for their food. This usually involves a bunch of staff quickly clearing and cleaning the table. They’re very busy when they do this, but only for a few minutes.
—
I think we need to clear up a misconception. In *consumer* devices, unused RAM is a waste of resources. (In research and infrastructure applications RAM needs to be reserved for things like filesystem deduplication, virtual processes, and bursts of unexpected activity).
Processes on phone operating systems are far more optimized than their desktop counterparts, with garbage collection (reclaiming no longer used segments of memory) is more aggressive. This allows the OS architects more leeway to push the envelope.
*But why does RAM utilization go up?* You’re relying on the user interface to accurately report usage levels. But these levels are always going to be averages of a constantly moving window of *x* microseconds. In server/*X/BSD systems, this can be tuned to deliver more accurate data. For phones, it may be an average calculated over multiple minutes. Which makes sense. An end-user may get nervous if they see little usage surrounded by crazy spikes.
But that’s a more accurate idea of what’s going on. When an application is “closed” it tends save its state into RAM so it can be quickly reloaded. This may involve some rapid shifting of data into more contiguous segments of memory. It’s an optimization that front loads the processing in order to make subsequent launches faster.
When a mobile OS decides to actually terminate the thread(s) of an application, that part of RAM will likely need to be cleared immediately so it can be reapportioned to other processes.
There are also architecture differences between the x86/AMD64 processors that traditional computers use and the ARM processors that are favored by devices with more stringent power requirements.
Latest Answers