tags:

views:

98

answers:

2

One book on Unix programming says

The init process never dies. It is a normal user process, not a system process within the kernel, like the swapper, although it does run with superuser privileges.

What makes a process a system process? Is the system process embedded within the kernel code? Do all system processes run with superuser privileges?

+2  A: 

The book probably refers to processes that run entirely in kernel mode. In some versions of Unix, there isn't any actual executable file that implements these process - the kernel "fakes" an entry into the process (and/or thread) list, just so it has something to schedule, and something to account CPU time to. In other implementations, there is an executable, but that invokes one system call that never returns.

IOW, it's your first interpretation ("embedded within the kernel code").

Martin v. Löwis
A: 

I think there is a confusion between kernel mode process and process with super-user privileges.

The book probably wants to say that init does not run in kernel mode, but still runs with super-administrative privileges. I hope I am correct.

There are two kind of modes - user and kernel modes. All kind of system calls execute in kernel mode so that they have access to operating system functionality.

Read more on Protected Mode

Manish Sinha