previous | start | next

Minix Process Memory

Minix3 does not use paged virtual memory!

Instead Minix3 uses 3 virtual segments for each process:

  1. Text (code) segment
  2. Data segment
  3. Stack segment

Unlike pages, segments are not all the same size.

A segment is specified by its beginning address and its length.

A Minix3 process's segments are loaded completely into memory; that is, there are no page faults or segment faults to deal with.

However, a segments do have virtual address and can be loaded anywhere in physical memory where there is room for its size. The beginning physical address for the segment must be recorded in a table.

This table is represented by the C struct mem_map:

/* Memory map for local text, stack, data segments. */
struct mem_map {
  vir_clicks mem_vir;/* virtual address */
  phys_clicks mem_phys;/* physical address */
  vir_clicks mem_len;/* length */
};

Note: whtat is a click? It is determined in /usr/src/include/minix/const.h:

#define CLICK_SIZE      4096/* unit in which memory is allocated */


previous | start | next