Subversion Repositories HelenOS-doc

Rev

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

<?xml version="1.0" encoding="UTF-8"?>
<chapter id="mm">
  <?dbhtml filename="mm.html"?>

  <title>Memory management</title>

  <section>
    <title>Virtual memory management</title>

    <section>
      <title>Address spaces</title>

      <para></para>
    </section>

    <section>
      <title>Virtual address translation</title>

      <para></para>
    </section>
  </section>

  <section>
    <title>Physical memory management</title>

    <section id="zones_and_frames">
      <title>Zones and frames</title>

      <para>Physical memory is divided into zones. Each zone represents
      continuous area of physical memory frames. Allocation of frames is
      handled by the <link linkend="buddy_allocator">buddy allocator</link>
      associated with the zone. Zone also contains information about free and
      occupied frames and its base addresss in the memory. Some of the
      architectures (Mips, PPC) have only one zone, that covers whole physical
      memory. Other architectures (IA32) have multiple zones.</para>
    </section>

    <section id="buddy_allocator">
      <title>Buddy allocator</title>

      <para>Physical memory allocation inside one <link
      linkend="zones_and_frames">memory zone</link> is being handled by buddy
      allocation system. This approach greatly reduces possibility of memory
      fragmentation and helps in allocating bigger continious blocks of
      physical memory aligned to their size.</para>

      <graphic fileref="images/mm1.png" />

      <para>Frames are grouped into bigger blocks and blocks of the size i ^ 2
      are stored in the list indexed with <varname>i</varname> (so called
      order index). If list contains 2 ajacent blocks (of a same size of
      cause) they can be merged into the bigger one and moved into the list
      with higher order index, thus making possible allocation of a bigger
      block.</para>
    </section>

    <section>
      <title>Slab allocator</title>

      <para>Kernel memory allocation is handled by slab.</para>
    </section>
  </section>

  <section>
    <title>Memory sharing</title>

    <para>Not implemented yet(?)</para>
  </section>
</chapter>

Generated by GNU Enscript 1.6.6.