next up previous
Next: Kernel Structure Up: The Virtual Processor Interface Previous: Events


In a multimedia environment there is a particular need for a domain to know the current time, since it may need to schedule many of its activities related to time in the real world.

In many systems (e.g. UNIX), the current time of day clock is derived from a periodic system ticker. CPU scheduling is done based on this ticker, and the system time is updated when this ticker interrupt occurs taking into account an adjustment to keep the time consistent with universal time (UT) (e.g. using NTP [17]). In these circumstances, a domain may only be able to obtain a time value accurate to the time of the last timer interrupt and even then the value actually read may be subject to significant skew due to adjustments.

To overcome these problems in Nemesis, scheduling time and UT are kept separate. The former is kept as a number of nanoseconds since the system booted and is used for all scheduling and resource calculations and requests. The expected granularity of updates to this variable can be read by applications if required. Conversion between this number and UCT can be done by adding a system base value. It is this base value which can be adjusted to take account of the drift between the system and mankind's clock of convention. The scheduling time is available in memory readable by all domains, as well as being passed to a domain on activation.

I. Leslie, D. McAuley, R. Black, T. Roscoe, P. Barham, D. Evers, R. Fairbairns & E. Hyden