Adaptation/GUID-592B6D20-4ABA-5C79-9734-D18E2CE4A86C.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-592B6D20-4ABA-5C79-9734-D18E2CE4A86C" xml:lang="en"><title>Writable
       
    13 Data Paging Overview</title><shortdesc>Overview of data paging, the next phase in Symbian's implementation
       
    14 of demand paging. </shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody>
       
    15 <section id="GUID-B1D8D3AD-4438-4C51-B900-1DD2B55202BC"><title>Purpose</title> <p>Writable
       
    16 data paging allows the demand paging of any user-side data (for example thread
       
    17 stacks and heaps). Writable data paging makes use of a fixed size backing
       
    18 store to page out data. The backing store may use a NAND flash partition or
       
    19 an embedded MMC (eMMC). </p> <p>The aim of data paging is to enable more memory-hungry
       
    20 use cases without increasing the amount of physical RAM present in the device. </p> <p>For
       
    21 example, data paging enables: </p> <ul>
       
    22 <li id="GUID-F3B36258-F661-5562-A641-1875D33600B7"><p>running applications
       
    23 that are not designed with the memory constraints of embedded devices in mind,
       
    24 for example applications ported from other environments with writable data
       
    25 paging (such as a PC). </p> </li>
       
    26 <li id="GUID-7BB35E5C-6E38-50E6-B27E-094948F0F6A8"><p>running multiple applications
       
    27 at the same time where previously there would not have been enough memory. </p> </li>
       
    28 </ul> <p> <note> Data paging offers no performance increase, unlike code paging
       
    29 which can speed up application loading by reading only the necessary pages
       
    30 into RAM. </note></p> <p> </p> <p>However, writable data paging does have
       
    31 the following limitations: </p> <ul>
       
    32 <li id="GUID-EB2514D7-CE57-52F2-91D5-E790A41D12B2"><p>It is only possible
       
    33 to page the following types of memory: </p> <ul>
       
    34 <li id="GUID-9C9002DF-BF9B-5656-A57F-84C442E855B7"><p>user heaps, </p> </li>
       
    35 <li id="GUID-8F6AC93B-F1BE-5CA6-899E-8433E2055013"><p>user thread stacks, </p> </li>
       
    36 <li id="GUID-0EC7E799-24CC-590E-A67D-DAA014825A1E"><p>private chunks, </p> </li>
       
    37 <li id="GUID-9789A61F-CB01-5AD8-8886-41CA74EA564F"><p>global chunks, </p> </li>
       
    38 <li id="GUID-1C8479BE-B4E6-5E6D-83C0-D23E8DC6F9CF"><p>static data. </p> </li>
       
    39 </ul> </li>
       
    40 <li id="GUID-E11A66FB-C2DF-5DE7-B074-0CBDFC7EBE6D"><p>A single memory object
       
    41 (e.g. a heap, stack, DLL or chunk) is the smallest granularity at which paging
       
    42 can be configured </p> </li>
       
    43 <li id="GUID-06F9012E-85CE-587C-B0E9-6BF7EE37A39F"><p>No attempt will be made
       
    44 to page kernel-side data </p> </li>
       
    45 <li id="GUID-88EE2287-EF50-5B7C-B63E-C2D172A1EA80"><p>No attempt will be made
       
    46 to implement memory mapped files (e.g. posix's mmap) </p> </li>
       
    47 <li id="GUID-C79316F5-BFF4-569E-8D44-AF5BDCBD0811"><p>No attempt will be made
       
    48 to implement any kind of paging on the emulator. </p> </li>
       
    49 </ul> </section>
       
    50 <section id="GUID-9E27B27E-898B-43DA-8614-4AAEEE0A294E"><title>Required background</title> <p>This
       
    51 document assumes that the reader is familiar with the concept of <xref href="GUID-F123D574-44DE-528A-806C-DB64229BCEA2.dita">Demand
       
    52 Paging</xref>, and the existing implementation of ROM and code paging in Symbian
       
    53 platform. </p> </section>
       
    54 <section id="GUID-1028A9E3-C9D7-4A4B-9DD4-B719475D09E5"><title>Key concepts
       
    55 and terms</title> <dl>
       
    56 <dlentry>
       
    57 <dt>Page</dt>
       
    58 <dd><p>Memory is managed in fixed size units called pages. The size of a page
       
    59 is usually determined by the hardware, and for ARM architectures this is 4K. </p> </dd>
       
    60 </dlentry>
       
    61 <dlentry>
       
    62 <dt>Paged in or Paged out</dt>
       
    63 <dd><p>If a given page of memory is present in RAM it is said to be <i>paged
       
    64 in</i> (or just 'present'), as opposed to <i>paged out</i>. </p> </dd>
       
    65 </dlentry>
       
    66 <dlentry>
       
    67 <dt>Paging in</dt>
       
    68 <dd><p>The process of moving a page of memory from being paged out to being
       
    69 paged in. </p> </dd>
       
    70 </dlentry>
       
    71 <dlentry>
       
    72 <dt>Paging out</dt>
       
    73 <dd><p>The process of moving a page of memory from being paged in to being
       
    74 paged out. </p> </dd>
       
    75 </dlentry>
       
    76 <dlentry>
       
    77 <dt>backing store</dt>
       
    78 <dd><p>The external media used to hold <i>paged out</i> pages is referred
       
    79 to as the <i>swap area</i>. This area may be much larger than physical RAM,
       
    80 although a factor of around twice as large is considered normal in existing
       
    81 systems. </p> </dd>
       
    82 </dlentry>
       
    83 <dlentry>
       
    84 <dt>Working set</dt>
       
    85 <dd><p>The term <i>working set</i> is defined as the memory accessed during
       
    86 a given time period. </p> </dd>
       
    87 </dlentry>
       
    88 <dlentry>
       
    89 <dt>Pinning</dt>
       
    90 <dd><p> <i>Pinning</i> pages refers to paging in demand-paged memory and forcing
       
    91 it to remain in RAM until it is <i>unpinned</i> at a later time. </p> </dd>
       
    92 </dlentry>
       
    93 </dl> </section>
       
    94 <section id="GUID-AED67EBB-6176-4357-BC22-4A0B4E518265"><title>Classes</title> <p>The
       
    95 following classes are affected by the use of writable data demand paging: </p> <p>The
       
    96 following classes are involved in the use of threads and processes: </p> <table id="GUID-24779260-DE34-5184-9A58-560F06F0DE9D">
       
    97 <tgroup cols="2"><colspec colname="col0"/><colspec colname="col1"/>
       
    98 <tbody>
       
    99 <row>
       
   100 <entry><p>Class </p> </entry>
       
   101 <entry><p>Description </p> </entry>
       
   102 </row>
       
   103 <row>
       
   104 <entry><p> <xref href="GUID-B0E661BC-4058-3256-B9C3-5A4FD52F6DE5.dita"><apiname>RThread</apiname></xref>  </p> </entry>
       
   105 <entry><p>This class is used to handle threads. </p> </entry>
       
   106 </row>
       
   107 <row>
       
   108 <entry><p> <xref href="GUID-9DD1EA2B-DC59-315C-8E9C-CE6D9461B695.dita"><apiname>RProcess</apiname></xref>  </p> </entry>
       
   109 <entry><p>This class is used to handle processes. </p> </entry>
       
   110 </row>
       
   111 <row>
       
   112 <entry><p> <xref href="GUID-1D0D14AD-43CF-3B52-AD8D-641F75B8098C.dita"><apiname>TThreadCreateInfo</apiname></xref>  </p> </entry>
       
   113 <entry><p>Used to specify the attributes of a new thread. </p> </entry>
       
   114 </row>
       
   115 </tbody>
       
   116 </tgroup>
       
   117 </table> <p>These classes are used in handling memory: </p> <table id="GUID-ACCA6C7E-92B5-51BE-B86E-D94E9FB0FF9F">
       
   118 <tgroup cols="2"><colspec colname="col0"/><colspec colname="col1"/>
       
   119 <tbody>
       
   120 <row>
       
   121 <entry><p>Class </p> </entry>
       
   122 <entry><p>Description </p> </entry>
       
   123 </row>
       
   124 <row>
       
   125 <entry><p> <xref href="GUID-326A2F4D-0E99-31C0-A35D-E8BF45913F07.dita"><apiname>RChunk</apiname></xref>  </p> </entry>
       
   126 <entry><p>Handle a chunk. </p> </entry>
       
   127 </row>
       
   128 <row>
       
   129 <entry><p> <xref href="GUID-51F7DBCF-BFB6-31F9-8882-5D263A1AD4B4.dita"><apiname>TChunkCreateInfo</apiname></xref>  </p> </entry>
       
   130 <entry><p>A structure that specifies the type and properties of the chunk
       
   131 that is to be created. </p> </entry>
       
   132 </row>
       
   133 <row>
       
   134 <entry><p> <xref href="GUID-3DCB92FB-9C74-3B73-B229-BF7944087EE9.dita"><apiname>TChunkHeapCreateInfo</apiname></xref>  </p> </entry>
       
   135 <entry><p>A structure that specifies the type and properties of a chunk with
       
   136 a heap within it. </p> </entry>
       
   137 </row>
       
   138 <row>
       
   139 <entry><p> <xref href="GUID-C5D0C7E7-061F-3BA5-AE24-B83237684B01.dita"><apiname>UserHeap</apiname></xref>  </p> </entry>
       
   140 <entry><p>A set of functions that are used to create heaps. </p> </entry>
       
   141 </row>
       
   142 </tbody>
       
   143 </tgroup>
       
   144 </table> <p>The following classes are used in client/server communication: </p> <table id="GUID-E823BA5C-620C-5B58-9945-8135EF7D39D1">
       
   145 <tgroup cols="2"><colspec colname="col0"/><colspec colname="col1"/>
       
   146 <tbody>
       
   147 <row>
       
   148 <entry><p>Class </p> </entry>
       
   149 <entry><p>Description </p> </entry>
       
   150 </row>
       
   151 <row>
       
   152 <entry><p> <xref href="GUID-8E316AC4-4676-301A-9A23-659E83AA1D1C.dita"><apiname>CServer2</apiname></xref>  </p> </entry>
       
   153 <entry><p>The abstract base class for servers. </p> </entry>
       
   154 </row>
       
   155 <row>
       
   156 <entry><p> <xref href="GUID-4AD02F14-1142-372F-9D11-224595932034.dita"><apiname>TIpcArgs</apiname></xref>  </p> </entry>
       
   157 <entry><p>A client/server class that clients use to package arguments that
       
   158 are to be sent to a sever. </p> </entry>
       
   159 </row>
       
   160 </tbody>
       
   161 </tgroup>
       
   162 </table> </section>
       
   163 </conbody><related-links>
       
   164 <link href="GUID-9D66A168-AF11-51D9-903C-4A6C6D31DA3D.dita"><linktext>Flexible
       
   165 Memory Model Overview</linktext></link>
       
   166 </related-links></concept>