Through virtual memory, capabilities, sandboxing, type safe languages (classloader), closures), side-effect free languages
Singularity OS etc.