Subversion Repositories HelenOS-doc

Rev

Rev 9 | Rev 17 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <chapter id="mm">
  3.   <?dbhtml filename="mm.html"?>
  4.  
  5.   <title>Memory management</title>
  6.  
  7.   <section>
  8.     <title>Virtual memory management</title>
  9.  
  10.     <section>
  11.       <title>Address spaces</title>
  12.  
  13.       <para></para>
  14.     </section>
  15.  
  16.     <section>
  17.       <title>Virtual address translation</title>
  18.  
  19.       <para></para>
  20.     </section>
  21.   </section>
  22.  
  23.   <section>
  24.     <title>Physical memory management</title>
  25.  
  26.     <section id="zones_and_frames">
  27.       <title>Zones and frames</title>
  28.  
  29.       <para>Physical memory is divided into zones. Each zone represents
  30.       continuous area of physical memory frames. Allocation of frames is
  31.       handled by the <link linkend="buddy_allocator">buddy allocator</link>
  32.       associated with the zone. Zone also contains information about free and
  33.       occupied frames and its base addresss in the memory. Some of the
  34.       architectures (Mips, PPC) have only one zone, that covers whole physical
  35.       memory. Other architectures (IA32) have multiple zones.</para>
  36.     </section>
  37.  
  38.     <section id="buddy_allocator">
  39.       <title>Buddy allocator</title>
  40.  
  41.       <para>Physical memory allocation inside one <link
  42.       linkend="zones_and_frames">memory zone</link> is being handled by buddy
  43.       allocation system. This approach greatly reduces possibility of memory
  44.       fragmentation and helps in allocating bigger continious blocks of
  45.       physical memory aligned to their size.</para>
  46.  
  47.       <graphic fileref="images/mm1.png" />
  48.  
  49.       <para>Frames are grouped into bigger blocks and blocks of the size i ^ 2
  50.       are stored in the list indexed with <varname>i</varname> (so called
  51.       order index). If list contains 2 ajacent blocks (of a same size of
  52.       cause) they can be merged into the bigger one and moved into the list
  53.       with higher order index, thus making possible allocation of a bigger
  54.       block.</para>
  55.     </section>
  56.  
  57.     <section>
  58.       <title>Slab allocator</title>
  59.  
  60.       <para>Kernel memory allocation is handled by slab.</para>
  61.     </section>
  62.   </section>
  63.  
  64.   <section>
  65.     <title>Memory sharing</title>
  66.  
  67.     <para>Not implemented yet(?)</para>
  68.   </section>
  69. </chapter>