c - How does the user-mode kernel in UML interface with the underlying kernel on the host -
in user mode linux (uml) trace thread annuls system calls made user-space process , redirects them kernel running in user-space. @ point userspace kernel require assistance of host os. how user-mode kernel call underlying host kernel, normal system calls? or use kind of ioctl mechanism or else?
i found simple explanation of uml design here. may useful you.
uml constructs using ptrace system call tracing mechanism.
- when process in user space, system called intercepted ptrace.
- when in kernel, no interception. when process executes system call or receives signal, tracing thread forces process run in kernel.
- after transition, process state restored , continues.
system call virtualization
- by switching user , kernel , system calls interception
- note: system call must annulled in host kernel.
- the process state preserved.
- when system call complete, process obtains returned value in saved registers , returned user mode.
also, article explains system call virtualization using ptrace following picture.
http://www.csee.wvu.edu/~katta/uml/graphics/vsyscall.jpg. red line represents normal syscall procedure.
Comments
Post a Comment