Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition Lect 16AP. 1Winter Quarter UNIX Process Management.

Slides:



Advertisements
Similar presentations
RH030 Linux Computing Essentials
Advertisements

Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition Lect 10P. 1Winter Quarter Repetition Structures.
June 1, 1999Foreground/Background Processing1 Introduction to UNIX H. Foreground/Background Processing.
Processes and Job Control. Foreground and Background (1)  Unix is a multi-tasking operating system –some of these tasks are being done by other users.
Introduction to Unix – CS 21 Lecture 10. Lecture Overview Midterm questions Jobs and processes description The foreground and background Controlling jobs.
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
Introducing the Command Line CMSC 121 Introduction to UNIX Much of the material in these slides was taken from Dan Hood’s CMSC 121 Lecture Notes.
Linux+ Guide to Linux Certification, Second Edition
Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition Lect 20AP. 1Winter Quarter File Transfer Lecture.
Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition P. 1Winter Quarter Daily Assignment A21 A21 asks.
Review: Operating System Manages all system resources ALU Memory I/O Files Objectives: Security Efficiency Convenience.
Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition Lect 13P. 1Winter Quarter Scope of Variables.
Software Design Project
Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition Lect 11P. 1Winter Quarter Arrays Lecture 11.
Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition Lect 17P. 1Winter Quarter Personal Libraries.
Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition Lect 3P. 1Winter Quarter Structured Engineering.
CS 497C – Introduction to UNIX Lecture 1: Getting Started Chin-Chih Chang
Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition Lect 9P. 1Winter Quarter Switch Case Structures.
Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition Lect 3P. 1Winter Quarter Structured Engineering.
Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition Lect 4P. 1Winter Quarter Introduction to UNIX.
Free Powerpoint Templates Working on remote computers by Pedro Henriques June 1, 2012.
5 UNIX Processes. Introduction  Processes  How to list them  How to terminate them  Process priorities  Scheduling jobs  Signals.
ITIS 2110 Class # No home network devices devices devices devices devices devices devices 9.
Engineering H192 - Computer Programming Gateway Engineering Education Coalition Lect 4P. 1Winter Quarter Introduction to UNIX Lecture 4.
How computers work Learning objective 2: Explain the four basic functions of a computer.
Today’s Topics Introducing process: the basic mechanism for concurrent programming –Process management related system calls Process creation Process termination.
Chapter 2: Getting Started Logon to Logout. In this chapter … Logging on The Shell Superuser Getting Help Logging off.
Managing Processes CSCI N321 – System and Network Administration Copyright © 2000, 2011 by Scott Orr and the Trustees of Indiana 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
Processes and Threads CS550 Operating Systems. Processes and Threads These exist only at execution time They have fast state changes -> in memory and.
Chapter Eight Exploring the UNIX Utilities. 2 Lesson A Using the UNIX Utilities.
1 Day 10 Process Control. 2 Running a program in the background Here’s a trick: You can actually log onto a UNIX server as many times as you want Try.
Process Control. Module 11 Process Control ♦ Introduction ► A process is a running occurrence of a program, including all variables and other conditions.
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.
Lecture – Performance Performance management on UNIX.
Guide To UNIX Using Linux Third Edition Chapter 8: Exploring the UNIX/Linux Utilities.
1 CSE 303 Lecture 3 bash shell continued: processes; multi-user systems; combining commands read Linux Pocket Guide pp , , , 118, 122,
Scis.regis.edu ● CS 468: Advanced UNIX Class 5 Dr. Jesús Borrego Regis University 1.
Linux+ Guide to Linux Certification Chapter Eleven Managing Linux Processes.
Lab 3 + Using the Terminal 1. "Under Linux there are GUIs (graphical user interfaces). where you can point and click and drag, and hopefully get work.
Engineering H192 - Computer Programming Gateway Engineering Education Coalition Lect 20AP. 1Winter Quarter File Transfer Lecture 20A.
Lesson 3-Touring Utilities and System Features. Overview Employing fundamental utilities. Linux terminal sessions. Managing input and output. Using special.
1 Day 2 Logging in, Passwords, Man, talk, write. 2 Logging in Unix is a multi user system –Many people can be using it at the same time. –Connections.
SCSC 455 Computer Security Chapter 3 User Security.
THE C PROGRAMMING ENVIRONMENT. Four parts of C environment  Main menu  Editor status line and edit window  Compiler message window  “Hot Keys” quick.
Linux Processes Last Update Copyright Kenneth M. Chipps Ph.D. 1.
The Kernel At a high level, the kernel in an operating system serves as the bridge between applications and the actual data processing of the hardware.
 Last lesson, the Windows Operating System was discussed along with the Windows command shell  Unix is a computer operating system, that similarly manages.
Chapter Eight Exploring the UNIX Utilities. 2 Lesson A Using the UNIX Utilities.
CSC414 “Introduction to UNIX/ Linux” Lecture 3
1 Figure 6-5: Turning Off Unnecessary Services Unnecessary Services  Operating system vendors used to install many services by default  This made them.
Unix System Administration Controlling Processes Chapter 5.
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 Relationships Chien-Chung Shen CIS/UD
Engineering H192 - Computer Programming Gateway Engineering Education Coalition Lect 10P. 1Winter Quarter Repetition Structures Lecture 10.
Keeping your System/Computer healthy and Operating
Chapter 11 Command-Line Master Class
CSE 374 Programming Concepts & Tools
Example questions… Can a shell kill itself? Can a shell within a shell kill the parent shell? What happens to background processes when you exit from.
Using the Terminal Lab 3+.
Keeping your System/Computer healthy and Operating
The Linux Command Line Chapter 10
CHAPTER 13 Processes.
Lab 6: Process Management
Processes Creation and Threads
Manage Your Tasks in Operating System
Presentation transcript:

Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition Lect 16AP. 1Winter Quarter UNIX Process Management and Control Lecture 16A

Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition Lect 16AP. 2Winter Quarter Processes in Modern-Day Operating System Multiple programs are loaded into memory and run to present the user with the operating system Other programs are run by the user to complete tasks (applications) Processes can be controlled manually by the user that owns them Processes can sometimes behave badly –Use more CPU/Memory than it should –In a shared system this takes away CPU/Memory from other users –A user can monitor and stop misbehaving processes

Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition Lect 16AP. 3Winter Quarter top – Table of Processes Allows anyone to see a list of processes running along with: –Process ID (PID) –Owner username –Memory Used –CPU Time –Current CPU Usage Command: “top” Initial Screen –All processes from all users

Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition Lect 16AP. 4Winter Quarter Viewing Only Your Processes top understands single-key commands –For a full list press “h” –To choose your user name press “u” Enter YOUR username and press Enter

Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition Lect 16AP. 5Winter Quarter Your Processes System Processes –KDE* (X Windows) –SSH (Secure Shell) Applications –MATLAB –bash (command prompt) –top (this program) –g??.out (your compiled programs)

Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition Lect 16AP. 6Winter Quarter Terminating a Process Occasionally a user loses access to a running process, but it is still running. –This wastes CPU and memory resources. –Users should terminate these “runaway” processes. Processes can be killed (terminated) directly within top and from a terminal window. Only kill processes you know should no longer be running. Randomly terminating system processes can make your environment unstable! You can only terminate your own processes.

Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition Lect 16AP. 7Winter Quarter Killing a Process from Within top MATLAB application window closed, but is still running on the system –Program has used nearly 12 minutes of CPU time –Kill a process by pressing “k”

Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition Lect 16AP. 8Winter Quarter Killing a Process from within top Enter the Process ID (PID) and press Enter

Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition Lect 16AP. 9Winter Quarter Killing a Process from within top Processes can be killed with multiple “signals” –Tells the process how to terminate –Most common: 15 – Terminate as if program closed normally 9 – Terminate immediately (forced quit) –For a list: “kill -l” at a terminal prompt (The letter l not the number 1, and not within top) In top: press Enter for 15 [default] or enter another signal number and press Enter

Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition Lect 16AP. 10Winter Quarter Killing a Process from within top The process should disappear from the list –If it does not disappear with signal 15, try signal 9 –If signal 9 doesn’t work (in rare cases), an administrator will have to terminate the process for you To exit top: press “q”

Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition Lect 16AP. 11Winter Quarter Killing a Process from the Command Line List processes: “ps –u ” Kill a process: “kill –s ” Kill all by name: “killall ”