Figure 2.8 Compiler phases. 2.8.1 Compiling. Figure 2.9 Object module. 2.8.2 Linking.

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

 2004 Deitel & Associates, Inc. All rights reserved. 1 Chapter 3 – Process Concepts Outline 3.1 Introduction 3.1.1Definition of Process 3.2Process States:
CSC 501 Lecture 2: Processes. Von Neumann Model Both program and data reside in memory Execution stages in CPU: Fetch instruction Decode instruction Execute.
Chapter 5 Processes and Threads Copyright © 2008.
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.
Page 1 Processes and Threads Chapter Processes 2.2 Threads 2.3 Interprocess communication 2.4 Classical IPC problems 2.5 Scheduling.
Introduction to Operating Systems – Windows process and thread management In this lecture we will cover Threads and processes in Windows Thread priority.
3.5 Interprocess Communication Many operating systems provide mechanisms for interprocess communication (IPC) –Processes must communicate with one another.
1 Process Description and Control Chapter 3. 2 Process Management—Fundamental task of an OS The OS is responsible for: Allocation of resources to processes.
CSCE 351: Operating System Kernels
3.5 Interprocess Communication
Processes 1 CS502 Spring 2006 Processes Week 2 – CS 502.
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.
Processes and Resources
CSSE Operating Systems
1 Process Description and Control Chapter 3 = Why process? = What is a process? = How to represent processes? = How to control processes?
Mehmet Can Vuran, Instructor University of Nebraska-Lincoln Acknowledgement: Overheads adapted from those provided by the authors of the textbook.
Process Description and Control A process is sometimes called a task, it is a program in execution.
CSE 451: Operating Systems Autumn 2013 Module 6 Review of Processes, Kernel Threads, User-Level Threads Ed Lazowska 570 Allen.
Process Description and Control. Process concepts n Definitions – replaces task, job – program in execution – entity that can be assigned to and executed.
Process Description and Control Chapter 3. Major Requirements of an OS Interleave the execution of several processes to maximize processor utilization.
Chapter 3 Process Description and Control Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee Community College,
Process Management. Processes Process Concept Process Scheduling Operations on Processes Interprocess Communication Examples of IPC Systems Communication.
Chapter 3 Process Description and Control Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee Community College,
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.
Operating Systems Lecture 2 Processes and Threads Adapted from Operating Systems Lecture Notes, Copyright 1997 Martin C. Rinard. Zhiqing Liu School of.
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.
The Functions of Operating Systems Interrupts. Learning Objectives Explain how interrupts are used to obtain processor time. Explain how processing of.
Lecture 3 Process Concepts. What is a Process? A process is the dynamic execution context of an executing program. Several processes may run concurrently,
Hardware process When the computer is powered up, it begins to execute fetch-execute cycle for the program that is stored in memory at the boot strap entry.
Mid Term review CSC345.
Multiprogramming. Readings r Silberschatz, Galvin, Gagne, “Operating System Concepts”, 8 th edition: Chapter 3.1, 3.2.
Threads G.Anuradha (Reference : William Stallings)
Computer Studies (AL) Operating System Process Management - Process.
Processes and Process Control 1. Processes and Process Control 2. Definitions of a Process 3. Systems state vs. Process State 4. A 2 State Process Model.
Chapter 2 Processes and Threads Introduction 2.2 Processes A Process is the execution of a Program More specifically… – A process is a program.
We will focus on operating system concepts What does it do? How is it implemented? Apply to Windows, Linux, Unix, Solaris, Mac OS X. Will discuss differences.
1 Computer Systems II Introduction to Processes. 2 First Two Major Computer System Evolution Steps Led to the idea of multiprogramming (multiple concurrent.
Processes, Threads, and Process States. Programs and Processes  Program: an executable file (before/after compilation)  Process: an instance of a program.
Process Description and Control Chapter 3. Source Modified slides from Missouri U. of Science and Tech.
Hardware process When the computer is powered up, it begins to execute fetch-execute cycle for the program that is stored in memory at the boot strap entry.
Chapter 2 Process Management. 2 Objectives After finish this chapter, you will understand: the concept of a process. the process life cycle. process states.
1 Process Description and Control Chapter 3. 2 Process A program in execution An instance of a program running on a computer The entity that can be assigned.
What is a Process ? A program in execution.
Operating Systems Unit 2: – Process Context switch Interrupt Interprocess communication – Thread Thread models Operating Systems.
Processes 2 Introduction to Operating Systems: Module 4.
Interrupts and Exception Handling. Execution We are quite aware of the Fetch, Execute process of the control unit of the CPU –Fetch and instruction as.
CSCI/CMPE 4334 Operating Systems Review: Exam 1 1.
Advanced Operating Systems CS6025 Spring 2016 Processes and Threads (Chapter 2)
1 Module 3: Processes Reading: Chapter Next Module: –Inter-process Communication –Process Scheduling –Reading: Chapter 4.5, 6.1 – 6.3.
Multiprogramming. Readings r Chapter 2.1 of the textbook.
WORKING OF SCHEDULER IN OS
Introduction to Operating Systems Concepts
Chapter 4 – Thread Concepts
Processes and threads.
Process concept.
Operating Systems CMPSC 473
Protection of System Resources
Chapter 4 – Thread Concepts
Chapter 3 – Process Concepts
Intro to Processes CSSE 332 Operating Systems
Structure of Processes
Mid Term review CSC345.
Process Description and Control
Processes Hank Levy 1.
Unix Process Control B.Ramamurthy 4/11/2019 B.Ramamurthy.
Processes Hank Levy 1.
Implementing Processes, Threads, and Resources
Chapter 1: Introduction CSS503 Systems Programming
Presentation transcript:

Figure 2.8 Compiler phases Compiling

Figure 2.9 Object module Linking

Figure 2.10 Linking process Linking

Figure 2.11 Symbol resolution Linking

Figure 2.12 Loading Loading

Figure 2.13 Compiling, linking and loading Loading

Chapter 3 – Process Concepts Outline 3.1 Introduction 3.1.1Definition of Process 3.2Process States: Life Cycle of a Process 3.3Process Management 3.3.1Process States and State Transitions 3.3.2Process Control Blocks (PCBs)/Process Descriptors 3.3.3Process Operations 3.3.4Suspend and Resume 3.3.5Context Switching 3.4 Interrupts 3.4.1Interrupt Processing 3.4.2Interrupt Classes 3.5 Interprocess Communication 3.5.1Signals 3.5.2Message Passing 3.6Case Study: UNIX Processes

Objectives After reading this chapter, you should understand: –the concept of a process. –the process life cycle. –process states and state transitions. –process control blocks (PCBs)/process descriptors. –how processors transition between processes via context switching. –how interrupts enable hardware to communicate with software. –how processes converse with one another via interprocess communication (IPC). –UNIX processes.

3.1.1 Definition of Process A program in execution –A process has its own address space consisting of: Text region –Stores the code that the processor executes Data region –Stores variables and dynamically allocated memory Stack region –Stores instructions and local variables for active procedure calls

3.3.1 Process States and State Transitions Process states –The act of assigning a processor to the first process on the ready list is called dispatching –The OS may use an interval timer to allow a process to run for a specific time interval or quantum –Cooperative multitasking lets each process run to completion State Transitions –At this point, there are four possible state transitions When a process is dispatched, it transitions from ready to running When the quantum expires, it transitions from running to ready When a process blocks, it transitions from running to blocked When the event occurs, it transitions from blocked to ready

Figure 3.1 Process state transitions Process States and State Transitions

Figure 3.2 Process table and process control blocks Process Control Blocks (PCBs)/Process Descriptors

Figure 3.4 Process hierarchy in Linux Process Operations

3.3.5 Context Switching Context switches –Performed by the OS to stop executing a running process and begin executing a previously ready process –Save the execution context of the running process to its PCB –Load the ready process’s execution context from its PCB –Must be transparent to processes –Require the processor to not perform any “useful” computation OS must therefore minimize context-switching time –Performed in hardware by some architectures

Figure 3.6 Context switch Context Switching

3.4 Interrupts Interrupts enable software to respond to signals from hardware –May be initiated by a running process Interrupt is called a trap Synchronous with the operation of the process For example, dividing by zero or referencing protected memory –May be initiated by some event that may or may not be related to the running process Asynchronous with the operation of the process For example, a key is pressed on a keyboard or a mouse is moved –Low overhead Polling is an alternative approach –Processor repeatedly requests the status of each device –Increases in overhead as the complexity of the system increases

3.4.1 Interrupt Processing Handling interrupts –After receiving an interrupt, the processor completes execution of the current instruction, then pauses the current process –The processor will then execute one of the kernel’s interrupt-handling functions –The interrupt handler determines how the system should respond –Interrupt handlers are stored in an array of pointers called the interrupt vector –After the interrupt handler completes, the interrupted process is restored and executed or the next process is executed

Figure 3.7 Handling interrupts Interrupt Processing

1. What does a process’s address space look like? 2. T/F There could be a process not assigned to the processor and not waiting for I/O. 5. What state will be assigned to a process when it is timed out? 3. From where does an OS load the execution context for the process to be dispatched? 4. If no interrupts are allowed in a system, what will the system do to handle I/O? Group Discussion 1 1/27/09, due in class 6. T/F Division by zero is an example of asynchronous interrupt generated by processor. 7. What is an interrupt handler? What is an interrupt vector?

8. Who can suspend a process? Who can block a process? Group Discussion 1 1/27/09, due in class Figure 3.5 Process state transitions with suspend and resume.