Take another view: make something that can host a process. A process is code and a list of input/output channels. To reload a process, remove it from the scheduler, reflash its code, and restart. This mostly needs an allocator. Or, in first iteration, make sure that code fits in single blocks.