Quote of the week
[Posted January 16, 2008 by corbet]
I wonder what a tiny, SANE register-based bytecode
interface might look like. Have a single page shared between kernel and
userland, for each thread. Userland fills that page with bytecode, for a
virtual machines with 256 registers -- where instructions roughly equate to
syscalls.
The common case -- a single syscall like open(2) -- would be a single byte
bytecode, plus a couple VM register stores. The result is stored in
another VM register.
But this format enables more complex cases, where userland programs can
pass strings of syscalls into the kernel, and let them execute until some
exceptional condition occurs. Results would be stored in VM registers (or
userland addresses stored in VM registers...).
--
Jeff Garzik
(
Log in to post comments)