Justin Armstrong wrote JaysOS, a “toy OS” that runs on the Gameboy Advance. It provides preemptive threads, semaphores, condition variables, and message queues. As of 0.2, it also includes a port of the Waba VM for Java bytecodes. Waba comes with a few interesting demo applets you can try out. The OS apps interact with the world using the “UI Manager”. Screenshots and more information available.