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.

Slides:



Advertisements
Similar presentations
More on Processes Chapter 3. Process image _the physical representation of a process in the OS _an address space consisting of code, data and stack segments.
Advertisements

Operating Systems COMP 4850/CISG 5550 Processes Introduction to Threads Dr. James Money.
Processes and Threads Chapter Processes 2.2 Threads 2.3 Interprocess communication 2.4 Classical IPC problems 2.5 Scheduling.
CSC 501 Lecture 2: Processes. Von Neumann Model Both program and data reside in memory Execution stages in CPU: Fetch instruction Decode instruction Execute.
The Process Model.
Page 1 Processes and Threads Chapter Processes 2.2 Threads 2.3 Interprocess communication 2.4 Classical IPC problems 2.5 Scheduling.
1 CS 333 Introduction to Operating Systems Class 2 – OS-Related Hardware & Software The Process Concept Jonathan Walpole Computer Science Portland State.
1/27/2010CSCI 315 Operating Systems Design1 Processes Notice: The slides for this lecture have been largely based on those accompanying an earlier version.
1 What is a Process ? The activity of program execution. Also called a task or job Has associated with it: Code Data Resources A State An executing set.
Review: Operating System Manages all system resources ALU Memory I/O Files Objectives: Security Efficiency Convenience.
CSCE 351: Operating System Kernels
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.
CS-502 Fall 2006Processes in Unix, Linux, & Windows 1 Processes in Unix, Linux, and Windows CS502 Operating Systems.
CSSE Operating Systems
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 3: Processes.
Unix & Windows Processes 1 CS502 Spring 2006 Unix/Windows Processes.
Processes April 5, 2000 Instructor: Gary Kimura Slides courtesy of Hank Levy.
Process Concept An operating system executes a variety of programs
Process Description and Control A process is sometimes called a task, it is a program in execution.
Process Description and Control Chapter 3. Major Requirements of an OS Interleave the execution of several processes to maximize processor utilization.
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.
Processes and Threads.
Process Management. Processes Process Concept Process Scheduling Operations on Processes Interprocess Communication Examples of IPC Systems Communication.
CSC 501 Lecture 2: Processes. Process Process is a running program a program in execution an “instantiation” of a program Program is a bunch of instructions.
Exec Function calls Used to begin a processes execution. Accomplished by overwriting process imaged of caller with that of called. Several flavors, use.
Recall: Three I/O Methods Synchronous: Wait for I/O operation to complete. Asynchronous: Post I/O request and switch to other work. DMA (Direct Memory.
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,
ITEC 502 컴퓨터 시스템 및 실습 Chapter 2-1: Process Mi-Jung Choi DPNM Lab. Dept. of CSE, POSTECH.
Mid Term review CSC345.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 3: Processes.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 3: Processes Process Concept Process Scheduling Operations on Processes Cooperating.
Computer Studies (AL) Operating System Process Management - Process.
Processes – Part I Processes – Part I. 3.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Review on OSs Upon brief introduction of OSs,
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 3: Processes.
Silberschatz, Galvin and Gagne  Operating System Concepts Process Concept An operating system executes a variety of programs:  Batch system.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 4: Processes Process Concept Process Scheduling Operations on Processes Cooperating.
1 Computer Systems II Introduction to Processes. 2 First Two Major Computer System Evolution Steps Led to the idea of multiprogramming (multiple concurrent.
Process Description and Control Chapter 3. Source Modified slides from Missouri U. of Science and Tech.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 3: Processes.
Chapter 3: Processes. 3.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts - 7 th Edition, Feb 7, 2006 Chapter 3: Processes Process Concept.
Chapter 3: Processes. 3.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 3: Processes Process Concept Process Scheduling Operations.
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.
Operating System Components) These components reflect the services made available by the O.S. Process Management Memory Management I/O Device Management.
Topic 3 (Textbook - Chapter 3) Processes
Sujata Ray Dey Maheshtala College Computer Science Department
Protection of System Resources
Chapter 2 Processes and Threads Today 2.1 Processes 2.2 Threads
Process Management Presented By Aditya Gupta Assistant Professor
Chapter 3: Process Concept
Chapter 3: Processes.
Chapter 3: Processes.
Recap OS manages and arbitrates resources
More examples How many processes does this piece of code create?
Process & its States Lecture 5.
Mid Term review CSC345.
Chapter 3: Processes.
Operating System Concepts
Processes Hank Levy 1.
Chapter 2 Processes and Threads 2.1 Processes 2.2 Threads
Sujata Ray Dey Maheshtala College Computer Science Department
Lecture 6: Multiprogramming and Context Switching
Chapter 3: Processes.
Processes in Unix and Windows
Chapter 2 Processes and Threads 2.1 Processes 2.2 Threads
CS510 Operating System Foundations
Processes Hank Levy 1.
Chapter 3: Processes Process Concept Process Scheduling
Presentation transcript:

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

§Completion of I/O triggers an interrupt §Hardware Trap: l Division by zero l Invalid memory access §Request for OS service l Trap/System call/Monitor call

Protection §Dual Mode Operation l User mode l Kernel mode §Mode bit (0/1) (MS-DOS did not have it) §System call (switches from user mode to kernel mode) §Privileged instructions should be executed in kernel mode only

Protection §Changing mode bit?

I/O Protection §User cannot issue I/O instructions directly §Changes to interrupt vector?

Memory Protection

§Changes to base and limit registers?

CPU Protection §E.g. Infinite loop executed by a process

CPU Protection §Timer handler?

Process :Program in execution Associated state (PC, SP, registers etc) Address space

Processes The Process Model §Multiprogramming of four programs §Conceptual model of 4 independent, sequential processes §Only one program active at any instant Logical program counter Execution order not reproducible

Process creation System initialization User request to create a new process

Process Termination Conditions which terminate processes 1.Normal exit (voluntary) 2.Error exit (voluntary) 3.Fatal error (involuntary) 4.Killed by another process (involuntary)

Process Hierarchies §Parent creates a child process, child processes can create its own process §Forms a hierarchy l UNIX calls this a "process group" §Windows has no concept of process hierarchy l all processes are created equal

§As a process executes, it changes state l new: The process is being created l running: Instructions are being executed l waiting: The process is waiting for some event to occur l ready: The process is waiting to be assigned to a processor l terminated: The process has finished execution

Process States ps in Unix Background processes

Process Control Block (PCB)

CPU Switch From Process to Process

Process Scheduling Queues §Job queue – set of all processes in the system §Ready queue – set of all processes residing in main memory, ready and waiting to execute §Device queues – set of processes waiting for an I/O device §Processes migrate among the various queues

Ready Queue And Various I/O Device Queues

Representation of Process Scheduling

§I/O parallelism: l overlap execution: make 1 CPU into many l (Real parallelism: > 1 CPU (multiprocessing)) §Completion time: l B’s completion time = 100s (A + B) So overlap Why processes? Speed emacs (Wait for input) gcc A B A B 20 s80 s Completion time for B? A? 10 s

Context Switch §When CPU switches to another process, the system must save the state of the old process and load the saved state for the new process §Context-switch time is overhead; the system does no useful work while switching §Time dependent on hardware support

Passing of Parameters As A Table

Process Creation (Cont.) §Address space l Child duplicate of parent l Child has a program loaded into it §UNIX examples l fork system call creates new process l exec system call used after a fork to replace the process’ memory space with a new program