PROCESSES. At least they re not ISO-9001 processes

Similar documents
Process States. Controlling processes. Process states. PID and PPID UID and EUID GID and EGID Niceness Control terminal. Runnable. Sleeping.

Most of the work is done in the context of the process rather than handled separately by the kernel

Processes. System tasks Campus-Booster ID : **XXXXX. Copyright SUPINFO. All rights reserved

CPSC 341 OS & Networks. Processes. Dr. Yingwu Zhu

Chapter 9: Process management. Chapter 9 Process management

Linux System Administration

Getting to know you. Anatomy of a Process. Processes. Of Programs and Processes

elinks, mail processes nice ps, pstree, top job control, jobs, fg, bg signals, kill, killall crontab, anacron, at

elinks, mail processes nice ps, pstree, top job control, jobs, fg, bg signals, kill, killall crontab, anacron, at

Reading Assignment 4. n Chapter 4 Threads, due 2/7. 1/31/13 CSE325 - Processes 1

ECE 650 Systems Programming & Engineering. Spring 2018

Operating Systems. Lecture 05

Processes. Dr. Yingwu Zhu

o Reality The CPU switches between each process rapidly (multiprogramming) Only one program is active at a given time

Process Management forks, bombs, zombies, and daemons! Lecture 5, Hands-On Unix System Administration DeCal

Processes. Sanzheng Qiao. December, Department of Computing and Software

EEE3052: Introduction to Operating Systems. Fall Project #1

Introduction to Operating Systems Prof. Chester Rebeiro Department of Computer Science and Engineering Indian Institute of Technology, Madras

COSC243 Part 2: Operating Systems

PROCESS CONTROL BLOCK TWO-STATE MODEL (CONT D)

Processes. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University

CSE 410: Computer Systems Spring Processes. John Zahorjan Allen Center 534

CSC209 Fall Karen Reid 1

Introduction. This project will focus primarily on processes.

PROCESS MANAGEMENT. Operating Systems 2015 Spring by Euiseong Seo

Programs. Program: Set of commands stored in a file Stored on disk Starting a program creates a process static Process: Program loaded in RAM dynamic

What is a Process? Processes and Process Management Details for running a program

Section 1: Tools. Contents CS162. January 19, Make More details about Make Git Commands to know... 3

Processes and Threads. Processes and Threads. Processes (2) Processes (1)

OS Structure, Processes & Process Management. Don Porter Portions courtesy Emmett Witchel

CS 471 Operating Systems. Yue Cheng. George Mason University Fall 2017

Processes. CS439: Principles of Computer Systems January 30, 2019

NAME top display top CPU processes. SYNOPSIS top [ ] [d delay] [p pid] [q] [c] [C] [S] [s] [i] [n iter] [b]

APPLIED INFORMATICS Processes. Bash characteristics. Command type. Aliases.

W4118 Operating Systems. Junfeng Yang

CSE410 Operating Systems Spring 2018 Project 1: Introduction to Unix/Linux Signals

Checking Resource Usage in Fedora (Linux)

Multiprogramming. Evolution of OS. Today. Comp 104: Operating Systems Concepts 28/01/2013. Processes Management Scheduling & Resource Allocation

Processes Prof. James L. Frankel Harvard University. Version of 6:16 PM 10-Feb-2017 Copyright 2017, 2015 James L. Frankel. All rights reserved.

KING FAHD UNIVERSITY OF PETROLEUM AND MINERALS Information and Computer Science Department ICS 431 Operating Systems Lab # 6

Simplest version of DayOfYear

Announcement. Exercise #2 will be out today. Due date is next Monday

Process Concepts. CSC400 - Operating Systems. 3. Process Concepts. J. Sumey

SMD149 - Operating Systems

Unix Processes. What is a Process?

PROCESSES. Jo, Heeseung

Processes. Jo, Heeseung

Process management. What s in a process? What is a process? The OS s process namespace. A process s address space (idealized)

CSE 451: Operating Systems Winter Module 4 Processes. Mark Zbikowski Allen Center 476

4. The Abstraction: The Process

ò mm_struct represents an address space in kernel ò task represents a thread in the kernel ò A task points to 0 or 1 mm_structs

Scheduling. Don Porter CSE 306

Lesson 3. The func procedure allows a user to choose the action upon receipt of a signal.

Introduction to Processes

Processes & Threads. Today. Next Time. ! Process concept! Process model! Implementing processes! Multiprocessing once again. ! More of the same J

Chapter 4 Controlling Processes

ECE 550D Fundamentals of Computer Systems and Engineering. Fall 2017

PROCESS CONTROL: PROCESS CREATION: UNIT-VI PROCESS CONTROL III-II R

Bamuengine.com. Chapter 7. The Process

System Programming. Signals I

Processes, Execution and State. Process Operations: fork. Variations on Process Creation. Windows Process Creation.

Introduction to OS Processes in Unix, Linux, and Windows MOS 2.1 Mahmoud El-Gayyar

Process Control. Philipp Koehn. 23 April 2018

Chapter 4 Multithreaded Programming

Processes. CS439: Principles of Computer Systems January 24, 2018

07 - Processes and Jobs

Lecture 5: Jobs and Processes

Processes. OS Structure. OS Structure. Modes of Execution. Typical Functions of an OS Kernel. Non-Kernel OS. COMP755 Advanced Operating Systems

Operating Systems Lab 1 (Users, Groups, and Security)

ENGR 3950U / CSCI 3020U Midterm Exam SOLUTIONS, Fall 2012 SOLUTIONS

! The Process Control Block (PCB) " is included in the context,

Roadmap. Tevfik Ko!ar. CSC Operating Systems Fall Lecture - III Processes. Louisiana State University. Processes. September 1 st, 2009

Design Overview of the FreeBSD Kernel CIS 657

Process! Process Creation / Termination! Process Transitions in" the Two-State Process Model! A Two-State Process Model!

Students accused of hacking computer, changing grades

Operating Systems Process description and control

Processes (Intro) Yannis Smaragdakis, U. Athens

Chapter 3: Process Concept

Chapter 3: Process Concept

3.1 Introduction. Computers perform operations concurrently

Killing Zombies, Working, Sleeping, and Spawning Children

Chapter 5: Processes & Process Concept. Objectives. Process Concept Process Scheduling Operations on Processes. Communication in Client-Server Systems

Q1. State True/false with jusification if the answer is false:

Chapter 3: Process Concept

UNIX Memory Management Interview Questions and Answers

Chapter 3: Processes. Operating System Concepts Essentials 2 nd Edition

CSC 539: Operating Systems Structure and Design. Spring 2006

Templates what and why? Beware copying classes! Templates. A simple example:

CS Operating Systems Lab 3: UNIX Processes

CS24: INTRODUCTION TO COMPUTING SYSTEMS. Spring 2018 Lecture 18

Processes. Operating System CS 217. Supports virtual machines. Provides services: User Process. User Process. OS Kernel. Hardware

Chapter 3: Processes. Operating System Concepts 9 th Edit9on

PROCESS MANAGEMENT Operating Systems Design Euiseong Seo

(MCQZ-CS604 Operating Systems)

Managing Processes Process: A running program

Ricardo Rocha. Department of Computer Science Faculty of Sciences University of Porto

CSci 4061 Introduction to Operating Systems. IPC: Basics, Pipes

Introduction to Linux

Processes. Process Concept

Shells and Processes. Bryce Boe 2012/08/08 CS32, Summer 2012 B

Transcription:

PROCESSES At least they re not ISO-9001 processes

STRUCTURE In Linux, a Process wraps up everything that is needed to know about a running piece of software The meta information not only includes the machine code for the software, but also things like what user/group pair is running the process, when it was started, what the command line was, etc. In fact, here s a short list of the pertinent parts of a process:

STRUCTURE PID PPID UID/GID Command Start Time CPU Time CWD State TTY Environment Priority Nice Level

PID Process ID Linux uses this number to uniquely identify every process on the computer Number from 1-32768 ( default - can change the maximum ) Assigns new PIDs incrementally by 1, 2 or 4 Loops back to 1 after hitting the maximum

PPID Parent Process ID PID of the process that started this one

UID/GID The User and Group running the process Very important! Defines access and permissions to file system and operating system. Inherited from Parent process unless: SetUID/SetGID bits on executable Completes the Circle of Security

COMMAND The command ( and arguments ) for the process Identifies the executable running, as well as the arguments passed at invocation

START & CPU TIME Start Time tracks when the process was started CPU Time tracks time the process actually spends running on the CPU

CWD Current Working Directory nuf said Inherited from parent process

STATE State of the process: Runnable Stopped Blocked - Interruptible Blocked - Non-interruptible Zombie

TTY Connected terminal Mostly informational Inherited from parent process

ENVIRONMENT Every process has it s own Environment Inherited from parent process

PRIORITY The priority is a read-only value showing the current priority assigned by the scheduler Ranges from 0-99, with higher values representing higher priorities The scheduler constantly adjusts priorities to balance efficiency, performance and responsiveness

NICE LEVEL The nice level represents one influence on the calculations the kernel uses when assigning priorities Originally designed and named to allow users to be nice to other users of the system by assigning a higher nice value to an intensive process, which in turn lowers it s priority Ranges from -20 to 19. Default nice level is 0 Only root can assign negative nice values See nice and renice commands

LISTING PROCESSES ps: List of current processes pstree: Generate hierarchical view of processes Examples: ps View all processes started by logged in user ps aux pstree View details of all processes on system View tree of all processes on system

PROCESS STATES There are 5 basic process states: Runnable Stopped Blocked/Sleeping - interrutible Blocked/Sleeping - non-interrutible Zombie/Defunct

RUNNABLE This means the process is running, or is set to run Remember: Linux is a multi-tasking operating system, so it s hard to see exactly when processes are running ( switched so quickly ), so the state is runnable, indicating that the scheduler will provide CPU time when it s available

STOPPED Opposite of Runnable - the process will not get CPU time Nothing happens to the process - it s still in memory, poised, ready to go. But when it s put in the stopped state, the scheduler will not put it on the CPU Files/network connections remain open, but network connections may drop after a time ( timeout )

INTERRUPTIBLE SLEEP The process is waiting for some event - perhaps an alarm from a sleep system call, perhaps a signal or other external event Interruptible means that other processes/events can break the sleep

NON-INTERRUPTIBLE SLEEP This sleep state is generally caused by IO operations - accessing a drive, communicating with the network, etc. Non-interruptible means that other processes/events can not break this sleep. This process is unable to respond to signals.

ZOMBIE/DEFUNCT Braaaaaaiiiiiiinnnnnssss.. Wait, no, not that kind of zombie. An exited process whose parent did not wait() on the child Does not consume resources beyond a PID and meta information storage ( < 1k generally ) Generally caused by two situations: Bug in software Overly taxed machine

SIGNALS First form of Interprocess Communication ( IPC ) A signal is a message sent to a process to indicate events or other conditions. The signal itself is the message - there around three dozen defined signals...

COMMON SIGNALS HUP - Hangup INT - Interrupt QUIT - Quit ILL - Illegal Instruction ABRT - Abort KILL - Kill SEGV - Segmentation Fault ALRM - Alarm TERM - Terminate STOP - Stop CONT - Continue FPE - Floating Point Exception

SENDING SIGNALS kill: Send a signal to a process. Default signal: TERM Examples: kill 457! kill -9 2359! kill -CONT 1350