2 ms·
That is only the lazy solution. It is also possible to access hardware or any other low-level system resources from unprivileged user code, if its process has
by adrian_b 2y ago
That is only the lazy solution.
It is also possible to access hardware or any other low-level system resources from unprivileged user code, if its process has been granted appropriate access rights by the kernel.
This second solution requires more work, but it is much more secure as the access can be limited to only the strictly-required resources and system crashes become impossible.
The extreme of this solution is a micro-kernel operating system, but there is no need for extremes. Even in a Windows or Linux system you can use this method. You can have a very reduced privileged code in a driver or kernel module, which does nothing except providing access to the permitted resources. Then anything like attempting to access not mapped memory would happen in user code and it would crash only the user process, not the entire computer system.