537-L3-scheduling.pdf - CPU SCHEDULING Andrea Arpaci-Dusseau CS 537 Spring 2019 Announcements • Project 1 Due this Monday midnight Piazza TAs and Peer

537-L3-scheduling.pdf - CPU SCHEDULING Andrea...

This preview shows page 1 - 12 out of 52 pages.

CPU SCHEDULING Andrea Arpaci-Dusseau CS 537, Spring 2019
Image of page 1

Subscribe to view the full document.

Announcements Project 1 Due this Monday midnight - Piazza: TAs and Peer Mentors will NOT answer questions after noon on Monday; No lab hours after 10pm Project 2 available: Due Monday Sept 23 rd - Two videos are available - Start BEFORE discussion section Simple Homework in Canvas available: Process - Practice Exam Questions; Gives solutions; Can retake - Due 1 week Midterm 1: Oct 10 (Thu) instead of Oct 9 (Wed, Yom Kippur)
Image of page 2
CPU Scheduling: LEARNING OUTCOMES How does the OS decide which process to run? What are some metrics to optimize? What are different scheduling policies, such as: FCFS, SJF, STCF, RR and MLFQ? How to handle mix of interactive and batch processes? What to do when OS doesn’t have complete information?
Image of page 3

Subscribe to view the full document.

RECAP
Image of page 4
RECAP: SCHEDULING MECHANISM Process: Abstraction to virtualize CPU Use time-sharing in OS to switch between processes
Image of page 5

Subscribe to view the full document.

PROCESS STATE TRANSITIONS Running Ready Blocked Descheduled Scheduled I/O: initiate I/O: done How to transition? (“mechanism”) When to transition? (“policy”) Many processes could be READY Many processes could be BLOCKED, waiting for I/O to complete At most 1 process RUNNING How many processes can be in each state simultaneously?
Image of page 6
RECAP: SCHEDULING MECHANISM Limited Direct Execution Use system calls to run access devices from user mode Use timer interrupts to context switch for multi-tasking
Image of page 7

Subscribe to view the full document.

Scheduling Terminology Workload: set of jobs (arrival time, run_time) Job : Current scheduling burst of a process Alternates between CPU and I/O Moves between ready and blocked queues Scheduler : Decides which READY job to run Metric : Measurement of scheduling quality
Image of page 8
Scheduling Performance Metrics Minimize turnaround time Do not want to wait long for job to complete Completion_time – arrival_time Minimize response time Can’t control how long job needs to run; minimize time before scheduled Initial_schedule_time – arrival_time Maximize throughput (jobs completed / second) Want many jobs to complete per unit of time Maximize resource utilization (% time CPU busy) Keep expensive devices busy Minimize overhead (# of context switches and cache misses) Reduce number of context switches Maximize fairness (variation of CPU time across jobs) All jobs get same amount of CPU over some time interval
Image of page 9

Subscribe to view the full document.

Lecture Format Assumptions Scheduling policy Metric
Image of page 10
Workload ASSUMPTIONS 1. Each job runs for the same amount of time 2. All jobs arrive at the same time
Image of page 11

Subscribe to view the full document.

Image of page 12
  • Fall '08
  • ARPACI-DUSSEAU

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Ask Expert Tutors You can ask 0 bonus questions You can ask 0 questions (0 expire soon) You can ask 0 questions (will expire )
Answers in as fast as 15 minutes