Symbian3/PDK/Source/GUID-7A50630B-2B44-5D27-AA18-3BEEE1453020.dita
changeset 5 f345bda72bc4
parent 3 46218c8b8afa
child 14 578be2adaf3e
equal deleted inserted replaced
4:4816d766a08a 5:f345bda72bc4
     9 -->
     9 -->
    10 <!DOCTYPE concept
    10 <!DOCTYPE concept
    11   PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
    11   PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
    12 <concept id="GUID-7A50630B-2B44-5D27-AA18-3BEEE1453020" xml:lang="en"><title> The
    12 <concept id="GUID-7A50630B-2B44-5D27-AA18-3BEEE1453020" xml:lang="en"><title> The
    13 Paging Algorithm Technology Guide</title><shortdesc>Describes the paging algorithm used in demand paging.</shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody>
    13 Paging Algorithm Technology Guide</title><shortdesc>Describes the paging algorithm used in demand paging.</shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody>
    14 <section id="GUID-0F07152A-5469-463B-8BEE-71170A920B19"><title>Purpose</title> <p>Kernel side developers will sometimes need
    14 <section id="GUID-0F07152A-5469-463B-8BEE-71170A920B19"><title>Purpose</title> <p>Kernel
    15 to know the algorithm used to move data in and out of paged memory. </p> <p><b>Intended Audience:</b> </p> <p>This document is intended to be read by kernel
    15 side developers will sometimes need to know the algorithm used to move data
    16 side developers. </p> </section>
    16 in and out of paged memory. </p> <p><b>Intended
    17 <section id="GUID-55C2239D-C351-4081-96F8-CAF1538B4BE3"><title>The algorithm</title> <p><b>Terminology</b> </p> <p>Paged
    17 Audience:</b> </p> <p>This document is intended to be read by kernel side
    18 memory (virtual addresses and their contents) is called either: </p> <ul>
    18 developers. </p> </section>
       
    19 <section id="GUID-55C2239D-C351-4081-96F8-CAF1538B4BE3"><title>The algorithm</title> <p><b>Terminology</b> </p> <p>Paged memory (virtual addresses and their contents)
       
    20 is called either: </p> <ul>
    19 <li id="GUID-8533664E-057B-57EF-8A24-4BA7D3B4EC75"><p>'live', meaning present
    21 <li id="GUID-8533664E-057B-57EF-8A24-4BA7D3B4EC75"><p>'live', meaning present
    20 in the cache of physical RAM, or </p> </li>
    22 in the cache of physical RAM, or </p> </li>
    21 <li id="GUID-057D65C6-27D2-5BDD-B5CD-081808CCF44D"><p>'dead', meaning stored
    23 <li id="GUID-057D65C6-27D2-5BDD-B5CD-081808CCF44D"><p>'dead', meaning stored
    22 elsewhere in the backing store. </p> </li>
    24 elsewhere in the backing store. </p> </li>
    23 </ul> <p>Physical RAM not being used to hold paged memory is called the free
    25 </ul> <p>Physical RAM not being used to hold paged memory is called the free
    35 <li id="GUID-F8CDC9C1-C779-5D25-A16C-8BFC4B82B605"><p>The associated page
    37 <li id="GUID-F8CDC9C1-C779-5D25-A16C-8BFC4B82B605"><p>The associated page
    36 of RAM cache is returned to the free pool. </p> </li>
    38 of RAM cache is returned to the free pool. </p> </li>
    37 </ol> <p><b>Paging
    39 </ol> <p><b>Paging
    38 in memory</b> </p> <p>When a program attempts to access dead paged memory,
    40 in memory</b> </p> <p>When a program attempts to access dead paged memory,
    39 the MMU generates a page fault and the executing thread is diverted to the
    41 the MMU generates a page fault and the executing thread is diverted to the
    40 Symbian OS exception handler. This performs the following tasks. </p> <ol id="GUID-3C52A214-F7FC-55CF-9346-16A4D7E8E37A">
    42 Symbian platform exception handler. This performs the following
       
    43 tasks. </p> <ol id="GUID-3C52A214-F7FC-55CF-9346-16A4D7E8E37A">
    41 <li id="GUID-B10392F3-D0CA-5C31-8A88-59E151661821"><p>Obtain a page of RAM
    44 <li id="GUID-B10392F3-D0CA-5C31-8A88-59E151661821"><p>Obtain a page of RAM
    42 from the free pool. If the free pool is empty, free up some memory by paging
    45 from the free pool. If the free pool is empty, free up some memory by paging
    43 out the oldest live page. </p> </li>
    46 out the oldest live page. </p> </li>
    44 <li id="GUID-EA4E0F16-68D2-564D-B46E-5CB4CB515855"><p>Read the contents of
    47 <li id="GUID-EA4E0F16-68D2-564D-B46E-5CB4CB515855"><p>Read the contents of
    45 the dead paged memory from its actual location (e.g. NAND flash) and write
    48 the dead paged memory from its actual location (e.g. NAND flash) and write