LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Processes (https://www.linuxquestions.org/questions/linux-newbie-8/processes-933562/)

Neema18 03-09-2012 03:24 AM

Processes
 
Is the operating system Linux also treated as a process?

srinivascoolguy 03-09-2012 03:55 AM

Operating system is a combination of multiple processes(like memorymanagement,scheduler ..........) but, we cannt treat itself as a process.

This is upto my knowledge...!:)

Satyaveer Arya 03-09-2012 03:57 AM

Do you know what an OS is and what a process is?

Neema18 03-09-2012 07:19 AM

If the OS is just a collection of programs and if it is executed by the processor
just like any other program, is the OS a process? If so, how is it controlled?

johnsfine 03-09-2012 08:02 AM

Other OS designs go to great lengths to treat most of the kernel as processes, though at some level an OS kernel must still be fundamentally different from a collection of processes.

Linux is not at either extreme of that design spectrum. The kernel design does not go to great lengths to treat itself the same way it treats processes, but it also does use some scheduling mechanisms that are mainly intended to ordinary processes to schedule some kernel activity.

Compared to Windows, Linux is more modular, especially in having less in the kernel and more in ordinary processes. So many things one would think of as being part of the OS (as opposed to utilities or applications) are ordinary processes in any Unix-like OS.

jv2112 03-11-2012 07:12 AM

Why are you asking ?

colucix 03-11-2012 10:03 AM

As already noticed, the Linux OS is modular and is made of many processes. Maybe you want to dig into the boot process sequence and understand when the kernel takes control of your machine. The first and main process is /sbin/init that by convention has process ID equal to 1:
Code:

$ ps -fC init
UID        PID  PPID  C STIME TTY          TIME CMD
root        1    0  0 Mar09 ?        00:00:02 init [5]

You can obtain a hierarchical list of processes by means of the pstree command.

Some good reading can enlighten about this topic:
http://docs.redhat.com/docs/en-US/Re...-shutdown.html
http://www.ibm.com/developerworks/li...y/l-linuxboot/
http://www.bootchart.org/
The last link shows a visual representation of the boot sequence and all the processes involved. Hope this helps.

johnsfine 03-11-2012 10:27 AM

Quote:

Originally Posted by colucix (Post 4624044)
As already noticed, the Linux OS is modular and is made of many processes. Maybe you want to dig into the boot process sequence and understand when the kernel takes control of your machine. The first and main process is /sbin/init

As I understand it, /sbin/init does a job that in a monolithic OS design you would expect to be part of the kernel. But in Linux it is outside the kernel.

Even though activities that logically could be in the kernel are processes outside the kernel in Linux, there still is a significant kernel.

As I understand it, some activities that are inside the kernel still act like processes to varying degrees. But some activities in the kernel are run in ways that are not similar to processes. The Linux OS is not made of only many processes.

colucix 03-11-2012 11:46 AM

Quote:

Originally Posted by johnsfine (Post 4624061)
As I understand it, /sbin/init does a job that in a monolithic OS design you would expect to be part of the kernel. But in Linux it is outside the kernel

Thank you for pointing this out. Actually the init process is the first running process in the user space, whereas the main of the kernel performs other and preliminary tasks (aimed mainly to hardware control, loading drivers, setting interrupts... if I'm not wrong).

Just out of curiosity, what do you mean by some activities in the kernel are run in ways that are not similar to processes? Any reference? Thank you.

theNbomr 03-11-2012 04:49 PM

Perhaps the OP is trying to distinguish between the kernel (which, strictly speaking, IS the OS), and userspace applications. In that case, the OS/kernel is not considered a process. It does not have most or all of the attributes that constitute a process.

--- rod.


All times are GMT -5. The time now is 07:57 PM.