Docsity

Program Versus Process - Unix Systems - Lecture Slides, Slides of Advanced Operating Systems

Partial preview of the text

Download Program Versus Process - Unix Systems - Lecture Slides and more Slides Advanced Operating Systems in PDF only on Docsity!

Chapter 10: Managing Linux

Processes

2

Introduction

  • Program versus process
  • Daemon versus user processes
  • Viewing processes
    • The ps command
    • The top command (view, kill, priority, etc.)
  • PID and PPID
  • Process status (sleeping, running, Zombie,

etc.)

  • Process priority and nice value

4

Killing Processes

• 64 types of kill signals can be used

with the kill command

• To kill a tree of processes, you need to

kill the parent process

• Some processes can ignore some kill

signals except SIGKILL (9)

• To kill several processes with the

same name use the killall command

5

Common Kill Signals

7

Process priority

  • PRI dictates number of time slices a process gets which can not be changed directly
  • Use nice and renice command to change the priority indirectly
  • Ex: $nice – n -20 ps – l
  • EX: $renice +10 PID

8

Scheduling Processes

  • Using two daemons
    • at for scheduling processes to run once
    • cron for scheduling processes to be run repetitively
  • Two files are used to allow/deny users access to either one.
  • These files are stored in /etc and named x.allow or x.deny (if both exit only allow is processed)
  • at options include – l, -c, -d, & -f
  • The crontab command can use options: -e to edit, -r to remove and – l to list cron table entries

10

Scheduling Processed (cont)