Describes how to reduce the chance of thrashing occurring in demand memory and how to recover from thrashing.
Thrashing is a state where the vast majority of the processing time is spent paging memory in and out of the system and very little is spent useful work. If this situation persists, then the system performance rapidly becomes unacceptable and will appear to the user to have hung.
When thrashing occurs the device will appear to do nothing or 'hang' for period. Unlike a deadlock however, the device can recover from thrashing.
The following can be used reduce the chance of thrashing:
Compress pages in memory to decrease the amount of memory that has to be paged in and out
Limit the maximum size of each process's paged memory to the minimum size of the paging cache
Partition the page cache per-process and allocate pages to processes based on the Working Set Size (WSS) of threads in that process
Swap out the oldest pages in advance to free up memory to cope with spikes in paging demand
Don't let threads steal pages from other threads
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.