2 ms·
It's a radical idea, on the same level of jumping from monolithic kernel to micro kernel system. The main idea is to use a safe language (Java/C#) to provide p
by ww520 16y ago
It's a radical idea, on the same level of jumping from monolithic kernel to micro kernel system.
The main idea is to use a safe language (Java/C#) to provide process isolation instead of relying on the OS imposing separate process address space.
Safe language codes can be proved that they do no harm, cannot corrupt another program (the bytecode verifier will stop it). For the unsafe language programs (C/ASM), the current way to prevent them from stepping on each other is by putting them in separate address space processes with limited privilege (ring 3).
The main advantage with a safe language only system is that everything can be trusted enough that they can run in ring 0 in the kernel, thus very fast. There will be no more slow user mode to kernel mode system calls, no more ring 3 to ring 0 transition. It also allows all programs to run in one process address space, no more expensive process context switch (though thread context switch is still there). Inter-program messages will be very fast since they are in the same address space. Code quality will be improved with whole classes of bugs removed in safe languages.
Remember the complaint about microkernel? That most of its OS services are in user mode servers and thus incurring extra kernel-to-user mode transition? Imagine a system that has no kernel or user mode distinction and no mode transition.
The disadvantage of safe language system is that everything has to be in safe language, user program, kernel services, device drivers, etc, which is kind of impractical. Singularity allows "trusted" drivers written in unsafe languages. I don't know how well that works.
IMO a hybrid approach is more feasible. An OS with the traditional kernel (preferably microkernel) that supports unsafe language programs and drivers, and a safe-language kernel that allows verified safe-language programs and drivers to run in ring 0. This would maintain backward compatibility and allow radical new development that improve on quality and safety.