1 Lecture 6 Introduction to Process Management COP 3353 Introduction to UNIX.

Slides:



Advertisements
Similar presentations
Categories of I/O Devices
Advertisements

3.1 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Process An operating system executes a variety of programs: Batch system.
Operating Systems Manage system resources –CPU scheduling –Process management –Memory management –Input/Output device management –Storage device management.
Slide 2-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 2 Using the Operating System 2.
Operating Systems COMP 4850/CISG 5550 Processes Introduction to Threads Dr. James Money.
Chap 2 System Structures.
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.
Chapter 6 Review System Software: Operating Systems and Utilities.
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.
Processes and Threads Chapter Processes 2.2 Threads 2.3 Interprocess communication 2.4 Classical IPC problems 2.5 Scheduling.
Thursday, June 08, 2006 The number of UNIX installations has grown to 10, with more expected. The UNIX Programmer's Manual, 2nd Edition, June, 1972.
INTRODUCTION OS/2 was initially designed to extend the capabilities of DOS by IBM and Microsoft Corporations. To create a single industry-standard operating.
1 CS 333 Introduction to Operating Systems Class 2 – OS-Related Hardware & Software The Process Concept Jonathan Walpole Computer Science Portland State.
Review: Operating System Manages all system resources ALU Memory I/O Files Objectives: Security Efficiency Convenience.
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.
Process in Unix, Linux and Windows CS-3013 C-term Processes in Unix, Linux, and Windows CS-3013 Operating Systems (Slides include materials from.
CS-502 Fall 2006Processes in Unix, Linux, & Windows 1 Processes in Unix, Linux, and Windows CS502 Operating Systems.
1 Introduction Chapter What is an operating system 1.2 History of operating systems 1.3 The operating system zoo 1.4 Computer hardware review 1.5.
Unix & Windows Processes 1 CS502 Spring 2006 Unix/Windows Processes.
Introduction Operating Systems’ Concepts and Structure Lecture 1 ~ Spring, 2008 ~ Spring, 2008TUCN. Operating Systems. Lecture 1.
Processes in Unix, Linux, and Windows CS-502 Fall Processes in Unix, Linux, and Windows CS502 Operating Systems (Slides include materials from Operating.
An Introduction to Operating Systems. Definition  An Operating System, or OS, is low-level software that enables a user and higher-level application.
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.
Week 6 Operating Systems.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 2: System Structures.
Linux in More Detail Shirley Moore CPS5401 August 29,
Process in Unix, Linux, and Windows CS-3013 A-term Processes in Unix, Linux, and Windows CS-3013 Operating Systems (Slides include materials from.
Operating Systems Yasir Kiani. 22-Sep Agenda for Today Review of previous lecture Process management commands: bg, fg, ^Z, jobs, ^C, kill Thread.
Process Management. Processes Process Concept Process Scheduling Operations on Processes Interprocess Communication Examples of IPC Systems Communication.
CSC 322 Operating Systems Concepts Lecture - 4: by Ahmed Mumtaz Mustehsan Special Thanks To: Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall,
Linux+ Guide to Linux Certification, Third Edition
Additional UNIX Commands. 222 Lecture Overview  Multiple commands and job control  More useful UNIX utilities.
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 6 System Calls OS System.
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,
Processes CSCI 4534 Chapter 4. Introduction Early computer systems allowed one program to be executed at a time –The program had complete control of the.
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,
Processes and Threads MICROSOFT.  Process  Process Model  Process Creation  Process Termination  Process States  Implementation of Processes  Thread.
Operating Systems Unit 2: – Process Context switch Interrupt Interprocess communication – Thread Thread models Operating Systems.
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.
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.
Agenda The Bourne Shell – Part I Redirection ( >, >>,
OPERATING SYSTEM BASICS. What is an operating system and what does it do? The operating system has two basic functions: –communicates with the PC.
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.
Threads, SMP, and Microkernels Chapter 4. Processes and Threads Operating systems use processes for two purposes - Resource allocation and resource ownership.
CSCI/CMPE 4334 Operating Systems Review: Exam 1 1.
Operating System Structure Lecture: - Operating System Concepts Lecturer: - Pooja Sharma Computer Science Department, Punjabi University, Patiala.
Processes and Threads Chapter 3 and 4 Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee Community College,
Chapter 3: Process Concept
Chapter 2 Processes and Threads Today 2.1 Processes 2.2 Threads
Process Management Presented By Aditya Gupta Assistant Professor
Chapter 3: Processes Source & Copyright: Operating System Concepts, Silberschatz, Galvin and Gagne.
Processes in Unix, Linux, and Windows
Lecture 2: Processes Part 1
Processes in Unix, Linux, and Windows
Operating Systems Lecture 12.
Operating Systems Processes (Ch 4.1).
Chapter 2 Processes and Threads 2.1 Processes 2.2 Threads
Chapter 3: Processes.
Processes in Unix, Linux, and Windows
Processes in Unix and Windows
Processes – Part I.
CS510 Operating System Foundations
Lab 6: Process Management
Lecture 6 Introduction to Process Management
Presentation transcript:

1 Lecture 6 Introduction to Process Management COP 3353 Introduction to UNIX

Multi-xxxx The UNIX Operating System provides an environment in which multiple “processes” can run concurrently –Multitasking or multiprogramming: the ability to run multiple programs on the same machine concurrently –Multiprocessing: the ability to use multiple processors on the same machine –Multiprocessing sometimes is also used to indicate that multiple concurrent processes can execute at the same time in a single processor environment UNIX supports both multiprogramming and multiprocessing (in both senses)‏ –This is implemented through the process abstraction –More recently supporting Light Weight Processes and Threads has also become the norm 2

The Process Abstraction In traditional systems a process executes a single sequence of instructions in an address space. –The program counter (PC) is a special hardware register that tracks the current instruction that is to be execute –In UNIX, many processes are active at the same time and the OS provides some aspects of a virtual machine Processes have their own registers and memory, but rely on the OS for I/O, device control and interacting with other processes –Processes: Run in a virtual address space Content for resources such as processor(s), memory, and peripheral devices All of the above is managed by the OS the memory management system; the I/O system; the process management and scheduling system, and the Interprocess Communication system (IPC)‏ 3

More about a Process Processes are created by the OS, typically by the fork command. –The process that calls fork is the parent and the new process is the child. –The child inherits a replica of the parent’s address space and is essentially a clone. Both continue to execute the identical program. Fork returns the child’s process id to the parent, and the value 0 to the child. –The exec system call loads another program and starts running this (typically in the child process). States of a Process –Initial, ready to run, running (in user mode or kernel mode), asleep, stopped, zombie (upon exit), orphaned (no parent). Finally, when all resources are freed by the parent, the process is terminated or no longer exists. 4

Basic job control commands ps: displays information about processes options:[-a] all processes for “everyone” [-l] longer version [u] current user report [-aux] more complete listing &: running a process (job) in the background example: pp3 & jobs: shows you all your background processes fg: puts a background job into the foreground CTRL-z: stops a process bg: puts a job into the background CTRL-c: kill the foreground job kill: kill a specific job (-9 typically kills most processes)‏ 5

More job control commands sleep: causes the current process to sleep for the time indicated. example: sleep 15; ls sleep 10; ls & stop: can be used to stop a specific job running in the background nice: run a job with a lower (nicer) priority level ranges are -20 (highest) to +20 (lowest). Default is 0. Default nice is usually 4. example: nice +10 pp3 6

Running more than one shell By using the csh command, you can start another shell running. You can change directories etc in this shell, and go back to your original shell by using the suspend command. Example csh (get a new shell, do some work, say change directory)‏ suspend (go back to your original shell)‏ (work in your original shell)‏ jobs (get the job number of the csh shell, say 1)‏ fg 1 (bring the csh shell into the foreground)‏ exit (terminate the csh shell and go back to original)‏ 7

Editing and Running Typical way of developing a program –Edit a program, say with vi, then save and exit –Run the program; determine errors –Edit the program by starting another vi session, –Etc. Alternate Paradigm –Edit a program, say with vi, the write the file (w) and use CTRL-z to stop the vi process –Run you program; determine errors –Bring back vi by using fg 1 –Etc. 8

X Windows Standard Toolkit and protocol to build GUI –Allows for drawing and moving of windows –Allow mouse interaction and keyboard Designed to be used over the network Based on a client server model –X Server communicates with various client programs –Accepts graphical output and sends back user input. Can be used over a secure network through Tunneling.

Starting X Windows Linux environments have native X support. –ssh -Y diablo.cs.fsu.edu: Enables trusted X11 forwarding. Microsoft Windows need a helper X program. –Xwin32: None free – has a trial version –Cygwin: Free open source Unix windows port. SSH Client Enable Tunneling (Windows)‏ Xterm – X Terminal is a think client that runs on X server