Managing Linux Processes: Understanding Types, Viewing, and Killing Processes, Slides of Advanced Operating Systems

An in-depth exploration of managing linux processes, including differentiating between user and daemon processes, viewing process information using standard utilities, and illustrating the impact of kill signals. Additionally, learn how to create and manipulate background processes, modify process priority, and schedule commands for future execution using the at and cron daemons.

Typology: Slides

2012/2013

Uploaded on 04/24/2013

banani
banani 🇮🇳

4.3

(3)

91 documents

1 / 42

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Chapter 10
Managing Linux Processes
Docsity.com
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a

Partial preview of the text

Download Managing Linux Processes: Understanding Types, Viewing, and Killing Processes and more Slides Advanced Operating Systems in PDF only on Docsity!

Chapter 10

Managing Linux Processes

Objectives

  • Categorize the different types of processes on a Linux system
  • View processes using standard Linux utilities
  • Illustrate the difference between common kill signals
  • Describe how binary programs and shell scripts are executed

Linux Processes

  • Program: Structured set of commands stored in an executable file - Executed to create a process
  • Process: Program running in memory and on CPU
  • User process: Process begun by user on a terminal
  • Daemon process: System process
    • Not associated with a terminal

Linux Processes (continued)

  • Process ID (PID): Unique identifier assigned to a process
  • Child process: Process started by another process (parent process)
  • Parent process: Process that has started other processes (child processes)
  • Parent Process ID (PPID): Parent process’s PID

Linux Processes (continued)

Figure 10-2: Process genealogy

Viewing Processes

  • ps command: View processes
    • Most common process viewing utility
    • No arguments: Lists all processes running in current shell - PID, terminal, command that started process, CPU time
    • – f (full) option: More complete information
      • User identifier (UID), PPID, start time, CPU utilization

Viewing Processes (continued)

  • Process priority (PRI): Determines how many processor time slices process will receive - Higher value means lower priority
  • Nice value (NI): Indirectly represents priority
    • Higher value means lower priority

Viewing Processes (continued)

Table 10-1: Common options to the ps command

Killing Processes

  • kill signal: Sent to a process by kill command
    • 64 types of kill signals
      • Affect processes in different ways
  • kill command: Kills all instances of a process by command name - To kill a process, give kill signal and PID - If no kill signal given, SIGTERM assumed

Killing Processes (continued)

Table 10-2: Common administrative kill signals

Killing Processes (continued)

  • killall command: Kills all instances of a process by command name - Uses process name instead of PID
  • Can use top command to kill processes

Process Execution

  • Three main types of executable commands
    • Binary programs
    • Shell scripts
    • Shell functions

Process Execution (continued)

Figure 10-3: Process forking

Running Processes in the Background

  • Foreground processes: BASH shell must wait for termination
  • Background processes: BASH shell does not wait for termination - & metacharacter - Upon execution, user receives BASH shell prompt immediately