Skip to main content
edited answer according to revised question
Source Link
Jan
  • 8k
  • 3
  • 37
  • 43

Q: Are both user processes and kernel processes processes, as opposed to kernel?

I'm not sure if there is a single correct answer, but I'll give it a try.
Citing from "Operating Systems Design & Implementation" (A. Tanenbaum), 3rd edition, Chapter 2.1 says:

2.1. Introduction to Processes

All modern computers can do several things at the same time. While running a user program, a computer can also be reading from a disk and outputting text to a screen or printer. In a multiprogramming system, the CPU also switches from program to program, running each for tens or hundreds of milliseconds. While, strictly speaking, at any instant of time, the CPU is running only one program, in the course of 1 second, it may work on several programs, thus giving the users the illusion of parallelism. Sometimes people speak of pseudoparallelism in this context, to contrast it with the true hardware parallelism of multiprocessor systems (which have two or more CPUs sharing the same physical memory). Keeping track of multiple, parallel activities is hard for people to do. Therefore, operating system designers over the years have evolved a conceptual model (sequential processes) that makes parallelism easier to deal with. That model, its uses, and some of its consequences form the subject of this chapter. ###2.1.1. The Process Model

In this model, all the runnable software on the computer, sometimes including the operating system, is organized into a number of sequential processes , or just processes for short. A process is just an executing program, including the current values of the program counter, registers, and variables.

(emphasis mine)

While I have not yet gotten around to finish reading the book, according to this explanation a "process" is a unit of work that's executed on the processor and holds all necessary resources (image, state, registers, counters...).

##Answer to edited question

a kernel always runs in kernel mode and uses kernel space only.

That depends on the type of the kernel. A monolithic kernel runs its stuff in a single address space (kernel space), while microkernels may run their kernel processes in user space.

Can "system process" mentioned in the two books run in user space, kernel space, or both?

See above, a system process may run in both modes, depending on the type of kernel.

Are both user processes and system processes processes, as opposed to kernel?

Yes, both user processes and system processes are processes - hence the naming ;-) I don't understand the part after the comma, though.

Is "system process" different from kernel control path and kernel thread?

Yes. A process (user or system=kernel) is something different.

The kernel control path denotes the sequence of instructions, a kernel thread (aka LWP - lightweight process) is a thread that's created and scheduled directly be the kernel (as opposed to user threads, which are created by a threading lib).

###Conclusion A process is just a theoretical structure.
A kernel is a part of an OS that implements the concept of processes to allow eg. scheduling of said processes.
A thread is the smallest part of a process that can be scheduled independently.

Q: Are both user processes and kernel processes processes, as opposed to kernel?

I'm not sure if there is a single correct answer, but I'll give it a try.
Citing from "Operating Systems Design & Implementation" (A. Tanenbaum), 3rd edition, Chapter 2.1 says:

2.1. Introduction to Processes

All modern computers can do several things at the same time. While running a user program, a computer can also be reading from a disk and outputting text to a screen or printer. In a multiprogramming system, the CPU also switches from program to program, running each for tens or hundreds of milliseconds. While, strictly speaking, at any instant of time, the CPU is running only one program, in the course of 1 second, it may work on several programs, thus giving the users the illusion of parallelism. Sometimes people speak of pseudoparallelism in this context, to contrast it with the true hardware parallelism of multiprocessor systems (which have two or more CPUs sharing the same physical memory). Keeping track of multiple, parallel activities is hard for people to do. Therefore, operating system designers over the years have evolved a conceptual model (sequential processes) that makes parallelism easier to deal with. That model, its uses, and some of its consequences form the subject of this chapter. ###2.1.1. The Process Model

In this model, all the runnable software on the computer, sometimes including the operating system, is organized into a number of sequential processes , or just processes for short. A process is just an executing program, including the current values of the program counter, registers, and variables.

(emphasis mine)

While I have not yet gotten around to finish reading the book, according to this explanation a "process" is a unit of work that's executed on the processor and holds all necessary resources (image, state, registers, counters...).

Q: Are both user processes and kernel processes processes, as opposed to kernel?

I'm not sure if there is a single correct answer, but I'll give it a try.
Citing from "Operating Systems Design & Implementation" (A. Tanenbaum), 3rd edition, Chapter 2.1 says:

2.1. Introduction to Processes

All modern computers can do several things at the same time. While running a user program, a computer can also be reading from a disk and outputting text to a screen or printer. In a multiprogramming system, the CPU also switches from program to program, running each for tens or hundreds of milliseconds. While, strictly speaking, at any instant of time, the CPU is running only one program, in the course of 1 second, it may work on several programs, thus giving the users the illusion of parallelism. Sometimes people speak of pseudoparallelism in this context, to contrast it with the true hardware parallelism of multiprocessor systems (which have two or more CPUs sharing the same physical memory). Keeping track of multiple, parallel activities is hard for people to do. Therefore, operating system designers over the years have evolved a conceptual model (sequential processes) that makes parallelism easier to deal with. That model, its uses, and some of its consequences form the subject of this chapter. ###2.1.1. The Process Model

In this model, all the runnable software on the computer, sometimes including the operating system, is organized into a number of sequential processes , or just processes for short. A process is just an executing program, including the current values of the program counter, registers, and variables.

(emphasis mine)

While I have not yet gotten around to finish reading the book, according to this explanation a "process" is a unit of work that's executed on the processor and holds all necessary resources (image, state, registers, counters...).

##Answer to edited question

a kernel always runs in kernel mode and uses kernel space only.

That depends on the type of the kernel. A monolithic kernel runs its stuff in a single address space (kernel space), while microkernels may run their kernel processes in user space.

Can "system process" mentioned in the two books run in user space, kernel space, or both?

See above, a system process may run in both modes, depending on the type of kernel.

Are both user processes and system processes processes, as opposed to kernel?

Yes, both user processes and system processes are processes - hence the naming ;-) I don't understand the part after the comma, though.

Is "system process" different from kernel control path and kernel thread?

Yes. A process (user or system=kernel) is something different.

The kernel control path denotes the sequence of instructions, a kernel thread (aka LWP - lightweight process) is a thread that's created and scheduled directly be the kernel (as opposed to user threads, which are created by a threading lib).

###Conclusion A process is just a theoretical structure.
A kernel is a part of an OS that implements the concept of processes to allow eg. scheduling of said processes.
A thread is the smallest part of a process that can be scheduled independently.

Source Link
Jan
  • 8k
  • 3
  • 37
  • 43

Q: Are both user processes and kernel processes processes, as opposed to kernel?

I'm not sure if there is a single correct answer, but I'll give it a try.
Citing from "Operating Systems Design & Implementation" (A. Tanenbaum), 3rd edition, Chapter 2.1 says:

2.1. Introduction to Processes

All modern computers can do several things at the same time. While running a user program, a computer can also be reading from a disk and outputting text to a screen or printer. In a multiprogramming system, the CPU also switches from program to program, running each for tens or hundreds of milliseconds. While, strictly speaking, at any instant of time, the CPU is running only one program, in the course of 1 second, it may work on several programs, thus giving the users the illusion of parallelism. Sometimes people speak of pseudoparallelism in this context, to contrast it with the true hardware parallelism of multiprocessor systems (which have two or more CPUs sharing the same physical memory). Keeping track of multiple, parallel activities is hard for people to do. Therefore, operating system designers over the years have evolved a conceptual model (sequential processes) that makes parallelism easier to deal with. That model, its uses, and some of its consequences form the subject of this chapter. ###2.1.1. The Process Model

In this model, all the runnable software on the computer, sometimes including the operating system, is organized into a number of sequential processes , or just processes for short. A process is just an executing program, including the current values of the program counter, registers, and variables.

(emphasis mine)

While I have not yet gotten around to finish reading the book, according to this explanation a "process" is a unit of work that's executed on the processor and holds all necessary resources (image, state, registers, counters...).