* question : is the init process of kernel running in kernel space or user space?
@ 2005-04-18 1:36 Tomko
2005-04-18 12:49 ` Steven Rostedt
0 siblings, 1 reply; 2+ messages in thread
From: Tomko @ 2005-04-18 1:36 UTC (permalink / raw)
To: linux-kernel
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 ?
I am new to linux, hope someone can help me here.
Regards,
TOM
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: question : is the init process of kernel running in kernel space or user space?
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
0 siblings, 0 replies; 2+ messages in thread
From: Steven Rostedt @ 2005-04-18 12:49 UTC (permalink / raw)
To: Tomko; +Cc: linux-kernel
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-04-18 12:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox