Essential System Administration 3rd Edition Chapter 2 The Unix Way(Cont.) University Of Palestine.

Slides:



Advertisements
Similar presentations
Devices and Drivers (Chapter 7) Khattab Alhabashi UNIX System Administration.
Advertisements

Operating System Structures
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.
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.
Shells and Processes Bryce Boe 2012/08/08 CS32, Summer 2012 B.
UC Santa Barbara Project 1 Discussion Bryce Boe 2011/04/12.
CS 497C – Introduction to UNIX Lecture 26: - The Process Chin-Chih Chang
1 Processes and Pipes COS 217 Professor Jennifer Rexford.
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.
More Shell Basics CS465 - Unix. Unix shells User’s default shell - specified in /etc/passwd file To show which shell you are currently using: $ echo $SHELL.
Processes & Daemons Chapter IV / Part III. Commands Internal commands: alias, cd, echo, pwd, time External commands, code is in a file: grep, ls, more.
Operating Systems Concepts 1. A Computer Model An operating system has to deal with the fact that a computer is made up of a CPU, random access memory.
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.
Chapter 3 Operating Systems Concepts 1. A Computer Model An operating system has to deal with the fact that a computer is made up of a CPU, random access.
Chapter 3.1:Operating Systems Concepts 1. A Computer Model An operating system has to deal with the fact that a computer is made up of a CPU, random access.
CSC 322 Operating Systems Concepts Lecture - 4: by Ahmed Mumtaz Mustehsan Special Thanks To: Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall,
Section 3.1: Operating Systems Concepts 1. A Computer Model An operating system has to deal with the fact that a computer is made up of a CPU, random.
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
Chapter Two Exploring the UNIX File System and File Security.
Process Control. Module 11 Process Control ♦ Introduction ► A process is a running occurrence of a program, including all variables and other conditions.
Lecture 3 Process Concepts. What is a Process? A process is the dynamic execution context of an executing program. Several processes may run concurrently,
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.
RH030 Linux Computing Essentials
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.
Scis.regis.edu ● CS 468: Advanced UNIX Class 4 Dr. Jesús Borrego Regis University 1.
Distributed System Concepts and Architectures Services
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,
1 Lecture 6 Introduction to Process Management COP 3353 Introduction to UNIX.
UNIX Unit 1- Architecture of Unix - By Pratima.
Linux Commands C151 Multi-User Operating Systems.
CSC414 “Introduction to UNIX/ Linux” Lecture 2. Schedule 1. Introduction to Unix/ Linux 2. Kernel Structure and Device Drivers. 3. System and Storage.
CS 390 Unix Programming Environment
ACCESS CONTROL. Components of a Process  Address space  Set of data structures within the kernel - process’s address space map - current status - execution.
Silberschatz, Galvin and Gagne ©2011 Operating System Concepts Essentials – 8 th Edition Chapter 2: The Linux System Part 2.
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.
PROCESSES We will learn more about: ¨ Multi-user processing and multi −tasking ¨ Multi-user processing and multi −tasking ¨ Process types ¨ Process types.
1 Lecture 19: Unix signals and Terminal management n what is a signal n signal handling u kernel u user n signal generation n signal example usage n terminal.
Unix System Administration Controlling Processes Chapter 5.
Agenda The Bourne Shell – Part I Redirection ( >, >>,
Processes Todd Kelley CST8207 – Todd Kelley1.
...looking a bit closer under the hood
SYSTEM ADMINISTRATION PART I by İlker Korkmaz and Kaya Oğuz
Processes and threads.
...looking a bit closer under the hood
C151 Multi-User Operating Systems
Hands On UNIX AfNOG 2010 Kigali, Rwanda
Hands On UNIX AfNOG X Cairo, Egypt
KERNEL ARCHITECTURE.
Exploring the UNIX File System and File Security
Chapter 2: The Linux System Part 2
The Linux Command Line Chapter 10
...looking a bit closer under the hood
CHAPTER 8 ( , ) John Carelli, Instructor Kutztown University
Process Description and Control
Controlling Processes
Processes – Part I.
Lecture 6 Introduction to Process Management
Presentation transcript:

Essential System Administration 3rd Edition Chapter 2 The Unix Way(Cont.) University Of Palestine

In simple terms, a process is a single executable program that is running in its own address space. Commands on Unix systems, may be composed of many processes working together to perform a specific task. Simple commands like ls are executed as a single process. A compound command containing pipes will execute one process per pipe segment. Unix processes come in several types. We'll look at the most common here: Processes University Of Palestine Ch2

Interactive Processes Interactive processes are initiated from and controlled by a terminal session. Interactive processes may run either in the foreground or the background. Foreground processes remain attached to the terminal; For example, typing a Unix command and waiting for its output means running a foreground process. Background processes Unlike with a foreground process, the shell does not have to wait for a background process to end before it can run more processes. 2.2 Processes (Cont.) University Of Palestine Ch2

Interactive Processes (Cont.) Job control allows a process to be moved between the foreground and the background. For example, when a process is moved from the foreground to the background, the process is temporarily stopped, and terminal control returns to its parent process (usually a shell). The background job may be resumed and continue executing unattached to the terminal session that launched it. 2.2 Processes (Cont.) University Of Palestine Ch2

Interactive Processes (Cont.) The following table reviews the ways to control foreground and background processes provided by most current shells 2.2 Processes (Cont.) University Of Palestine Ch2

6

Process Attributes Unix processes have many associated attributes. Some of the most important are: 1.Process ID (PID) : A unique identifying number used to refer to the process. 2.Parent process ID (PPID) : The PID of the process's parent process (the process that created it). 3.Nice number The process's scheduling priority, which is a number indicating its importance relative to other processes. This needs to be distinguished from its actual execution priority, which is dynamically changed based on both the process's nice number and its recent CPU usage. University Of Palestine Ch2 2.2 Processes (Cont.)

Process Attributes (Cont.) 4.TTY : The terminal (or pseudo-terminal) device associated with the process. 5.Real and effective user ID (RUID, EUID) : process's real UID is the UID of the user who started it. Its effective UID is the UID that is used to determine the process's access to system resources (such as files and devices). 6.Real and effective group ID (RGID, EGID): University Of Palestine Ch2 2.2 Processes (Cont.)

The life cycle of a process The following figure illustrates the phases of the process life cycle: University Of Palestine Ch2 2.2 Processes (Cont.)

The relationship between commands and files The Unix operating system does not distinguish between commands and files in the ways that some systems do. Unix commands are executable files stored in one of several standard locations within the filesystem. Access to commands is exactly equivalent to access to these files. By default, there is no other privilege mechanism. University Of Palestine Ch2 2.2 Processes (Cont.)

11 One of the strengths of Unix is that users don't need to worry about the specific characteristics of devices and device I/O very often. Device files are characterized by their major and minor numbers, which allow the kernel to determine which device driver to use to access the device (via the major number), as well as its specific method of access (via the minor number). Major and minor numbers appear in place of the file size in long directory listings. 2.3 Devices University Of Palestine Ch2

12 For example, consider these device files related to the mouse from a Linux system: 2.3 Devices (Cont.) University Of Palestine Ch2 $ cd /dev; ls -l *mouse crw-rw-r-- 1 root root 10, 10 Jan 19 03:36 adbmouse crw-rw-r-- 1 root root 10, 4 Jan 19 03:35 amigamouse crw-rw-r-- 1 root root 10, 5 Jan 19 03:35 atarimouse crw-rw-r-- 1 root root 10, 8 Jan 19 03:35 smouse crw-rw-r-- 1 root root 10, 6 Jan 19 03:35 sunmouse crw-rw-r-- 1 root root 13, 32 Jan 19 03:36 usbmouse The major number for all but the last special file is 10; only the minor number differs for these devices. Thus, all of these mouse device variations are handled by the same device driver. The final item, corresponding to a USB mouse, has a different major number, indicating that a different device driver is used.

13 Device files are created with the mknod command. t takes the desired device name and major and minor numbers as its arguments. Many systems provide a script named MAKEDEV (located in /dev), which is an easy-to-use interface to mknod. 2.3 Devices (Cont.) University Of Palestine Ch2