Adaptation/GUID-E21E7992-607A-5A49-B022-189ECA9E76D1.dita
changeset 15 307f4279f433
equal deleted inserted replaced
14:578be2adaf3e 15:307f4279f433
       
     1 <?xml version="1.0" encoding="utf-8"?>
       
     2 <!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
       
     3 <!-- This component and the accompanying materials are made available under the terms of the License 
       
     4 "Eclipse Public License v1.0" which accompanies this distribution, 
       
     5 and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
       
     6 <!-- Initial Contributors:
       
     7     Nokia Corporation - initial contribution.
       
     8 Contributors: 
       
     9 -->
       
    10 <!DOCTYPE concept
       
    11   PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
       
    12 <concept id="GUID-E21E7992-607A-5A49-B022-189ECA9E76D1" xml:lang="en"><title>Code
       
    13 Paging Overview</title><shortdesc>Overview of demand paging when applied to code paging. </shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody>
       
    14 <section id="GUID-254768D6-B78B-5193-8583-2F8CF57614AC"><title>Purpose</title> <p>Demand
       
    15 paging is a technique where memory appears to application programs to be present
       
    16 in RAM, but may in fact be stored on some external media and transparently
       
    17 loaded into RAM when needed. Demand paging trades off increased available
       
    18 RAM against decreased performance, increased media wear and increased power
       
    19 usage. More RAM is made available by loading pages only on demand, but a cost
       
    20 is incurred every time a page is loaded. </p> <p>Demand paging is used to
       
    21 reduce the amount of RAM that needs to be shipped with a device and so reduce
       
    22 its cost. </p> <p>For the code paging type of demand paging, the executable
       
    23 is stored in a ROM. Since the memory locations that will be pointed to cannot
       
    24 be determined ahead of time, the pointers in the executable have to be modified
       
    25 after the page-in process. This process is known as 'relocation' and 'fix-up'.
       
    26 It is usually done by loader. </p> </section>
       
    27 <section id="GUID-217936E7-4F09-5291-B6C5-FF00BCE1B4BD"><title>Description</title> <p>The
       
    28 executable is in a ROM and so has to be loaded into RAM before it can be executed.
       
    29 When the required part of the executable is not present in RAM, then a paging
       
    30 fault is generated which starts the paging in process of specifying which
       
    31 part of the ROM is to be paged-in along with which RAM page is to be used. </p> <p>The
       
    32 above process (in very simple terms) describes how ROM paging works. With
       
    33 code paging, there is the added complication that the executable is not execute
       
    34 in place (it is probably stored via the use of an operating system e.g. ROFS)
       
    35 and so when it is paged in any pointers in the page will not point to any
       
    36 valid location. Hence a new step has to be carried out that modifies the pointers
       
    37 in the new page so that will point to meaningful locations once they are RAM.
       
    38 This process is known as 'relocation' and 'fix-up'. It is usually done by
       
    39 loader. </p> <p> </p> </section>
       
    40 <section id="GUID-85164F03-A6B5-5227-A380-5B199C805670"><title>Components</title> <p>These
       
    41 are the main components of code demand paging: </p> <ul>
       
    42 <li id="GUID-FB01C6A6-A688-5A2C-85ED-9AA81550031B"><p>Rom image - The executable
       
    43 is stored in a ROM. </p> </li>
       
    44 <li id="GUID-1A2D6E09-4A95-5000-B526-A005AD07A2A5"><p>RAM - Where the executable
       
    45 will be executed. </p> </li>
       
    46 <li id="GUID-ED582DCB-2018-5E02-8B97-84D41D79F06C"><p>Paging Fault Handler
       
    47 - To detect that a page-in process is required and to carry it out. </p> </li>
       
    48 <li id="GUID-ECF22038-E5E2-56BC-9DDF-4EB50ADAFBBC"><p>Loader - This usually
       
    49 does the 'relocation' and 'fix-up' process after the 'page-in' process. </p> </li>
       
    50 </ul> </section>
       
    51 <section id="GUID-A0780848-8A13-41F8-9BCD-C93B6CC7E0B8"><title>Using ROM Paging</title> <p>Which
       
    52 type of paging is used and for which area of memory is first specified the <codeph>oby</codeph> and <codeph>mmp</codeph> files
       
    53 and finally build by using specific parameters in the buildrom utility. </p> </section>
       
    54 </conbody><related-links>
       
    55 <link href="GUID-BDB847A2-557A-5902-AA6D-C1AE10D8E493.dita"><linktext>Code Paging
       
    56 Guide</linktext></link>
       
    57 <link href="GUID-795B8649-B6C3-5540-B52A-9B460F35A5B5.dita"><linktext>ROM Paging</linktext>
       
    58 </link>
       
    59 <link href="GUID-B35A70D2-1BC8-51DE-95BF-F315DB394582.dita"><linktext>Demand Paging
       
    60 Overview</linktext></link>
       
    61 </related-links></concept>