modus

The program frames

A demonstration of paging as a tool of the system (paging, second part).

Pages on first use: a memory object takes no page frame until a program uses a page; the budget pays at creation, so an access never fails. The shared code of a module: programs that run one module map one memory object for its code; a write to it is a page fault. The window shows each case and the answer of the kernel, and the measures.

The program needs the grant to inspect the machine (it reads the page table of its own half), and the boot image (it starts the program `twin`).

FactValue
Sourceprograms/frames
Boot imagein the boot image; the image is not built, so its size is not known
Importsnone
Imported bynone

Exports

ExportWhat it does
entry()

Read from the source of the module, as the build reads it to describe the exports (tools/kerneltool/describe.odin).

What the root service gives it

WhatValueAs the root service says
Grants{.Inspect, .Image}It reads its own page table, and starts its twins from the boot image.
Budget: pages, programs, threads{pages = 12288, programs = 6, threads = 6}8192 pages at a time, and 5 twins.

Read from grants_of and things_of in programs/root/main.odin; budget_of in the same file adds the limits of processor time and of log records.