Presentation is loading. Please wait.

Presentation is loading. Please wait.

An Introduction to processes R Bigelow. A Unix Process A process in Unix is simple a program The Unix system is made up of a group of processes all interacting.

Similar presentations


Presentation on theme: "An Introduction to processes R Bigelow. A Unix Process A process in Unix is simple a program The Unix system is made up of a group of processes all interacting."— Presentation transcript:

1 An Introduction to processes R Bigelow

2 A Unix Process A process in Unix is simple a program The Unix system is made up of a group of processes all interacting with each other. Recall the Unix Philosophy ; Write a program that does one thing really well

3 The Linux Boot up Sequence After the computer completes it POST routine and start to boot. In a Linux system the first thing that runs is grub. Grub is a pre-boot operating system that allow one to run multiple operating systems on a single hard drive.

4 Boot Linux If it is decided to load Linux lilo will then start loading the Linux kernel. (generally the kernel is call /vmlinuz or /zImage or something similar) The kernel is simple a file that contains basic driver information about the system. The kernel then spawns the init process

5 init All Unix systems start will a single program init init can be thought of as the great grand parent to all other programs on the system. Every other process that runs does so under init

6 The parent child relationship In Unix every program that runs (with the exception of init) has a parent process that started it.

7 A sample Unix system

8 The parent-Child Relationship Child of init and parent of bash shells Child of inetd and parent of pico

9 Process ID Numbers Every process must have a unique identification number. This number used as a tracking number to keep track of CPU timeslot and memory maps. The administrator can use the PID number to track who ’ s running what and to terminate processes.

10 Viewing current processes The sequence of PID varies from Unix version to Unix version but all have one thing in common init is PID #1 To View a list of currently active processes one would use the ps command.

11 Background Vs Foreground Suppose you are running a script and you realize that you need to email something asap. In Unix you are able to suspend most processes to the background then work on another. As well you can also have a process outputting information in the background as you are working on another in the foreground

12 Suspending and retuning to a process To suspsend a process simply hit ctrl-z. This does not terminate the process like ctrl-c does it simple disconnects your standard input and standard output from the program To return to the process you would use the jobs command.

13 The jobs command This show you a list of all suspend processes that you currently have. IE ) jobs [1]- Stoppedping 127.0.0.1 [2]- Stopped./bobo

14 foreground vs. background The user may opt instead of just returning to the program to have the program run in the background. What this means is that the user is unable to affect the program (provide input), but will still see the results of the program on the screen.

15 Switching between the foreground and background fg moves that job number into the foreground bg moves that process into the background NOTE: It is possible to have multiple processes in the background, but one can only have one process in the foreground.

16 Stopping a process To stop a process one would use the kill command. kill - or killall program name

17 Kill levels -1 – Send the restart command to the process (causes the program to re-read startup files) -9 – Stop the process -15 – Terminate the process

18 Orphan processes By killing the parent process this should kill all children processes. If the child process doesn ’ t terminate along with the parent it is referred to as an orphan. Orphan process should not occur. This generally means that the process has hung. However you may still be able to kill the process.

19 Zombie Process This is a process that has been sent the kill signal, however for whatever reason it is still running, and may be taking up resources. Zombies may have been a orphaned process that for whatever reason is just not responding to the system. The only way to get rid of a zombie is to reboot.


Download ppt "An Introduction to processes R Bigelow. A Unix Process A process in Unix is simple a program The Unix system is made up of a group of processes all interacting."

Similar presentations


Ads by Google