Presentation is loading. Please wait.

Presentation is loading. Please wait.

PROCESSES We will learn more about: ¨ Multi-user processing and multi −tasking ¨ Multi-user processing and multi −tasking ¨ Process types ¨ Process types.

Similar presentations


Presentation on theme: "PROCESSES We will learn more about: ¨ Multi-user processing and multi −tasking ¨ Multi-user processing and multi −tasking ¨ Process types ¨ Process types."— Presentation transcript:

1 PROCESSES We will learn more about: ¨ Multi-user processing and multi −tasking ¨ Multi-user processing and multi −tasking ¨ Process types ¨ Process types ¨ Controlling processes with different signals ¨ Controlling processes with different signals ¨ Process attributes ¨ Process attributes ¨ The life cycle of a process ¨ The life cycle of a process

2 Multi− user and multi− tasking multiple users running multiple commands, at the same time and on the same system. multiple users running multiple commands, at the same time and on the same system. Not every command starts a single process. Not every command starts a single process. Some commands initiate a series of processes, such as mozilla; others, like ls, are executed as a single command. Some commands initiate a series of processes, such as mozilla; others, like ls, are executed as a single command.

3 Process types Interactive processes: Interactive processes: are initialized and controlled through a terminal session. are initialized and controlled through a terminal session. can run in the foreground, occupying the terminal that started the program can run in the foreground, occupying the terminal that started the program you can't start other applications as long as this process is running in the foreground. you can't start other applications as long as this process is running in the foreground.

4 Alternatively, they can run in the background, so that the terminal in which you started the program can accept new commands while the program is running. Alternatively, they can run in the background, so that the terminal in which you started the program can accept new commands while the program is running. While a process runs in the background, however, the user is not prevented from doing other things in the terminal in which he started the program, while it is running. While a process runs in the background, however, the user is not prevented from doing other things in the terminal in which he started the program, while it is running. only useful for programs that don't need user input (via the shell). only useful for programs that don't need user input (via the shell).

5

6 Automatic processes Automatic or batch processes are not connected to a terminal. Automatic or batch processes are not connected to a terminal. Rather, these are tasks that can be queued into a spooler area, where they wait to be executed on a FIFO (first−in, first−out) basis. Rather, these are tasks that can be queued into a spooler area, where they wait to be executed on a FIFO (first−in, first−out) basis.CRITERIA: At a certain date and time: (at command) At a certain date and time: (at command) At times when the total system load is low enough to accept extra jobs(batch command) At times when the total system load is low enough to accept extra jobs(batch command)

7 Daemons Daemons are server processes that run continuously. Daemons are server processes that run continuously. They are initialized at system startup They are initialized at system startup and then wait in the background until their service is required. and then wait in the background until their service is required. Example : networking daemon. Example : networking daemon.

8 Process attributes A process has a series of characteristics: A process has a series of characteristics: The process ID or PID The process ID or PID The parent process ID or PPID The parent process ID or PPID Nice number Nice number Terminal or TTY Terminal or TTY User name of the real and effective user (RUID and EUID) User name of the real and effective user (RUID and EUID) Real and effective group owner (RGID and EGID) Real and effective group owner (RGID and EGID)

9 Displaying process information The ps command is one of the tools for visualizing processes. The ps command is one of the tools for visualizing processes. to display different process attributes. to display different process attributes.

10

11 More info can be found the usual way: More info can be found the usual way: ps −−help or man ps. ps −−help or man ps. The relations between processes can be visualized using the pstree command: The relations between processes can be visualized using the pstree command: Life and death of a process: Process creation: forking. forking. exec call exec call bootstrapping procedure. bootstrapping procedure.

12 The process ID changes after the fork procedure:

13 PROCESS CREATION.. In an exceptional case, a process might finish while the parent does not wait for the completion of this process. Such an unburied process is called a zombie process. In an exceptional case, a process might finish while the parent does not wait for the completion of this process. Such an unburied process is called a zombie process. Ending processes Ending processes exit status exit status

14


Download ppt "PROCESSES We will learn more about: ¨ Multi-user processing and multi −tasking ¨ Multi-user processing and multi −tasking ¨ Process types ¨ Process types."

Similar presentations


Ads by Google