This dissertation describes an OS that used code generation to optimize system calls and lock free data structures for concurrent access. The author’s Wikipedia page is here.