Cs561 Presenter: QIAOQIAO CHEN Spring 2012

Slides:



Advertisements
Similar presentations
3.1 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Process An operating system executes a variety of programs: Batch system.
Advertisements

Operating Systems COMP 4850/CISG 5550 Processes Introduction to Threads Dr. James Money.
Chap 4 Multithreaded Programming. Thread A thread is a basic unit of CPU utilization It comprises a thread ID, a program counter, a register set and a.
The Process Model.
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.
1 Processes and Pipes COS 217 Professor Jennifer Rexford.
Processes CSCI 444/544 Operating Systems Fall 2008.
CS 311 – Lecture 14 Outline Process management system calls Introduction System calls  fork()  getpid()  getppid()  wait()  exit() Orphan process.
Unix Processes.
Operating Systems Processes (Ch 4.1). Processes “A program in execution” Modern computers allow several at once –“pseudoparallelism” A B C Program Counter.
1 CS 333 Introduction to Operating Systems Class 2 – OS-Related Hardware & Software The Process Concept Jonathan Walpole Computer Science Portland State.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 3: Processes.
1 OS Structure, Processes & Process Management. 2 What is a Process? A process is a program during execution.  Program = static file (image)  Process.
CE Operating Systems Lecture 5 Processes. Overview of lecture In this lecture we will be looking at What is a process? Structure of a process Process.
Process Management. Processes Process Concept Process Scheduling Operations on Processes Interprocess Communication Examples of IPC Systems Communication.
Introduction to Processes CS Intoduction to Operating Systems.
Implementing Processes and Process Management Brian Bershad.
Processes and Threads CS550 Operating Systems. Processes and Threads These exist only at execution time They have fast state changes -> in memory and.
Computer Architecture and Operating Systems CS 3230: Operating System Section Lecture OS-1 Process Concepts Department of Computer Science and Software.
Lecture 3 Process Concepts. What is a Process? A process is the dynamic execution context of an executing program. Several processes may run concurrently,
1 Chapter 2.1 : Processes Process concept Process concept Process scheduling Process scheduling Interprocess communication Interprocess communication Threads.
ITEC 502 컴퓨터 시스템 및 실습 Chapter 2-1: Process Mi-Jung Choi DPNM Lab. Dept. of CSE, POSTECH.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 3: Processes.
8-Sep Operating Systems Yasir Kiani. 8-Sep Agenda for Today Review of previous lecture Process scheduling concepts Process creation and termination.
Linux Processes Travis Willey Jeff Mihalik. What is a process? A process is a program in execution A process includes: –program counter –stack –data section.
Concurrency & Context Switching Process Control Block What's in it and why? How is it used? Who sees it? 5 State Process Model State Labels. Causes of.
Operating Systems Process Creation
Chapter 4: Threads. 4.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th edition, Jan 23, 2005 Chapter 4: Threads Overview Multithreading.
1  process  process creation/termination  context  process control block (PCB)  context switch  5-state process model  process scheduling short/medium/long.
Processes, Threads, and Process States. Programs and Processes  Program: an executable file (before/after compilation)  Process: an instance of a program.
Chapter 3: Processes. 3.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 3: Processes Process Concept Process Scheduling Operations.
2.1 Processes  process = abstraction of a running program  multiprogramming = CPU switches from running program to running program  pseudoparallelism.
Process Description and Control. Process A program in execution OS Reponsibilities: –Creation/Termination –Scheduling processes –Suspension/resumption.
Lecture 5 Page 1 CS 111 Online Process Creation Processes get created (and destroyed) all the time in a typical computer Some by explicit user command.
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 8 Processes II Read Ch.
1 Module 3: Processes Reading: Chapter Next Module: –Inter-process Communication –Process Scheduling –Reading: Chapter 4.5, 6.1 – 6.3.
Threads prepared and instructed by Shmuel Wimer Eng. Faculty, Bar-Ilan University 1July 2016Processes.
Process Manipulation. Process Manipulation in UNIX Basic process manipulation: creation, program loading, exiting, … fork(), exec(), wait(), exit() Process.
Process Management Process Concept Why only the global variables?
Processes Chapter 3 These slides include text, figures, and information from Operating Systems Concepts, by Silberschatz, Galvin, and Gagne. They also.
Chapter 4: Multithreaded Programming
Process Management Presented By Aditya Gupta Assistant Professor
Process Creation Processes get created (and destroyed) all the time in a typical computer Some by explicit user command Some by invocation from other running.
Chapter 3: Processes.
Processes A process is a running program.
Review An OS in action Processes and Programs
Processes in Unix, Linux, and Windows
KERNEL ARCHITECTURE.
Chapter 3: Processes.
Processes in Unix, Linux, and Windows
CGS 3763 Operating Systems Concepts Spring 2013
Lecture 2: Processes Part 1
More examples How many processes does this piece of code create?
Processes in Unix, Linux, and Windows
2.1 Processes process = abstraction of a running program
Operating Systems Lecture 6.
Process & its States Lecture 5.
Mid Term review CSC345.
Operating System Concepts
Chapter 2 Processes and Threads 2.1 Processes 2.2 Threads
Process Control B.Ramamurthy 2/22/2019 B.Ramamurthy.
Jonathan Walpole Computer Science Portland State University
Lecture 6: Multiprogramming and Context Switching
Chapter 3: Processes.
Unix Process Control B.Ramamurthy 4/11/2019 B.Ramamurthy.
Processes in Unix, Linux, and Windows
CS510 Operating System Foundations
Processes Creation and Threads
Process Description and Control in Unix
Process Description and Control in Unix
Presentation transcript:

Cs561 Presenter: QIAOQIAO CHEN Spring 2012 Process Cs561 Presenter: QIAOQIAO CHEN Spring 2012 Process 11/22/2018

Lecture Outline Definition of a Process Anatomy of a Process Process States Context Switch Process Manipulation Thread Process 11/22/2018

What is a Process? A Process is an execution stream A Process is the basic unit of execution Process examples: shell, web browser It needs resources to run (minimum): Memory CPU registers Process 11/22/2018

Anatomy of a Process Processes are separated from each other Process 11/22/2018

Organization of Processes Two concepts Uniprogramming – only one process is handled at a time Multiprogramming – multiple processes running at a time Resource Sharing? Process 11/22/2018

Process states New (also called created) – process awaits admission to “ready” state. Ready (also called waiting) – waiting for execution on CPU. Running – when it is chosen for execution. Blocked – by some events, such as I/O. Terminated – after execution or explicitly being killed. Process 11/22/2018

Context Switch How does OS implement process abstraction? Key Idea: switch from one process to another Process 11/22/2018

Process Manipulation In Unix OS, there functions for process creation, deletion, signaling and controlling. fork(), exec(), wait(), exit(), kill(), sleep(), ptrace(), etc. Process 11/22/2018

Process Manipulation continue Process creation using fork(). Creates a child process that inherits identical copy of all parent’s memory and variables copy identical CUP registers of parent process Fork() return 0 to child, non-zero to parent After fork(), two processes are running at parallel. Why people say fork() is expensive? Process 11/22/2018

Fork() continue Example of Unix fork(): Process 11/22/2018

Process manipulation continue Terminate a process after its job done, using exit() Take the results as an argument Close up things Deallocate memory and OS data structures that support this process Checks if parent process is alive: yes – hold the results until parent asks for them (zombie child) no – Deallocate data structure, now the process is dead. Clean up all zombie child processes. Process 11/22/2018

Thread A thread is also a stream of execution. Difference between threads and processes: Thread ≈ function, process ≈ program One thread is bound to one process Multiple threads can access the same memory Context switch in threads? Much cheaper! Process 11/22/2018

References Martin C, Rinard, “Process and Threads”, available at http://williamstallings.com/Extras/OS-Notes/h2.html “OS structure, Processes & Processes Management”, available at http://www.cs.utexas.edu/users/lorenzo/corsi/cs372/03F/notes/9- 9.pdf Process 11/22/2018