From: BlaisorBlade <blaisorblade_spam@yahoo.it>
To: user-mode-linux-devel@lists.sourceforge.net,
young engineer <y.engineer@rediffmail.com>
Subject: Re: [uml-devel] basic queries
Date: Tue, 19 Oct 2004 15:35:57 +0200 [thread overview]
Message-ID: <200410191535.57682.blaisorblade_spam@yahoo.it> (raw)
In-Reply-To: <20041007064432.14876.qmail@webmail46.rediffmail.com>
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
prev parent reply other threads:[~2004-10-19 13:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-07 6:44 [uml-devel] basic queries young engineer
2004-10-19 13:35 ` BlaisorBlade [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200410191535.57682.blaisorblade_spam@yahoo.it \
--to=blaisorblade_spam@yahoo.it \
--cc=user-mode-linux-devel@lists.sourceforge.net \
--cc=y.engineer@rediffmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox