In this talk, I will describe some of our recent work on operating system support for ad hoc networks in the context of the MagnetOS project. MagnetOS is a single system image operating system for ad hoc networks. It makes an ad hoc network look like a unified Java virtual machine by automatically and transparently partitioning applications into components and dynamically finding a suitable placement of these components on nodes within the ad hoc network. I'll describe the design of the system and present early results on the power performance of the adaptive code placement policies we have examined in MagnetOS.