modus
Menu

The program clock

A measure of the time page.

The kernel writes the time in one page. Each program has this page and can only read it: a program reads the time with one load from memory. This program reads the time as often as it can for one second, in the two ways: from the time page, and with a kernel entry. It counts the kernel entries of each way.

It checks that the time never goes back, that the two ways give the same time, that the milliseconds of the page follow the cycle counter (the kernel writes them from it at each tick: a late tick loses no time), and that the kernel refuses to remove the time page.

FactValue
Sourceprograms/clock
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 = 1}Not named in things_of: the budget of each other program.

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.