Homework 2 Sarah Diesburg Operating Systems COP 4610.

Slides:



Advertisements
Similar presentations
Uniprocessor Scheduling Chapter 9 Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee Community College, Venice,
Advertisements

OS, , Part II CPU Scheduling Department of Computer Engineering, PSUWannarat Suntiamorntut.
CS 140 Lecture Notes: CPU SchedulingSlide 1 BCA time FCFS BA time25103 Round Robin CACA Scenario #1 A 100ms B 1ms C 2ms Ready Queue Avg:
Operating Systems Chapter 6
Chapter 5 CPU Scheduling. CPU Scheduling Topics: Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling.
Operating Systems CPU Scheduling. Agenda for Today What is Scheduler and its types Short-term scheduler Dispatcher Reasons for invoking scheduler Optimization.
Exercise (5).
CS 311 – Lecture 23 Outline Kernel – Process subsystem Process scheduling Scheduling algorithms User mode and kernel mode Lecture 231CS Operating.
Uniprocessor Scheduling III CPSC 410 Operating Systems Department of Physics, Computer Science and Engineering Christopher Newport University.
Chapter 5-CPU Scheduling
02/11/2004CSCI 315 Operating Systems Design1 CPU Scheduling Algorithms Notice: The slides for this lecture have been largely based on those accompanying.
Chapter 6: CPU Scheduling
Computer Architecture and Operating Systems CS 3230: Operating System Section Lecture OS-3 CPU Scheduling Department of Computer Science and Software Engineering.
COT 4600 Operating Systems Spring 2011 Dan C. Marinescu Office: HEC 304 Office hours: Tu-Th 5:00-6:00 PM.
Chapter 7 Scheduling Chien-Chung Shen CIS, UD
Scheduling Chap 2. Scheduling Introduction to Scheduling (1) Bursts of CPU usage alternate with periods of I/O wait –a CPU-bound process –an I/O bound.
Round Robin Scheduling A preemptive scheduling designed for Time Sharing Systems The Ready Queue is treated as a circular queue A small execution.
Scheduling Strategies Operating Systems Spring 2004 Class #10.
ICS Principles of Operating Systems Lecture 5 - CPU Scheduling Prof. Nalini Venkatasubramanian
Exercise (4). Exercise Assume the following jobs are executed with one processor, with the jobs arriving in the order listed in the table. – Suppose a.
1 Our focus  scheduling a single CPU among all the processes in the system  Key Criteria: Maximize CPU utilization Maximize throughput Minimize waiting.
Alternating Sequence of CPU And I/O Bursts. Histogram of CPU-burst Times.
Lecture 7: Scheduling preemptive/non-preemptive scheduler CPU bursts
Exam Review Andy Wang Operating Systems COP 4610 / CGS 5765.
Processor Scheduling Hank Levy. 22/4/2016 Goals for Multiprogramming In a multiprogramming system, we try to increase utilization and thruput by overlapping.
Uniprocessor Process Management & Process Scheduling Department of Computer Science Southern Illinois University Edwardsville Spring, 2016 Dr. Hiroshi.
1 CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling.
CPU Scheduling Operating Systems CS 550. Last Time Deadlock Detection and Recovery Methods to handle deadlock – Ignore it! – Detect and Recover – Avoidance.
Process Scheduling Schedulers and Scheduling Methods.
1 Module 5: Scheduling CPU Scheduling Scheduling Algorithms Reading: Chapter
1 Lecture 5: CPU Scheduling Operating System Fall 2006.
Chapter 7 Scheduling Chien-Chung Shen CIS/UD
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Chapter 5: CPU Scheduling.
CPU Scheduling Andy Wang Operating Systems COP 4610 / CGS 5765.
Sarah Diesburg Operating Systems COP 4610
Scheduling (Priority Based)
CPU Scheduling.
Chapter 6: CPU Scheduling
זימון תהליכים מדיניות בסיסיות: RR, FCFS, SJF
ICS 143 Principles of Operating Systems
פרק שלישי – תזמון תהליכים
Chapter 6: CPU Scheduling
Lecture 16 Syed Mansoor Sarwar
Module 5: CPU Scheduling
Andy Wang Operating Systems COP 4610 / CGS 5765
Introduction What is an operating system bootstrap
Operating System Concepts
Sarah Diesburg Operating Systems COP 4610
Chapter5: CPU Scheduling
COT 4600 Operating Systems Spring 2011
Chapter 6: CPU Scheduling
CGS 3763 Operating Systems Concepts Spring 2013
Chapter 5: CPU Scheduling
CGS 3763 Operating Systems Concepts Spring 2013
Processor Scheduling Hank Levy 1.
Uniprocessor Process Management & Process Scheduling
Shortest-Job-First (SJR) Scheduling
Chapter 6: CPU Scheduling
Module 5: CPU Scheduling
Andy Wang Operating Systems COP 4610 / CGS 5765
Andy Wang Operating Systems COP 4610 / CGS 5765
Scheduling 21 May 2019.
Chapter 6: CPU Scheduling
Andy Wang Operating Systems COP 4610 / CGS 5765
Uniprocessor Process Management & Process Scheduling
CPU Scheduling.
CPU Scheduling: Basic Concepts
Module 5: CPU Scheduling
Chapter 5: CPU Scheduling
Sarah Diesburg Operating Systems CS 3430
Presentation transcript:

Homework 2 Sarah Diesburg Operating Systems COP 4610

Why does OS loader set kernel mode? OS needs to run with full privileges  Sets more restrictive user mode bit for user programs  Protects OS from errant user programs

Three Processes Process A Process B Process C Time

First In, First Out Process A Process B Process C FIFO Time BCA

First In, First Out Process A Process B Process C FIFO Average response time = [(300-50) + ( ) + 0]/3 = 200 Time BCA

First In, First Out Process A Process B Process C FIFO Average wait time = [(300-50) + ( ) + 0]/3 = 200 Time BCA

First In, First Out Process A Process B Process C FIFO Average turnaround time = [(500-50) + ( ) + (300-0)]/3 = 500 Time BABCA

Round Robin (Time slice = 100) Process A Process B Process C RR Time C

Process A Process B Process C RR Round Robin (Time slice = 100) Time C

Process A Process B Process C RR Round Robin (Time slice = 100) Time CA

Process A Process B Process C RR Round Robin (Time slice = 100) Time CA

Process A Process B Process C RR Round Robin (Time slice = 100) Time CAC

Process A Process B Process C RR Round Robin (Time slice = 100) Time CAC

Process A Process B Process C RR Round Robin (Time slice = 100) Time CACB

Process A Process B Process C RR Round Robin (Time slice = 100) Time CACB

Process A Process B Process C RR Round Robin (Time slice = 100) Time CACBA

Process A Process B Process C RR Round Robin (Time slice = 100) Time CACBA

Process A Process B Process C RR Round Robin (Time slice = 100) Time CACBAC

Process A Process B Process C RR Round Robin (Time slice = 100) Time CACBAC

Process A Process B Process C RR Round Robin (Time slice = 100) Time CACBACB

Process A Process B Process C RR Round Robin (Time slice = 100) Time CACBACB

Process A Process B Process C RR Average response time = [(100-50) + (300 – 150) + 0]/3 = 66.7 Round Robin (Time slice = 100) Time CACBACB

Process A Process B Process C RR Average wait time = {[(100–50) + (400–200)] + [(300–150) + (600–400)] + [0 + (200–100) + (500–300)]}/3 = [ ]/3 = 300 Round Robin (Time slice = 100) Time CACBACB

Process A Process B Process C RR Average turnaround time = [(500 – 50) + (900 – 150) + (600 – 0)]/3 = 600 Round Robin (Time slice = 100) Time CACBACB

Shortest Job Next Process A Process B Process C SJN Time C

Shortest Job Next Process A Process B Process C SJN Time C

Shortest Job Next Process A Process B Process C SJN Time CA

Shortest Job Next Process A Process B Process C SJN Time CA

Shortest Job Next Process A Process B Process C SJN Time CA

Shortest Job Next Process A Process B Process C SJN Time CAB

Shortest Job Next Process A Process B Process C SJN Time CAB

Shortest Job Next Process A Process B Process C SJN Average response time = [(300-50) + ( ) + 0]/3 = 200 Time CAB

Shortest Job Next Process A Process B Process C SJN Average wait time = [(300-50) + ( ) + 0]/3 = 200 Time CAB

Shortest Job Next Process A Process B Process C SJN Average turnaround time = [(500-50) + ( ) + (300-0)]/3 = 500 Time CAB

Shortest Remaining Time First Process A Process B Process C SRTF Time C

Shortest Remaining Time First Process A Process B Process C SRTF Time C

Shortest Remaining Time First Process A Process B Process C SRTF Time CA

Shortest Remaining Time First Process A Process B Process C SRTF Time CA

Shortest Remaining Time First Process A Process B Process C SRTF Time CAC

Shortest Remaining Time First Process A Process B Process C SRTF Time CAC

Shortest Remaining Time First Process A Process B Process C SRTF Time CACB

Shortest Remaining Time First Process A Process B Process C SRTF Time CACB

Shortest Remaining Time First Process A Process B Process C SRTF Average response time = [0 + ( ) + 0]/3 = 117 Time CACB

Shortest Remaining Time First Process A Process B Process C SRTF Average wait time = [0 + (500 – 150) + (250 – 50)]/3 = 183 Time CACB

Shortest Remaining Time First Process A Process B Process C SRTF Average turnaround time = [(250 – 50) + (900 – 150) + (500 – 0)]/3 = 483 Time CACB