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

Slides:



Advertisements
Similar presentations
1 CS345 Operating Systems Φροντιστήριο Άσκησης 1.
Advertisements

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.
Second edition Your UNIX: The Ultimate Guide Das © 2006 The McGraw-Hill Companies, Inc. All rights reserved. UNIX – The Process The Process A process is.
CSCI 330 T HE UNIX S YSTEM Shell Job Control. T ODAY ’ S CLASS Unix is multi-user, multi-process OS Shell features to control jobs Unix utilities to manage.
Essential System Administration 3rd Edition Chapter 2 The Unix Way(Cont.) University Of Palestine.
Job Control Copyright © Software Carpentry 2010 This work is licensed under the Creative Commons Attribution License See
Introduction to Unix – CS 21 Lecture 10. Lecture Overview Midterm questions Jobs and processes description The foreground and background Controlling jobs.
Process Relationships Terminal and Network Logins Process Groups and Sessions Job Control Relationships.
Lesson 10-Controlling User Processes. Overview Managing and processing processes. Managing jobs. Exiting/quitting when jobs have been stopped.
1 Introduction to UNIX Ke Liu
Chapter 13 Processes. What is a process? A process is a program in execution A process is created whenever an external command is executed Whenever the.
Processes and Threads Chapter Processes 2.2 Threads 2.3 Interprocess communication 2.4 Classical IPC problems 2.5 Scheduling.
CS 497C – Introduction to UNIX Lecture 26: - The Process Chin-Chih Chang
Controlling Processes & Periodic Processes WeeSan Lee
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.
Processes & Daemons Chapter IV / Part III. Commands Internal commands: alias, cd, echo, pwd, time External commands, code is in a file: grep, ls, more.
5 UNIX Processes. Introduction  Processes  How to list them  How to terminate them  Process priorities  Scheduling jobs  Signals.
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.
Server Design Discuss Design issues for Servers Review Server Creation in Linux.
Second edition Your UNIX: The Ultimate Guide Das © 2006 The McGraw-Hill Companies, Inc. All rights reserved. UNIX – The Process System Process and init.
UNIX and Shell Programming (06CS36)
Managing Processes CSCI N321 – System and Network Administration Copyright © 2000, 2011 by Scott Orr and the Trustees of Indiana University.
Chapter 4 UNIX Common Shells Commands By C. Shing ITEC Dept Radford University.
The process concept (section 3.1, 3.3 and demos)  Process: An entity capable of requesting and using computer resources (memory, CPU cycles, files, etc).
Linux+ Guide to Linux Certification, Third Edition
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 6 System Calls OS System.
1 Week 2 The Crunchy Shell to the Soft and Chewy Kernel… Sarah Diesburg 8/3/2010 COP4610 / CGS5765.
Process Control. Module 11 Process Control ♦ Introduction ► A process is a running occurrence of a program, including all variables and other conditions.
SUSE Linux Enterprise Server Administration (Course 3037) Chapter 6 Manage Linux Processes and Services.
Managing processes and services. 1. How Linux handles processes 2. Managing running processes 3. Scheduling processes.
Linux+ Guide to Linux Certification, Second Edition Chapter 10 Managing Linux Processes.
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.
CE Operating Systems Lecture 10 Processes and process management in Linux.
CSC 360- Instructor: K. Wu Processes. CSC 360- Instructor: K. Wu Agenda 1.What is a process? 2.Process states 3. PCB 4.Context switching 5.Process scheduling.
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,
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,
Copyright ©: Nahrstedt, Angrave, Abdelzaher1 Processes and Threads.
Process Models, Creation and Termination Reference –text: Tanenbaum ch. 2.1.
Operating Systems Process Creation
1 Lecture 6 Introduction to Process Management COP 3353 Introduction to UNIX.
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.
PTA Linux Series Copyright Professional Training Academy, CSIS, University of Limerick, 2006 © Workshop VI Scheduling & Process Management Professional.
The Process CIS 370, Fall 2009 CIS UMassD. The notion of a process In UNIX a process is an instance of a program in execution A job or a task Each process.
CSC414 “Introduction to UNIX/ Linux” Lecture 3
Agenda Managing Processes (Jobs) Command Grouping Running jobs in background (bg) Bringing jobs to foreground (fg), Background job status (jobs) Suspending.
2.1 Processes  process = abstraction of a running program  multiprogramming = CPU switches from running program to running program  pseudoparallelism.
Unix System Administration Controlling Processes Chapter 5.
Processes Todd Kelley CST8207 – Todd Kelley1.
Process Manipulation. Process Manipulation in UNIX Basic process manipulation: creation, program loading, exiting, … fork(), exec(), wait(), exit() Process.
SYSTEM ADMINISTRATION PART I by İlker Korkmaz and Kaya Oğuz
...looking a bit closer under the hood
Chapter 11 – Processes and Services
Hands On UNIX AfNOG 2010 Kigali, Rwanda
Hands On UNIX AfNOG X Cairo, Egypt
Process Models, Creation and Termination
CHAPTER 8 ( , ) John Carelli, Instructor Kutztown University
CHAPTER 13 Processes.
CSC 140: Introduction to IT
Controlling Processes
Processes – Part I.
Lab 6: Process Management
Process Management and System Monitoring
Lecture 6 Introduction to Process Management
Presentation transcript:

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

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.

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.

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).

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)

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.

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)

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.

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.

The process ID changes after the fork procedure:

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