modus

The program flow

A measure of one ring (properties 4 and 6).

One thread writes records in a ring as fast as it can. A second thread reads them. No queue operation enters the kernel: a thread enters the kernel only to wait, and to wake the other thread. The program counts the records of one second, and asks the kernel how many times the program entered it.

It measures four rings: two capacities, and two ways to wait. A thread that waits at once enters the kernel each time the queue is full or empty. A thread that first reads the counters for a short time (system.wait_spin) finds most of the time that the other thread continued.

FactValue
Sourceprograms/flow
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}
Budget: pages, programs, threads{pages = 2048, programs = 1, threads = 3}

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.