Ankur
Ankur

Reputation: 11739

System processes in Unix

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?

Upvotes: 1

Views: 396

Answers (2)

Manish Sinha
Manish Sinha

Reputation: 2112

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

Upvotes: 0

Martin v. Löwis
Martin v. Löwis

Reputation: 127457

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").

Upvotes: 2

Related Questions