Download presentation
Presentation is loading. Please wait.
Published byMaria Matthews Modified over 9 years ago
1
Unix System Administration Controlling Processes Chapter 5
2
Parts of a Process Definition: An address space and set of data structures inside the kernel Important process stuff Process’s address space map current status of the process execution priority resource use signal mask owner
3
PID, PPID Every process has a unique process ID (PID) Every process has a parent process ID (ppid)…even process 0 (it’s its own grandpa) PIDs are assigned in order. If the “top” is reached, it starts back at 0 using the next unused PID.
4
UID & EUID Are For Me Only UID is the ID of the person who created the process. This is the person charged for the resources used. EUID is the “effective” UID. This is used to determine what resources the process has access to. Normally the UID and EUID are the same, except when running SETUID programs.
5
GID & EGID Are For My Friends GID is the group ID the process is running under. EGID works like the EUID. It determines what resources the process has access to based on group permissions. SETGID programs change the EGID from the GID.
6
Let’s All Play Nice The “nice” value is the value that influences the process CPU priority It is possible to set the “nice” value of a process, but neither the user nor superuser can directly manipulate the internal priority used by the kernel.
7
This Is Your Life…Cycle Fork and Exec is used to create new processes from other processes See page 71 All processes, except those created by the kernel at boot time are descendants of the init process (PID 1) Child process that outlive their parents are adopted by PID 1
8
She’s Sending Me Mixed Signals Signals the ways to tell a process that something has occurred. It’s kind of like tapping it on the shoulder or poking it with a stick. There are more than 30 signals, but only a handful are usually used The “kill” command is used to send signals from the command line
9
Stop or I’ll “kill -HUP” You Signal mask can be used to filter signals from reaching a process, except SIGKILL or SIGSTOP Common signals are SIGKILL, SIGHUG, SIGSTOP, SIGINT and SIGTERM (default)
10
New Jersey Is Not A Process State Runnable - can be executed Sleeping - waiting for some resource Swapped - not in memory Zombie - trying to die Stopped - suspended On CPU - currently running ** ** - I added this one, it isn’t in the book
11
Process ala 1984 Tools for monitoring processes ps - process status listener top - a better ps proctool CDE process monitor KDE process monitor
12
/usr/bin/questions In the Bourne Shell (sh), how do you keep a process from getting killed when you logout? What can cause a zombie to hang around? What signal causes a process to go into the “stopped” process state?
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.