KSU/CCIS CSC227 Tutorial # 4 CPU Scheduling SUMMER

Similar documents
Objectives. Chapter 5: CPU Scheduling. CPU Scheduler. Non-preemptive and preemptive. Dispatcher. Alternating Sequence of CPU And I/O Bursts

W4118 Operating Systems. Instructor: Junfeng Yang

Objectives. Chapter 5: Process Scheduling. Chapter 5: Process Scheduling. 5.1 Basic Concepts. To introduce CPU scheduling

Announcements. Basic Concepts. Histogram of Typical CPU- Burst Times. Dispatcher. CPU Scheduler. Burst Cycle. Reading

CPU Scheduling. CPU Scheduling

/ Operating Systems I. Process Scheduling. Warren R. Carithers Rob Duncan

Scheduling. Scheduling. Scheduling levels. Decision to switch the running process can take place under the following circumstances:

ICS Principles of Operating Systems

CPU Scheduling. Basic Concepts. Basic Concepts (2) Basic Concepts Scheduling Criteria Scheduling Algorithms Batch systems Interactive systems

Scheduling 0 : Levels. High level scheduling: Medium level scheduling: Low level scheduling

Comp 204: Computer Systems and Their Implementation. Lecture 12: Scheduling Algorithms cont d

Operating Systems. III. Scheduling.

Chapter 5 Process Scheduling

CPU Scheduling Outline

PROCESS SCHEDULING ALGORITHMS: A REVIEW

Operating System: Scheduling

Deciding which process to run. (Deciding which thread to run) Deciding how long the chosen process can run

Process Scheduling. Process Scheduler. Chapter 7. Context Switch. Scheduler. Selection Strategies

Job Scheduling Model

Main Points. Scheduling policy: what to do next, when there are multiple threads ready to run. Definitions. Uniprocessor policies

Introduction. Scheduling. Types of scheduling. The basics

OPERATING SYSTEMS SCHEDULING

Chapter 5: CPU Scheduling. Operating System Concepts 8 th Edition

2. is the number of processes that are completed per time unit. A) CPU utilization B) Response time C) Turnaround time D) Throughput

Processor Scheduling. Queues Recall OS maintains various queues

Operating Systems Lecture #6: Process Management

Scheduling. Yücel Saygın. These slides are based on your text book and on the slides prepared by Andrew S. Tanenbaum

Process Scheduling CS 241. February 24, Copyright University of Illinois CS 241 Staff

A Group based Time Quantum Round Robin Algorithm using Min-Max Spread Measure

Scheduling Algorithms

Road Map. Scheduling. Types of Scheduling. Scheduling. CPU Scheduling. Job Scheduling. Dickinson College Computer Science 354 Spring 2010.

CS Fall 2008 Homework 2 Solution Due September 23, 11:59PM

OS OBJECTIVE QUESTIONS

A Comparative Study of CPU Scheduling Algorithms

CPU SCHEDULING (CONT D) NESTED SCHEDULING FUNCTIONS

CPU Scheduling. CSC 256/456 - Operating Systems Fall TA: Mohammad Hedayati

Analysis and Comparison of CPU Scheduling Algorithms

CPU Scheduling 101. The CPU scheduler makes a sequence of moves that determines the interleaving of threads.

Operating Systems Concepts: Chapter 7: Scheduling Strategies

A Review on Load Balancing In Cloud Computing 1

CPU Scheduling. Core Definitions

CPU Scheduling. Multitasking operating systems come in two flavours: cooperative multitasking and preemptive multitasking.

Readings for this topic: Silberschatz/Galvin/Gagne Chapter 5

Lecture Outline Overview of real-time scheduling algorithms Outline relative strengths, weaknesses

REDUCING TIME: SCHEDULING JOB. Nisha Yadav, Nikita Chhillar, Neha jaiswal

Real-Time Scheduling 1 / 39

A LECTURE NOTE ON CSC 322 OPERATING SYSTEM I DR. S. A. SODIYA

Operating Systems, 6 th ed. Test Bank Chapter 7

A Priority based Round Robin CPU Scheduling Algorithm for Real Time Systems

Load Balancing Scheduling with Shortest Load First

Linux Process Scheduling Policy

Analysis of Job Scheduling Algorithms in Cloud Computing

Konzepte von Betriebssystem-Komponenten. Linux Scheduler. Valderine Kom Kenmegne Proseminar KVBK Linux Scheduler Valderine Kom

Multiprocessor Scheduling and Scheduling in Linux Kernel 2.6

Time Management II. June 5, Copyright 2008, Jason Paul Kazarian. All rights reserved.

Syllabus MCA-404 Operating System - II

W4118 Operating Systems. Instructor: Junfeng Yang

Efficiency of Batch Operating Systems

Real Time Scheduling Basic Concepts. Radek Pelánek

Common Approaches to Real-Time Scheduling

Operating System Tutorial

Scheduling policy. ULK3e 7.1. Operating Systems: Scheduling in Linux p. 1

ADAPTIVE LOAD BALANCING ALGORITHM USING MODIFIED RESOURCE ALLOCATION STRATEGIES ON INFRASTRUCTURE AS A SERVICE CLOUD SYSTEMS

This tutorial will take you through step by step approach while learning Operating System concepts.

Lecture 3 Theoretical Foundations of RTOS

Comparison between scheduling algorithms in RTLinux and VxWorks

Operating Systems OBJECTIVES 7.1 DEFINITION. Chapter 7. Note:

Linux scheduler history. We will be talking about the O(1) scheduler

Module 6. Embedded System Software. Version 2 EE IIT, Kharagpur 1

The International Journal Of Science & Technoledge (ISSN X)

III. SCHEDULING MODEL A. Users: The user enters the jobs to be executed on processor in computational grid.

Performance Analysis of Load Balancing Algorithms in Distributed System

Convenience: An OS makes a computer more convenient to use. Efficiency: An OS allows the computer system resources to be used in an efficient manner.

Load Balancing in Distributed System Using FCFS Algorithm with RBAC Concept and Priority Scheduling

ò Paper reading assigned for next Thursday ò Lab 2 due next Friday ò What is cooperative multitasking? ò What is preemptive multitasking?

Efficient Parallel Processing on Public Cloud Servers Using Load Balancing

218 Chapter 5 CPU Scheduling

CS414 SP 2007 Assignment 1

OPERATING SYSTEMS. Table of Contents. Republic of Cameroon Peace Work Fatherland School Year 2013/2014

Thomas Fahrig Senior Developer Hypervisor Team. Hypervisor Architecture Terminology Goals Basics Details

2.2 การจ ดการตารางงานของซ พ ย ( CPU Scheduling )

Linux O(1) CPU Scheduler. Amit Gud amit (dot) gud (at) veritas (dot) com

Factors to Describe Job Shop Scheduling Problem

Final Report. Cluster Scheduling. Submitted by: Priti Lohani

Real- Time Scheduling

Real-time scheduling algorithms, task visualization

4. Fixed-Priority Scheduling

OPERATING SYSTEM - VIRTUAL MEMORY

A number of tasks executing serially or in parallel. Distribute tasks on processors so that minimal execution time is achieved. Optimal distribution

Load Balancing in Distributed System. Prof. Ananthanarayana V.S. Dept. Of Information Technology N.I.T.K., Surathkal

CPUInheritance Scheduling. UniversityofUtah

Transcription:

KSU/CCIS CSC227 Tutorial # 4 CPU Scheduling SUMMER - 2010 Question # 1: Select the most appropriate answer for each of the following questions: 1. is the number of processes that complete their execution per time unit Throughput Turnaround time 2. Amount of time to execute a particular process Throughput Turnaround time 3. Amount of time a process has been waiting in the ready queue Throughput Turnaround time 4. One of the optimization criteria for scheduling algorithms Min Min Throughput Min Turnaround time Max waiting time 5. If the time quantum is small in, then The context switch overhead is too high. The context switch overhead is low. The context switch overhead is same. None of the above. 6. Which of the following statements is (are) true of multilevel queue scheduling? Processes can move between queues. Each queue has its own scheduling algorithm. It is the most general CPU-scheduling algorithm. All of the above 7. The. scheduling algorithm is designed especially for time-sharing systems. SJF Multilevel queue 9. Which of the following scheduling algorithms must be nonpreemptive? SJF priority algorithms

10. scheduling is approximated by predicting the next CPU burst with an exponential average of the measured lengths of previous CPU bursts. Multilevel queue SJF 11.... in a round-robin scheduler gives better response time for interactive users but less efficient use of the CPU. A short quantum. A long quantum It s same. None of the above. Question # 2: List and define the different metrics by which we might evaluate a scheduler Answer Q 2: CPU Utilization: The percentage of time that the CPU is busy. Throughput: The number of processes completing in a unit of time. Turnaround time: The length of time it takes to run a process from initialization to termination, including all the waiting time. : The total amount of time that a process is in the ready queue. Response time: The time between when a process is ready to run and its next I/O request. Question # 3: What are preemptive and non-preemptive scheduling policies? Answer Q 3: With the non-preemptive scheduling policy, scheduling only occurs when a process enters the wait state or terminates. With the preemptive scheduling policy, scheduling also occurs when a process switches from running to ready due to an interrupt, and from waiting to ready (i.e., I/O completion). Question # 4: What are the advantages and disadvantages in choosing a small length of the time-slice in Round Robin scheduling? Answer Q 4: Better response time for interactive users. Less efficient use of the CPU. The context switch overhead is too high.

Question # 5: What is the major problem in Schduling? And how to solve it? Answer Q 5: Problem is Starvation low priority processes may never execute Solution is Aging as time progresses increase the priority of the process Question # 6: In what way is SJF Optimal? Answer Q 6: Shortest remaining First (Preemptive SJF). Question # 7: Why is it hard to implement SJF as CPU-scheduler? Answer Q 7: Prediction of the next CPU burst.

Question # 8: Five processes P1, P2, P3, P4 and P5 arrived in this order at the same time with the following CPU burst and priority values. A smaller value means a higher priority. CPU Burst P1 4 2 P2 6 4 P3 2 1 P4 5 3 P5 3 5 a) Draw the Gantt chart for each scheduling algorithms. b) Fill the entries of the following table for each indicated scheduling policy and each process. Ignore context switching overhead. c) Which of the schedules results in the minimal average waiting time (over all processes) d) Which of the schedules results in the minimal average turnaround time (over all processes) Scheduling Policy SJF (Non-Preemptive) Round-Robin ( quantum = 2) Scheduling Policy SJF (Non-Preemptive) Round-Robin ( quantum = 2) Waiting P1 P2 P3 P4 P5 Turnaround P1 P2 P3 P4 P5 Waiting Turnaround

Question # 9: Five processes are entering the ready queue at a certain point of time. Each process is assigned a priority (0 should be the highest): Process Arrival Burst P1 0 8 4 P2 3 28 1 P3 7 12 0 P4 9 3 2 P5 15 4 3 Waiting a) Draw a Gantt chart or X-Y graph for illustrating the execution of these processes using Short-Job--First scheduling with preemption, when a process arrive with a lower remaining processing time. b) Fill the table be finding the waiting time for each process in part (a). c) Draw a Gantt chart or X-Y graph for illustrating the execution of these processes using Highest--First without preemption. (same way in Question #8) Question # 10: Consider the preemptive CPU scheduling, and the following six processes (all time unit are expressed in ms), A smaller value means a higher priority. Arrival CPU Bursts P1 0 4 4 P2 2 2 6 P3 4 1 2 P4 0 3 8 P5 6 0 6 P6 0 5 4 a) Draw the Gantt diagram showing the scheduling of the above processes. b) Fill in the following table. P1 P2 P3 P4 P5 P6 Waiting CPU Utilization % = Turnaround