Lecture 2 Process Concepts, Performance Measures and Evaluation Techniques.

Slides:



Advertisements
Similar presentations
Topic : Process Management Lecture By: Rupinder Kaur Lecturer IT, SRS Govt. Polytechnic College for Girls,Ludhiana.
Advertisements

CHAPTER 2 PROCESSOR SCHEDULING PART I By U ğ ur HALICI.
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 19 Scheduling IV.
Operating System Concepts with Java – 7 th Edition, Nov 15, 2006 Silberschatz, Galvin and Gagne ©2007 Processes and Their Scheduling.
6/25/2015Page 1 Process Scheduling B.Ramamurthy. 6/25/2015Page 2 Introduction An important aspect of multiprogramming is scheduling. The resources that.
5: CPU-Scheduling1 Jerry Breecher OPERATING SYSTEMS SCHEDULING.
Operating Systems (CSCI2413) Lecture 3 Processes phones off (please)
Chapter 6: CPU Scheduling
Lecture 3 CPU Scheduling. Lecture Highlights  Introduction to CPU scheduling  What is CPU scheduling  Related Concepts of Starvation, Context Switching.
Copyright © 2006 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill Technology Education Lecture 5 Operating Systems.
OPERATING SYSTEMS CPU SCHEDULING.  Introduction to CPU scheduling Introduction to CPU scheduling  Dispatcher Dispatcher  Terms used in CPU scheduling.
Chapter 6 Scheduling. Basic concepts Goal is maximum utilization –what does this mean? –cpu pegged at 100% ?? Most programs are I/O bound Thus some other.
Course Title: “Operating System” Chapter No: 04 “Process Scheduling” Course Instructor: ILTAF MEHDI IT Lecturer, MIHE, Kart-i Parwan, Kabul.
Computer Studies (AL) Operating System Process Management - Process.
Lecture 7: Scheduling preemptive/non-preemptive scheduler CPU bursts
Chapter 2 Processes and Threads Introduction 2.2 Processes A Process is the execution of a Program More specifically… – A process is a program.
OPERATING SYSTEMS CS 3530 Summer 2014 Systems with Multi-programming Chapter 4.
Chapter 5: Process Scheduling. 5.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Basic Concepts Maximum CPU utilization can be obtained.
1 11/29/2015 Chapter 6: CPU Scheduling l Basic Concepts l Scheduling Criteria l Scheduling Algorithms l Multiple-Processor Scheduling l Real-Time Scheduling.
Chapter 2 Process Management. 2 Objectives After finish this chapter, you will understand: the concept of a process. the process life cycle. process states.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 4: Processes Process Concept Process Scheduling Types of shedulars Process.
Process Control Management Prepared by: Dhason Operating Systems.
Chapter 4 CPU Scheduling. 2 Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling Algorithm Evaluation.
Basic Concepts Maximum CPU utilization obtained with multiprogramming
Lecturer 5: Process Scheduling Process Scheduling  Criteria & Objectives Types of Scheduling  Long term  Medium term  Short term CPU Scheduling Algorithms.
Advanced Operating Systems CS6025 Spring 2016 Processes and Threads (Chapter 2)
Multiprogramming. Readings r Chapter 2.1 of the textbook.
Process Management Process Concept Why only the global variables?
EEE Embedded Systems Design Process in Operating Systems 서강대학교 전자공학과
Copyright ©: Nahrstedt, Angrave, Abdelzaher
Operating Systems (CS 340 D)
Chapter 5a: CPU Scheduling
OPERATING SYSTEMS CS3502 Fall 2017
Intro to Processes CSSE 332 Operating Systems
Process Scheduling B.Ramamurthy 9/16/2018.
Chapter 6: CPU Scheduling
Chapter 6: CPU Scheduling
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.
Chapter 6: CPU Scheduling
Operating Systems CPU Scheduling.
Process management Information maintained by OS for process management
Process Scheduling B.Ramamurthy 11/18/2018.
CPU Scheduling G.Anuradha
Chapter 6: CPU Scheduling
Module 5: CPU Scheduling
Operating System Concepts
3: CPU Scheduling Basic Concepts Scheduling Criteria
Process Scheduling B.Ramamurthy 12/5/2018.
Chapter5: CPU Scheduling
TDC 311 Process Scheduling.
Operating systems Process scheduling.
Chapter 6: CPU Scheduling
CPU SCHEDULING.
Chapter 5: CPU Scheduling
Lecture 2 Part 3 CPU Scheduling
Process Scheduling B.Ramamurthy 2/23/2019.
Process Scheduling B.Ramamurthy 2/23/2019.
Process Scheduling B.Ramamurthy 2/23/2019.
Process Scheduling B.Ramamurthy 4/11/2019.
Process Scheduling B.Ramamurthy 4/7/2019.
Uniprocessor scheduling
Operating System , Fall 2000 EA101 W 9:00-10:00 F 9:00-11:00
Process Scheduling B.Ramamurthy 4/19/2019.
Process Scheduling B.Ramamurthy 4/24/2019.
Chapter 6: CPU Scheduling
Module 5: CPU Scheduling
Process Scheduling B.Ramamurthy 5/7/2019.
Chapter 6: Scheduling Algorithms Dr. Amjad Ali
Chapter 6: CPU Scheduling
Module 5: CPU Scheduling
Presentation transcript:

Lecture 2 Process Concepts, Performance Measures and Evaluation Techniques

Lecture Highlights  What is a process  Process Control Block  Process states and process life cycle  Performance Measures  Evaluation Techniques

What is a process A process is a pre-written set of ordered instructions which when executed causes the computer to behave in a manner determined by the code A process is a program/part of machine code in execution New process are spawned either by a user or by other processes.

Process and the operating system When a new process is created, the operating system typically does the following: Assigns the process a unique process id (PID) Allocates a chunk of memory from the available heap for the process Initializes a new PCB (Process Control Block) Adds the process to appropriate scheduling queues Other maintenance tasks

Process Control Block (PCB) A PCB is a data structure which stores certain information about each process. A typical PCB looks as follows: Process ID (PID) Time of Arrival (TOA) Execution Time Priority/ Process Type Size (Location in memory) Program Counter Registers/Threads Needed Resources

PCB components Process ID The system assigns each process a unique identifier which is used by other processes for scheduling, communication and any other purpose.

PCB components Time of Arrival The system keeps track of the time a process enters the process queue for scheduling purposes.

PCB components Execution Time This parameter is used by scheduling algorithms which order processes by the amount of time they need to complete execution. Mathematical formulae are used to calculate the estimated execution time of a process.

PCB components Priority Some processes, such as system processes, have a higher priority than others and the operating system uses this priority during scheduling and memory management.

PCB components Size It is the size of the process in bytes. This parameter indicates the memory location of a process also.

PCB components Program Counter The program counter value stores the address of the next instruction to be executed.

PCB components Registers/Threads This PCB parameter saves the state of different registers used by that particular process.

PCB components Needed Resources This PCB parameter indicates the quantities of system resources needed by that particular process.

Process States The state of a process is defined in part by its current activity. As it executes, it changes state. Each process may be in one of the following states: New: The process is being created Running: Instructions are being executed Waiting: The process is waiting for some event to occur Ready: The process is waiting to be assigned to a processor Terminated: The process has finished execution

Process Life Cycle waiting ready running new admitted interrupted I/O or event wait I/O or event completion scheduler dispatch exit terminated

Uploading/Downloading PCBs Process P 0 operating system Process P 1 Interrupt or system call Save state into PCB 0 Save state into PCB 1 Reload state from PCB 0 Reload state from PCB 1 Interrupt or system call idle executing CONTEXT SWITCH

Performance Measures It is important to quantify performance so that it can be measured. Commonly used performance measures: CPU Utilization Turnaround time Waiting time Throughput Response time Before we discuss the individual performance measures, we need to understand the related concepts of context switching and starvation.

Performance Measures Related Concept - Context Switch Switching the CPU to another process requires saving the state of the old process and loading the state of the new process. This task is known as a context switch. (it is labeled in the diagram uploading/downloading PCBs) Increased context switching affects performance adversely because the CPU spends more time switching between tasks than it does with the tasks itself.

Performance Measures Related Concept - Starvation This is the situation where a process waits endlessly for CPU attention. As a result of starvation, the starved process may never complete its designated task.

Performance Measures CPU Utilization It is the ratio of time that the CPU is doing actual processing to the total CPU time observed. This is a true measure of performance since it measures efficiency of the system. An idle CPU has 0% CPU utilization since it offers null performance per unit cost. The higher the CPU utilization, the better the efficiency of the system

Performance Measures Turnaround Time The time between a process’s arrival into the system and its completion. Two related parameters that can be studied include average turnaround time and maximum turnaround time. The turnaround time includes the context switching times and execution times. The turnaround time is inversely related to the system performance i.e. lower turnaround times imply better system performance.

Performance Measures Waiting Time Waiting time is the sum of the periods spent waiting in the ready queue. Mathematically, it is the difference between the turnaround time and execution time. It inversely affects system performance. It has two related forms: average waiting time and maximum waiting time. As a point of interest, the CPU scheduling algorithm does not affect the execution time of a process but surely determines the waiting time.

Performance Measures Throughput The average number of processes completed per unit time. Higher throughput is generally considered as indicative of increased performance. However, it should not be the sole performance criterion taken into account because throughput does not take into account loss of performance caused by starvation.

Performance Measures Response Time The time difference between submission of the process and the first I/O operation is termed response time. It affects performance inversely. However, it is not considered to be a reasonable measure and is rarely used.

Evaluation Techniques When developing an operating system or the modules thereof, evaluation of its performance is needed before it is installed for real usage. Evaluation provides useful clues to which algorithms would best serve the cases of application.

Evaluation Techniques Three Common Techniques All evaluation techniques can be classified into the following three types: Analytic method Implementation in real time systems Simulation Method

Evaluation Techniques Analytic Method In the analytic method, a mathematical formula is developed to represent a computing system. This method provides clear and intuitive evaluation of system performance, and is most useful to a specific algorithm. However, it is too simple to examine a complex and near-real system.

Evaluation Techniques Implementation in real-time systems Another way is to implement an operating system in a real machine. This method produces a complete and accurate evaluation. A disadvantage with it is its dramatic cost. Also evaluation is dependent on the environment of machine in which evaluation is carried out.

Evaluation Techniques Simulation Method Simulation is a method that uses programming technique to develop a model of a real system. Implementation of the model with prescribed jobs shows how the system works. Furthermore, the model contains a number of algorithms, variables, and parameters. Changing the above factors in simulation, one is able to know how the system performance would be affected and, therefore, to predict possible changes in performance of the real system. This method has a balanced complexity and cost. It was viewed as the most potentially powerful and flexible of the evaluation techniques

Simulation Method The evaluation technique used in this course The simulation method entails development of a model of a real system which contains a number of algorithms, variables and parameters. Changing these factors in simulation enables one to know its affect on system performance. This method, thus, is best suited for our purpose of studying the operating systems design.

Lecture Summary What is a process Process Control Block Process states and process life cycle Performance Measures Evaluation Techniques Justification of simulation method as the chosen technique for this course

Preview of next lecture The following topics shall be covered in the next lecture: Introduction to CPU scheduling What is CPU scheduling Related Concepts of Starvation, Context Switching and Preemption Scheduling Algorithms Parameters Involved Parameter-Performance Relationships Some Sample Results