diff -r ae94777fff8f -r 59758314f811 Symbian3/PDK/Source/GUID-44540C74-CD73-5D8E-A9E0-F90F46B4E7B1-GENID-1-10-1-15-1-1-7-1-1-5-1-8-1-11-1-7-1-4-1-4-1.dita --- a/Symbian3/PDK/Source/GUID-44540C74-CD73-5D8E-A9E0-F90F46B4E7B1-GENID-1-10-1-15-1-1-7-1-1-5-1-8-1-11-1-7-1-4-1-4-1.dita Fri Jun 11 12:39:03 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,54 +0,0 @@ - - - - - -Preventing -And Recovering From Thrashing TutorialDescribes how to reduce the chance of thrashing occurring in demand -memory and how to recover from thrashing. -
Introduction

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.

-
Background information

The following is useful background -reading:

    -
  • Thrashing

  • -
-
Thrashing features

When thrashing occurs the device -will appear to do nothing or 'hang' for period. Unlike a deadlock however, -the device can recover from thrashing.

-
Prevention of 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

  • -
-
Recovery from thrashing

The possible courses of -action to undertake, should thrashing occur, are :

    -
  • Reboot the device

  • -
  • Kill a thread

  • -
  • Decrease the number -of paged threads running concurrently

  • -
  • Pick one thread with -a high page fault rate and stop other threads stealing pages from the thread's -associated process

  • -
  • Prompt the user-side -memory manager to close down applications.

  • -
-
-Thrashing -guide -
\ No newline at end of file