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.

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

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.
Chapter 3 Process Description and Control
 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.
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.
Process Description and Control Module 1.0. Major Requirements of an Operating System Interleave the execution of several processes to maximize processor.
Process Description and Control Chapter 3. Major Requirements of an Operating System Interleave the execution of several processes to maximize processor.
Processes CSCI 444/544 Operating Systems Fall 2008.
Figure 2.8 Compiler phases Compiling. Figure 2.9 Object module Linking.
Page 1 Processes and Threads Chapter 2. Page 2 Processes The Process Model Multiprogramming of four programs Conceptual model of 4 independent, sequential.
Page 1 Processes and Threads Chapter Processes 2.2 Threads 2.3 Interprocess communication 2.4 Classical IPC problems 2.5 Scheduling.
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
CS-502 Fall 2006Processes in Unix, Linux, & Windows 1 Processes in Unix, Linux, and Windows CS502 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.
Process Concept An operating system executes a variety of programs
1 Process Description and Control Chapter 3 = Why process? = What is a process? = How to represent processes? = How to control processes?
Process Description and Control A process is sometimes called a task, it is a program in execution.
Using Two Queues. Using Multiple Queues Suspended Processes Processor is faster than I/O so all processes could be waiting for I/O Processor is faster.
Processes in Unix, Linux, and Windows CS-502 Fall Processes in Unix, Linux, and Windows CS502 Operating Systems (Slides include materials from Operating.
BINA RAMAMURTHY UNIVERSITY AT BUFFALO System Structure and Process Model 5/30/2013 Amrita-UB-MSES
CSE 451: Operating Systems Autumn 2013 Module 6 Review of Processes, Kernel Threads, User-Level Threads Ed Lazowska 570 Allen.
Process Description and Control Chapter 3. Major Requirements of an OS Interleave the execution of several processes to maximize processor utilization.
Introduction to Processes CS Intoduction to Operating Systems.
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.
Chapter 3 Process Description and Control
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.
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.
Silberschatz, Galvin and Gagne  Operating System Concepts Process Concept An operating system executes a variety of programs:  Batch system.
Processes CS 6560: Operating Systems Design. 2 Von Neuman Model Both text (program) and data reside in memory Execution cycle Fetch instruction Decode.
Operating Systems 1 K. Salah Module 1.2: Fundamental Concepts Interrupts System Calls.
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.
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.
Chapter 3: Processes. 3.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 3: Processes Process Concept Process Scheduling Operations.
Operating Systems Unit 2: – Process Context switch Interrupt Interprocess communication – Thread Thread models Operating Systems.
1 Module 3: Processes Reading: Chapter Next Module: –Inter-process Communication –Process Scheduling –Reading: Chapter 4.5, 6.1 – 6.3.
Processes and Threads Chapter 3 and 4 Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee Community College,
Processes and threads.
Operating Systems CMPSC 473
Process Management Process Concept Why only the global variables?
Protection of System Resources
Chapter 3 – Process Concepts
Chapter 3: Processes.
System Structure and Process Model
System Structure and Process Model
Structure of Processes
System Structure B. Ramamurthy.
System Structure and Process Model
Process & its States Lecture 5.
Process Description and Control
Process Description and Control
Processes Hank Levy 1.
Process Control B.Ramamurthy 2/22/2019 B.Ramamurthy.
Unix Process Control B.Ramamurthy 4/11/2019 B.Ramamurthy.
Processes in Unix and Windows
Chapter 2 Processes and Threads 2.1 Processes 2.2 Threads
CS510 Operating System Foundations
Process Description and Control in Unix
Processes Hank Levy 1.
Process Description and Control in Unix
Presentation transcript:

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 in response to each type of interrupt -> interrupt handler. trap -> program interrupt, usually an interrupt caused by some exceptional situation in a user program – OS performs some action  returns control to program

Interrupts Cont’d Synchronous interrupts occur when a process attempts to perform an illegal action, dividing by zero. They may also be caused by some event that is unrelated to a process’s current instruction. Hardware devices issue asynchronous interrupts to communicate a status change to the processor.

Interrupts Cont’d They provide a low overhead means of gaining the attention of a processor. Alternative is polling  increases overhead.

Interrupt Processing Read page 125 – typical interrupt process Interrupt controller may be present to prioritize the interrupts interrupt becomes active - > processor pauses execution - > it must first save information so present process may be returned to - > PSW or PCB - > processor passes control to appropriate interrupt handler - > assigned a unique value - > interrupt handler performs actions - > completes - > state of interrupted process is restored - > executes

Linux Case Study describe structure of Unix processes using a Linux box Each process must store its code, data and stack in memory during execution. Unix implements virtual memory – all unix processes are provided with a set of memory addresses – virtual address space.

Virtual address space contains process information text region data region stack region

Kernel - Linux it maintains a process’s PCB in a protected region of memory – out of reach of user processes In Unix, a PCB stores information including the contents of processor registers, PID – program counter and system stack. All these are listed in a process table

Unix cont’d Unix process’s interact with the OS via system calls. fork - > Spawns a child process – allocates to that process a copy of its parents resources exec - > loads a process’s instructions and data into its address space from a file wait - > causes the calling process to block until its child process has terminated signal - > allows a process to specify a signal handler for a particular signal type exit - > terminates the calling process nice - > modifies a process’s scheduling priority

Child Process Unix A process can spawn a child process with fork ( ) – creates a copy of the parent child process rec’s the copy and any other resources. text segment – contains th parent’s read- only instructions, is shared with its child.

More process system calls process can call exec ( ) to load a new program from a file parent can issue a wait( ) – blocks the parent until specified child process is complete exit () – tells kernel process has finished