Dr. D. M. Akbar Hussain DE5 Department of Electronic Systems

Similar documents
Process Description and Control. Major Requirements of an Operating System

Major Requirements of an Operating System Process Description and Control

Process Description and Control. Chapter 3

Process Description and Control

Process Description and Control. Chapter 3

Major Requirements of an OS

Processes. Process Management Chapter 3. When does a process gets created? When does a process gets terminated?

Operating Systems. Lecture 3- Process Description and Control. Masood Niazi Torshiz

Operating System Control Structures

Process Description and Control

Process Description and Control

IT 540 Operating Systems ECE519 Advanced Operating Systems

Process Description and Control. Chapter 3

Process. Discussion session 3 1/30/2016

Chapter 3 Process Description and Control

Announcement. Exercise #2 will be out today. Due date is next Monday

Today s class. Finish review of C Process description and control. Informationsteknologi. Tuesday, September 18, 2007

Wednesday, September 14, Chapter 3: Processes

CSCE Introduction to Computer Systems Spring 2019

Processes. OS Structure. OS Structure. Modes of Execution. Typical Functions of an OS Kernel. Non-Kernel OS. COMP755 Advanced Operating Systems

B.H.GARDI COLLEGE OF MASTER OF COMPUTER APPLICATION. Ch-3 Process Description and Control

OPERATING SYSTEM. The Process. Introduction Process creation & termination Process state diagram Process scheduling & its criteria

Chapter 3 Process Description and Control

Introduction to Processes in Computer Systems SEEM

PROCESS CONTROL BLOCK TWO-STATE MODEL (CONT D)

Operating System. Chapter 3. Process. Lynn Choi School of Electrical Engineering

3.1 Introduction. Computers perform operations concurrently

Process Description and Control

Processes, PCB, Context Switch

Operating Systems. Computer Science & Information Technology (CS) Rank under AIR 100

Processes. CS3026 Operating Systems Lecture 05

Processes and Non-Preemptive Scheduling. Otto J. Anshus

Computer Systems II. First Two Major Computer System Evolution Steps

OS Main Goals. 10/24/2013 Operating Systems, Beykent University 1

Processes and Threads

Process Concepts. CSC400 - Operating Systems. 3. Process Concepts. J. Sumey

UNIT 3. PROCESS MANAGEMENT

Part V. Process Management. Sadeghi, Cubaleska RUB Course Operating System Security Memory Management and Protection

For use by students enrolled in #71251 CSE430 Fall 2012 at Arizona State University. Do not use if not enrolled.

Operating Systems: Internals and Design Principles. Chapter 4 Threads Seventh Edition By William Stallings

Operating Systems Overview. Chapter 2

Module 1. Introduction:

THE PROCESS ABSTRACTION. CS124 Operating Systems Winter , Lecture 7

آنستیتیوت تکنالوجی معلوماتی و مخابراتی ICTI

Lecture Topics. Announcements. Today: Threads (Stallings, chapter , 4.6) Next: Concurrency (Stallings, chapter , 5.

Operating Systems Process description and control

Processes. Sanzheng Qiao. December, Department of Computing and Software

Inter-Process Communication and Synchronization of Processes, Threads and Tasks: Lesson-1: PROCESS

Following are a few basic questions that cover the essentials of OS:

Threads Chapter 5 1 Chapter 5

CS 471 Operating Systems. Yue Cheng. George Mason University Fall 2017

Processes and Threads. Processes and Threads. Processes (2) Processes (1)

Multiprogramming. Evolution of OS. Today. Comp 104: Operating Systems Concepts 28/01/2013. Processes Management Scheduling & Resource Allocation

Introduction to Concurrency (Processes, Threads, Interrupts, etc.)

Course: Operating Systems Instructor: M Umair. M Umair

System Call. Preview. System Call. System Call. System Call 9/7/2018

Process Scheduling Queues

Chap 4, 5: Process. Dongkun Shin, SKKU

1 PROCESSES PROCESS CONCEPT The Process Process State Process Control Block 5

The control of I/O devices is a major concern for OS designers

SMD149 - Operating Systems

Operating System. Chapter 4. Threads. Lynn Choi School of Electrical Engineering

Introduction to OS Processes in Unix, Linux, and Windows MOS 2.1 Mahmoud El-Gayyar

CS510 Operating System Foundations. Jonathan Walpole

Operating Systems Comprehensive Exam. Spring Student ID # 3/16/2006

Operating System Support

CSC 4320 Test 1 Spring 2017

Processes. Dr. Yingwu Zhu

Process Manager Overview

Inf2C - Computer Systems Lecture 16 Exceptions and Processor Management

Roadmap. Tevfik Ko!ar. CSC Operating Systems Fall Lecture - III Processes. Louisiana State University. Processes. September 1 st, 2009

Process Characteristics. Threads Chapter 4. Process Characteristics. Multithreading vs. Single threading

Threads Chapter 4. Reading: 4.1,4.4, 4.5

Eastern Mediterranean University School of Computing and Technology Department of Information Technology. ITEC202 Operating Systems

2. The system of... generally ran one job at a time. These were called single stream batch processing.

Ricardo Rocha. Department of Computer Science Faculty of Sciences University of Porto

Today s Topics. u Thread implementation. l Non-preemptive versus preemptive threads. l Kernel vs. user threads

PROCESS DESCRIPTION AND CONTROL

* What are the different states for a task in an OS?

Threads, SMP, and Microkernels. Chapter 4

ECE519 Advanced Operating Systems

Process Time. Steven M. Bellovin January 25,

Lecture 4: Process Management

Threads. Thread Concept Multithreading Models User & Kernel Threads Pthreads Threads in Solaris, Linux, Windows. 2/13/11 CSE325 - Threads 1

Mid Term from Feb-2005 to Nov 2012 CS604- Operating System

UNIX Memory Management Interview Questions and Answers

Chapter 4: Threads. Operating System Concepts 9 th Edit9on


Lecture 5: Process Description and Control Multithreading Basics in Interprocess communication Introduction to multiprocessors

Processes. CS 416: Operating Systems Design, Spring 2011 Department of Computer Science Rutgers University

OPERATING SYSTEM : RBMCQ0402. Third RavishBegusarai.

Operating System. Operating System Overview. Structure of a Computer System. Structure of a Computer System. Structure of a Computer System

by I.-C. Lin, Dept. CS, NCTU. Textbook: Operating System Concepts 8ed CHAPTER 13: I/O SYSTEMS

Process Management Rab Nawaz Jadoon

Last time: introduction. Networks and Operating Systems ( ) Chapter 2: Processes. This time. General OS structure. The kernel is a program!

Objectives and Functions Convenience. William Stallings Computer Organization and Architecture 7 th Edition. Efficiency

Solved MCQs on Operating System Principles. Set-1

Operating Systems. Engr. Abdul-Rahman Mahmood MS, PMP, MCP, QMR(ISO9001:2000) alphapeeler.sf.net/pubkeys/pkey.htm

What is an Operating System? A Whirlwind Tour of Operating Systems. How did OS evolve? How did OS evolve?

Subject: Operating System (BTCOC403) Class: S.Y.B.Tech. (Computer Engineering)

Transcription:

Process /Task 1 Process Management Creation & termination of processes (user + System) Interleaving the execution of processes Scheduling of processes Synchronization mechanism between processes Communication Deadlock handling 2 1

Creation of Processes New Batch Job: Interactive Log on: To provide a Service: Branching & Spawning: Department of Electronic Systems DE5 3 Termination of Processes Normal Completion: Time Limit: Memory Not Available: Address Space Violation: Protection Error: Arithmetic Overflow: I/O Failure Invalid Instruction Privileged Instruction: Data Misuse: Operator/OS Intervention: ParentRequestTermination: Parent Termination: Department of Electronic Systems DE5 4 2

Basic Two State Model Enter Not Executing Executing Exit 5 Three State Model Enter Ready Dispatch Time Out Executing Exit Waiting/Blocked Quanta: Windows: 6 ticks 12 ticks LINUX 10 ticks 200 ticks Tick in Windows = 10 to 15 ms Tick in LINUX = 1 ms 6 3

Five State Model New Dispatch Ready Executing Time Out Event Wait Event Occur Blocked?? Exit 7 Suspended Processes New Ready Dispatch Time Out Executing Exit Suspended Suspended Blocked 8 4

Modified Suspended Model New Ready Suspend Activate Suspended Ready Dispatch Time Out Executing Exit Blocked Suspend Activate Suspended Blocked 9 UNIX PROCESS STATES 10 5

Process Description Solid Line: Process has Resource Dashed Line: Process needed that Resource P1 P2 Pn PROCESSOR I/O I/O I/O MAIN MEMORY WHICH PROCESS IS EXECUTING? 11 Operating System Control Structure Allocation of main memory to the processes. Allocation of secondary memory to the processes. Any protection attributes concerning segments of main or virtual memory, such as which process can access certain memory area of the process. Any information required for the management of virtual memory. 12 6

Operating System Control Structure MEMORY DEVICES FILES PROCESSES MEMORY TABLES I/O TABLES Process Image PROCESS 1 FILE TABLES Primary Process Table PROCESS 1 PROCESS 2 PROCESS 3 PROCESS N PROCESS N 13 Structure Two fundamental Requirements for the management of processes: Process Location Attributes Department of Electronic Systems DE5 14 7

Process Image Process Identification Processor State Process Identification Processor State Process Control Box Process Identification Processor State User Stack User Stack User Stack Private User Address Space (Program, Data) Private User Address Space (Program, Data) Private User Address Space (Program, Data) Shared Address Space Shared Address Space Shared Address Space Process 1 Process 2 Process n 15 Identification & Process Identification Identifiers: includes. The numeric identifiers that can be stored in the PCB Identifier of the process Identifier of the process that has created this process (parent) User identifier 16 8

Identification & Processor State t User Visible Registers: Control & Status Registers: 17 Pentium II EFLAGS Registers 18 9

Scheduling & State : Process State: The process could be in any of the states like ready, blocked etc. Priority: One or more bits may be used to indicate the priority of the scheduling. In some machines there could be information like default, current & highest allowable. Scheduling Related : This really depend on the technique/scheme used, for example how much time one process is given. Event: Identification of the event for which the process is waiting. 19 Data Structuring: A process may be linked with some other process through a structure like queue, linked list etc., or it may be a parent-child relationship, so PCB must have pointers to indicate such relationships. Inter Process Communication: Various flags, messages may be associated with communication between two independent processes, so some information may be required to be stored in the PCB. Process Privileges: Different processes may be granted some privileges in terms of memory they may access, types of instructions or may be in terms of other resources utilization. Memory Management: This part consists of pointers to pages or segments assigned in the virtual memory for a particular process. Resource Ownership & Utilization: A track/history of the resources utilized by a process may be kept in the PCB for scheduling purpose, resources like open/close etc., may also be indicated in the information. Department of Electronic Systems DE5 20 10

The Role of PCB Running Ready Blocked 21 Interrupt Trap Memory Fault Supervisor Call Process Switching & Mode Switching 22 11

Steps in Process Switching: Saving the context of the processor, including PC & other registers. Update PCB of the process which is in the running state, that is it may go into ready, blocked or suspended state, other fields like reason of leaving the current state & accounting information may also be updated. Moving the PCB of this process to an appropriate queue, ready, blocked or suspended. Select another process for execution. Now updating the PCB of this process that is from ready to running. Update memory management data structure (table). Restoring the context of the processor to those setting, at which the current process was last switched out of therunning state. t Department of Electronic Systems DE5 23 Execution of Operating System P1 P2 Pn KERNEL Non-Process Kernel 24 12

Execution of Operating System P1 O/S Functions P2 O/S Functions Process Switching Function Pn O/S Functions O/S within a User Process 25 Execution of Operating System U1 U2 Un OS 1 OS 2 OS n Process Switching Function Process Based O/S 26 13