most scheduling and thread logic
is contained in an application library, and can thus be modified by
the developer as they see fit. For example, threads can be tagged
with local keys for debugging, statistics or prioritisation, depending
on application needs. Thread scheduling is platform-independent
with timers stored in a heap-allocated OCaml priority queue, and
can be overridden by the application (e.g. we have previously
demonstrated the benefit of custom scheduling for the Sqlite library
database in an earlier prototype [19]). Only the run-loop is Xenspecific,
to interface with PVBoot.