Processes 2 Introduction to Operating Systems: Module 4.

Slides:



Advertisements
Similar presentations
Chapter 3 Process Description and Control
Advertisements

Day 08 Operating systems concepts and Processes. Functions of an OS.
Introduction to Processes
Process Description and Control
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.
Page 1 Processes and Threads Chapter Processes 2.2 Threads 2.3 Interprocess communication 2.4 Classical IPC problems 2.5 Scheduling.
Review: Operating System Manages all system resources ALU Memory I/O Files Objectives: Security Efficiency Convenience.
CS-502 Fall 2006Processes in Unix, Linux, & Windows 1 Processes in Unix, Linux, and Windows CS502 Operating Systems.
CSSE Operating Systems
Unix & Windows Processes 1 CS502 Spring 2006 Unix/Windows Processes.
1 Process Description and Control Chapter 3 = Why process? = What is a process? = How to represent processes? = How to control processes?
Operating Systems (CSCI2413) Lecture 3 Processes phones off (please)
Process Description and Control A process is sometimes called a task, it is a program in execution.
Process Description and Control
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.
Operating System 3 PROCESS DESCRIPTION AND CONTROL.
Chapter 3 Process Description and Control Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee Community College,
Chapter 3 Process Description and Control Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee Community College,
Introduction to Processes CS Intoduction to Operating Systems.
Chapter 41 Processes Chapter 4. 2 Processes  Multiprogramming operating systems are built around the concept of process (also called task).  A process.
Chapter 3 Process Description and Control
Chapter 4 Processes. Process: what is it? A program in execution A program in execution usually usually Can also have suspended or waiting processes Can.
Lecture 3 Process Concepts. What is a Process? A process is the dynamic execution context of an executing program. Several processes may run concurrently,
Scheduling Example 3 (1) Assume: FIFO Job Scheduling 100 K Main Memory Processor Sharing Process Scheduling (Cont…)
Multiprogramming. Readings r Silberschatz, Galvin, Gagne, “Operating System Concepts”, 8 th edition: Chapter 3.1, 3.2.
8-Sep Operating Systems Yasir Kiani. 8-Sep Agenda for Today Review of previous lecture Process scheduling concepts Process creation and termination.
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.
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.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 3: Process-Concept.
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.
Processes & Threads Introduction to Operating Systems: Module 5.
CS 390 Unix Programming Environment
Chapter 2 Process Management. 2 Objectives After finish this chapter, you will understand: the concept of a process. the process life cycle. process states.
Process Description and control G.Anuradha (Referred from william stallings and galvin 8 th edition)
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 4: Processes Process Concept Process Scheduling Types of shedulars Process.
Copyright © Curt Hill More on Operating Systems Continuation of Introduction.
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,
Multiprogramming. Readings r Chapter 2.1 of the textbook.
SLC/VER1.0/OS CONCEPTS/OCT'99
Lecture 3 Process.
Processes and threads.
Process concept.
Chapter 3: Process Concept
Lecture Topics: 11/1 Processes Process Management
Chapter 3: Processes.
Intro to Processes CSSE 332 Operating Systems
Process Virtualization. Process Process is a program that has initiated its execution. A program is a passive entity; whereas a process is an active entity.
Lecture 2: Processes Part 1
Operating Systems Lecture 6.
Process & its States Lecture 5.
Chapter 3: Processes.
Process Description and Control
Process Description and Control
Process Description and Control
Process Description and Control
Process Description and Control
Process Description and Control
Process Description and Control
Chapter 3: Processes.
Processes in Unix and Windows
Chapter 2 Processes and Threads 2.1 Processes 2.2 Threads
Process State Model -Compiled by Sheetal for CSIT
Chapter 3: Processes Process Concept Process Scheduling
Presentation transcript:

Processes 2 Introduction to Operating Systems: Module 4

Process states terminated ready waiting running terminate block dispatch pre-empt wakeup inactive create activate suspend

Process states u Inactive (New or Suspended)  Process has been initiated; the OS has not yet allocated it any memory resources  Process has been active, OS needs to reduce the degree of multiprogramming to improve system performance u Ready  Process has some code and data in memory, is eligible to get CPU u Running  The CPU is currently executing code for this process  In single processor system, only one process is running at a time

Process states u Waiting (Blocked)  Process is in a queue waiting for some device or system resource u Terminated  Program is done; process resources need to be recovered (accounting)

Operations on processes: creation u When a process is created, the operating system updates its data structures to include the new process u Allocation of memory resources does not occur until activation, though the process may be stored on disk u UNIX examples  fork system call creates new process  execve system call used after a fork to replace the process’ memory space with a new program

Operations on processes: creation u Reasons for process creation  User logs on  User starts a program  OS creates process to provide a service (e.G., Printer daemon to manage printer)  Program starts another process (e.G., Netscape calls xv to display a picture)

Operations on processes: termination u When a process is terminated, the operating system must free its resources and remove it from OS data structures u Reasons for process termination  Normal completion  Arithmetic error, or data misuse (e.G., Wrong type)  Invalid instruction execution  Insufficient memory available, or memory bounds violation  Resource protection error  I/O failure

Operations on processes u Preempt a process (running  ready)  Process’ time quantum expires  Higher priority process arrives at the ready queue u Block a process (running  waiting)  begin waiting for I/O, resource u Wakeup a process (waiting  ready)  when notified I/O complete or resource is available

Operations on processes u Dispatch a process (ready  running)  Called on process at head of CPU queue after preempt or block u Change the priority of a process  in UNIX, the nice command u Suspend a process (ready  inactive)  Used to reduce the system load during a peak loading situation  Process state is stored on disk u Activate a process (inactive  ready)  Brings a new inactive process into memory  Resumes the execution of a suspended process

Swapping u What if memory cannot hold all processes?  Don't allow the creation of more processes  What about existing processes?  Dynamically allocated memory u Some processes need to have their address space written to disk so that others can continue  Such processes are said to be swapped to disk  Modern OSs don't swap out entire processes, they can selective "swap" parts of the address space We'll learn more of this when we study memory management

Process control block (PCB) u Representation of a process u Used to save and restore process context u Exact contents are system dependent  May reside in linked lists u When is the PCB read from memory? Written to memory? process state next previous process id program counter registers memory structure open file table etc