Unix System Administration Controlling Processes Chapter 5.

Slides:



Advertisements
Similar presentations
June 1, 1999Foreground/Background Processing1 Introduction to UNIX H. Foreground/Background Processing.
Advertisements

Chapter 5 Controlling Processes Xiaoli Jiao 6/8/99.
Using tcpdump. tcpdump is a powerful tool that allows us to sniff network packets and make some statistical analysis out of those dumps. tcpdump operates.
Zombie and orphan processes. Zombie process (from wikipedia) When a process ends, all of the memory and resources associated with it are deallocated.
Essential System Administration 3rd Edition Chapter 2 The Unix Way(Cont.) University Of Palestine.
Introduction to Unix – CS 21 Lecture 10. Lecture Overview Midterm questions Jobs and processes description The foreground and background Controlling jobs.
IT344 – Operating Systems Winter 2011, Dale Rowe.
CS 497C – Introduction to UNIX Lecture 26: - The Process Chin-Chih Chang
UNIX Process Control Bach 7 Operating Systems Course Hebrew University Spring 2007.
Controlling Processes & Periodic Processes WeeSan Lee
CS 311 – Lecture 14 Outline Process management system calls Introduction System calls  fork()  getpid()  getppid()  wait()  exit() Orphan process.
Linux+ Guide to Linux Certification, Second Edition
Process Process: the UNIX abstraction of a stand-along computer that manages resources (memory, CPU, I/O resources) comprising a running program. Processes.
Advanced OS Chapter 3p2 Sections 3.4 / 3.5. Interrupts These enable software to respond to signals from hardware. The set of instructions to be executed.
1 Process Description and Control Chapter 3 = Why process? = What is a process? = How to represent processes? = How to control processes?
Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition Lect 16AP. 1Winter Quarter UNIX Process Management.
UNIX Processes. The UNIX Process A process is an instance of a program in execution. Created by another parent process as its child. One process can be.
UNIX System Administration Handbook Chapter 4. Controlling Processes 3 rd Edition Evi Nemeth et al. Li Song CMSC691X Summer 2002.
Process in Unix, Linux, and Windows CS-3013 A-term Processes in Unix, Linux, and Windows CS-3013 Operating Systems (Slides include materials from.
Unix System Administration Rootly Powers Chapter 3.
Operating Systems Yasir Kiani. 22-Sep Agenda for Today Review of previous lecture Process management commands: bg, fg, ^Z, jobs, ^C, kill Thread.
Introduction to Processes CS Intoduction to Operating Systems.
Managing Processes CSCI N321 – System and Network Administration Copyright © 2000, 2011 by Scott Orr and the Trustees of Indiana University.
Linux+ Guide to Linux Certification, Third Edition
SUSE Linux Enterprise Server Administration (Course 3037) Chapter 6 Manage Linux Processes and Services.
Va-scanCopyright 2002, Marchany Unit 7 – Solaris Process Control Randy Marchany VA Tech Computing Center.
Linux+ Guide to Linux Certification, Second Edition Chapter 10 Managing Linux Processes.
RH030 Linux Computing Essentials
Lecture – Performance Performance management on UNIX.
The kernel considers each program running on your system to be a process A process lives as it executes, with a lifetime that may be short or long A process.
Hands On UNIX II Dorcas Muthoni. Processes A running instance of a program is called a "process" Identified by a numeric process id (pid)‏  unique while.
Process Control Process identifiers Process creation fork and vfork wait and waitpid Race conditions exec functions system function.
Agenda  Working with Processes: Purpose Running Programs within same process (execl, execlp, execle, execv, execvp, execve) “Spawning” other process (fork,
Scis.regis.edu ● CS 468: Advanced UNIX Class 4 Dr. Jesús Borrego Regis University 1.
System calls for Process management
Scis.regis.edu ● CS 468: Advanced UNIX Class 5 Dr. Jesús Borrego Regis University 1.
1 Chapter 4 Processes R. C. Chang. 2 Linux Processes n Each process is represented by a task_struct data structure (task and process are terms that Linux.
Linux+ Guide to Linux Certification Chapter Eleven Managing Linux Processes.
Processes Dr. Yingwu Zhu. Process Concept Process – a program in execution – What is not a process? -- program on a disk - a process is an active object,
What is a Process? u A process is an executable “cradle” in which a program may run u This “cradle” provides an environment in which the program can run,
Course materials may not be reproduced in whole or in part without the prior written permission of IBM. 5.1 © Copyright IBM Corporation 2008 Unit 9 Working.
Zombie and orphan processes. Zombie process (from wikipedia) When a process ends, all of the memory and resources associated with it are deallocated so.
ACCESS CONTROL. Components of a Process  Address space  Set of data structures within the kernel - process’s address space map - current status - execution.
System calls for Process management Process creation, termination, waiting.
CSC414 “Introduction to UNIX/ Linux” Lecture 3
PROCESSES We will learn more about: ¨ Multi-user processing and multi −tasking ¨ Multi-user processing and multi −tasking ¨ Process types ¨ Process types.
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.
Process Manipulation. Process Manipulation in UNIX Basic process manipulation: creation, program loading, exiting, … fork(), exec(), wait(), exit() Process.
Linux Basics Part 1 OSU Picture © Greg Keene. Introductions Lance Albertson Greg Lund-Chaix source:
SYSTEM ADMINISTRATION PART I by İlker Korkmaz and Kaya Oğuz
Process Management Process Concept Why only the global variables?
Rootly Powers and Controlling Processes
Unix Process Management
Processes A process is a running program.
IT 344: Operating Systems Module 4 Processes
Structure of Processes
The Linux Command Line Chapter 10
Processes in Unix, Linux, and Windows
CHAPTER 8 ( , ) John Carelli, Instructor Kutztown University
CHAPTER 13 Processes.
Process Control B.Ramamurthy 2/22/2019 B.Ramamurthy.
Chapter 4 Controlling Processes
Controlling Processes
Chapter 4 Controlling Processes
Unix Process Control B.Ramamurthy 4/11/2019 B.Ramamurthy.
IT 344: Operating Systems Winter 2008 Module 4 Processes
Lab 6: Process Management
Process Description and Control in Unix
Process Description and Control in Unix
Presentation transcript:

Unix System Administration Controlling Processes Chapter 5

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

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.

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.

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.

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.

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

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

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)

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

Process ala 1984 Tools for monitoring processes ps - process status listener top - a better ps proctool CDE process monitor KDE process monitor

/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?