linux-um archives
 help / color / mirror / Atom feed
* [uml-devel] basic queries
@ 2004-10-07  6:44 young engineer
  2004-10-19 13:35 ` BlaisorBlade
  0 siblings, 1 reply; 2+ messages in thread
From: young engineer @ 2004-10-07  6:44 UTC (permalink / raw)
  To: user-mode-linux-devel

[-- Attachment #1: Type: text/html, Size: 1216 bytes --]

[-- Attachment #2: Type: text/plain, Size: 924 bytes --]

  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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [uml-devel] basic queries
  2004-10-07  6:44 [uml-devel] basic queries young engineer
@ 2004-10-19 13:35 ` BlaisorBlade
  0 siblings, 0 replies; 2+ messages in thread
From: BlaisorBlade @ 2004-10-19 13:35 UTC (permalink / raw)
  To: user-mode-linux-devel, young engineer

On Thursday 07 October 2004 08:44, young engineer wrote:
>    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.
> 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.
> 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).

> 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.
> 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).

>  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.

>  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.

>  Plz reply me back ..thanks in advance
Bye and good work with UML!
-- 
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
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-10-19 13:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-07  6:44 [uml-devel] basic queries young engineer
2004-10-19 13:35 ` BlaisorBlade

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox