First page Back Continue Last page Summary Graphics
Applications
Kernel debugging
- gdb via ptrace proxy
- gprof and gcov
Isolation
- Security - as a jail or sandbox
- Resource allocation - virtual hosting
Linux compatibility in other environments
Prototyping - test in a virtual environment before committing to a physical environment
Notes:
This slide lists the major application areas that have been suggested for UML.
The major use that it is seeing now is as a kernel debugging tool. Using gdb on it is not as straightforward at it might at first appear. The problem is that the tracing thread is ptracing the other threads. In order to debug a process, gdb needs to be able to ptrace it, a thread may be ptraced by only one other thread. To get around this difficulty, UML contains a ptrace proxy which starts gdb and intercepts its system calls. When gdb calls ptrace, the proxy nullifies the system call, executes it on behalf of gdb, and ptraces the return value into gdb. In this way, gdb is made to believe it has really attached to the thread.
In contrast, gprof and gcov work normally on UML. gprof offers more detailed profiling information than the kernel profiler, which gcov offers information which is not available at all with a native kernel.
Another set of applications involve using UML to isolate processes for one reason or another. The most obvious use of isolation is for security. A hostile or untrusted process may be run inside a virtual machine in order to prevent it from damaging the host and to prevent a security hole from being exploited in order to damage the host.
Another possibility is to port UML to different operating systems to use it as a Linux environment on those other systems.
A final application for UML is to use the virtual machine, or a set of them as a testbed for implementing a new service. Once the service is working well in a virtual environment, it can be copied onto the physical systems that will end up running it.