Re: program execution in user space and in kernel space.
- From: Joe Pfeiffer <pfeiffer@xxxxxxxxxxx>
- Date: Wed, 16 Sep 2009 08:42:11 -0600
guru <guru.naveen@xxxxxxxxx> writes:
HI All,
I want to know, what do mean by program execution in user space and
program execution in kernel space.
What I know is, when program invokes calls any system call, it starts
executing in kernel space. But what about in user space? What makes
these execution differ?
The important difference is between the CPU's kernel mode and user
mode. To a first approximation, in kernel mode the code has access to
the full resources of the computer, while in user mode there are
restrictions on what can be done. So, there are typically instructions
that can only be executed in kernel mode (such as instructions to load
privileged system registers or to perform hardware input and output),
and memory areas are marked as accessible from user mode vs. accessible
only in kernel mode (user-accessible memory is also accessible from
kernel mode).
Your program and the C standard library (and any other libraries you're
using) execute in user mode, while the operating system kernel executes
in kernel mode.
--
As we enjoy great advantages from the inventions of others, we should
be glad of an opportunity to serve others by any invention of ours;
and this we should do freely and generously. (Benjamin Franklin)
.
- References:
- Prev by Date: Re: program execution in user space and in kernel space.
- Next by Date: [Help needed] Locking mechanisms in Linux
- Previous by thread: Re: program execution in user space and in kernel space.
- Next by thread: [Help needed] Locking mechanisms in Linux
- Index(es):
Relevant Pages
|
Loading