basic queries
hi all
im new to linux and started using UML. Some basic queries from my side
1. UML is run as process, is there difference betweeen other normal linux processes? is it a higher priority process?
2. When UML boots, it does the same things as a linux kernel booting steps. But what devices it initializes during this process? It is a process so how it does these things?
3. What changes makes it a linux OS to linux process? what changes makes it a process?
4. Is there abstraction like kernel and process inside a UML which is itself a process? how?
5. How system calls & interrupts are managed in UML?
6. UML is a process so it has process address space. Is it further divided into kernel address space and user address space in which other process can be run in UML or other processes uses host user address space ?
Is there any documents abt internals of UML?
Plz reply me back ..thanks in advance
Young
Quoted 4 lines · young engineer
hi all
im new to linux and started using UML. Some basic queries from my side
1. UML is run as process, is there difference betweeen other normal linux
processes? is it a higher priority process?
No. In TT mode, it is a completely standard Linux process, with more threads, and making use of Ptrace.
Quoted 6 lines
2. When UML boots, it does the
same things as a linux kernel booting steps.But what devices it
initializes during this process? It is a process so how it does these things?
The Linux kernel contains two kinds of initialization code: one related to the hw architecture and one independent from the hw architecture. And UML is another "hw architecture", i.e. one different directory in arch/. So it does not execute any kind of hardware related initialization.
Also, devices are managed by device drivers. Uml does not use the device drivers talking with hardware. For instance, the "Hard Disk" driver used by UML manages /dev/ubd* as if they were hard disks, but actually instead of managing the hard disks, it manages some normal file of the host.
Quoted 2 lines
3. What changes makes it a linux OS to linux process? what changes makes it a process?
No, read the answer above. You have some wrong ideas to ask this question, so I cannot answer directly.
The architecture code handles relationship with the hardware, on physical archs, and with the host, in the UML case. Then, the architecture code provides some basical things to the rest of the kernel (physical RAM, virtual memory, a mean to intercept system calls).
Quoted 2 lines
4. Is there abstraction like kernel and process inside a UML which is itself a process? how?
You have threads. One thread is special and runs kernel code (plus some more kernel code threads). The other threads, in TT mode, run the processes code.
Quoted 2 lines
5. How system calls & interrupts are
managed in UML?
Both in TT and SKAS mode, it is done by ptrace(2): you ptrace(PTRACE_SYSCALL) a thread running the userspace code, it starts running, then when it does a syscall, it is stopped. UML then executes the syscall, while changing the child stack so that the host sees only a getpid() call (which does not hurt).
Quoted 3 lines
6. UML is a process so it has process address space. Is it further divided
into kernel address space and user address space in which other process can be run in UML or other processes uses host user address space ?
In TT mode, the part 0-2.5G is reserved to the userspace processes, while the part 2.5-3G is reserved for the UML kernel.
In SKAS mode, instead, even if there is one thread which is ptraced (the one in T mode in "ps auxw" output), it runs with different memory spaces. Think of more processes, each one with its memory, without the ability to interfere with other ones except for what explicitally allowed by the Linux kernel (in this case the UML one). But they are merged in one process from the host point of view, thanks to the SKAS patch.
About memory layout, the physical memory is mapped from 0-3G inside the UML Linux kernel process (the thread with the lowest PID), while each process sees an independent memory layout from 0 to 3G. For comparison, this is like the layout created by Ingo Molnar's 4G/4G patch.
Quoted 1 line
Is there any documents abt internals of UML?
Hmmm - search the main web site, for slides and whatever. You have to dig even more than with the normal Linux kernel. And remember that the docs you find, in the Kernel world, are often outdated, so they contain wrong infos. But even so, they are useful: you must see the differences when reading the source.
Quoted 1 line
Plz reply me back ..thanks in advance
Bye and good work with UML!
Signature · 13 lines
Paolo Giarrusso, aka Blaisorblade Linux registered user n. 292729 ------------------------------------------------------- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl _______________________________________________ User-mode-linux-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel