modus

The program locks

The measures of the locks of the kernel.

The program starts four programs `locker`. Each one works on its own objects only: a kernel entry of one locker touches no object of another locker. So a locker waits for another one only when the kernel makes it wait. With 1, 2 and 4 lockers at one time, the program measures the kernel entries in one second and the page faults on first use in one second. Then two threads of this program wake each other with the word wait, alone, then while two lockers enter the kernel. The window shows the numbers, and the waits of each lock of the kernel in each measure.

The program checks the counts: the kernel counted each entry of a locker, each page returned to its budget, each free page is in a budget or reserved, and no wake was lost. It does not check a speed.

The program needs the grant to inspect the machine, and the boot image (it starts the lockers).

FactValue
Sourceprograms/locks
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 the counts of the locks, and starts its lockers from the boot image.
Budget: pages, programs, threads{pages = 9216, programs = 8, threads = 20}4 lockers of 1024 pages, then 3 at a time of the stress case.

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.