From: Steven Rostedt <rostedt@goodmis.org>
To: Tomko <tomko@haha.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: question : is the init process of kernel running in kernel space or user space?
Date: Mon, 18 Apr 2005 08:49:05 -0400 [thread overview]
Message-ID: <1113828545.4294.166.camel@localhost.localdomain> (raw)
In-Reply-To: <42630F26.3060503@haha.com>
On Mon, 2005-04-18 at 09:36 +0800, Tomko wrote:
> Hi all,
>
> In the linux system , kernel is often starting up like this :
>
> bootloader -> start_32() -> start_kernel() -> init()
>
> i would like to ask what is the piority level in this starting procedure
> ? 0 or 3 ? that means, this start up process are running in kernel space
> or user space ? or the level is keep changing ?
> If it is in kernel space from the very beginning , at which point the
> system is switched into user space ? is it at the time when kernel open
> the shell ?
>
All the above functions you mentioned are running in kernel space. The
point that init switches to user space is at the bottom of the init
function, when it calls run_init_process, which calls execve. Which is
the same execve that a user program calls, and at that point the execve
would switch the process to a user space program, usually /sbin/init.
Also, the term priority is somewhat ambiguous. The priority level of a
task in linux is defined as the strength it has in respect to other
tasks when it comes down to scheduling. I understand you are talking
about the x86 level that a process runs in (kernel or user) but not all
architectures use that, and linux is a multiple architecture OS.
-- Steve
prev parent reply other threads:[~2005-04-18 12:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-18 1:36 question : is the init process of kernel running in kernel space or user space? Tomko
2005-04-18 12:49 ` Steven Rostedt [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=1113828545.4294.166.camel@localhost.localdomain \
--to=rostedt@goodmis.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tomko@haha.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