cs1550 recitation n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
CS1550 Recitation PowerPoint Presentation
Download Presentation
CS1550 Recitation

Loading in 2 Seconds...

play fullscreen
1 / 15

CS1550 Recitation - PowerPoint PPT Presentation


  • 149 Views
  • Uploaded on

CS1550 Recitation. Mengmeng Li LMM@cs.pitt.edu Office hours: Wed 2:15-4:45pm, Fri 3:00-4:00pm Office: Sennot Square 6805. goal. Review the CPU scheduling. Exercises. Project 1. motivation.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'CS1550 Recitation' - jennifer-silva


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
cs1550 recitation

CS1550 Recitation

Mengmeng Li

LMM@cs.pitt.edu

Office hours: Wed 2:15-4:45pm, Fri 3:00-4:00pm

Office: Sennot Square 6805

slide2
goal
  • Review the CPU scheduling.
  • Exercises.
  • Project 1.
motivation
motivation
  • When a computer is multiprogrammed, it frequently has multiple processes or threads competing at the same time.
  • If only one CPU is available, a choice has to be made which process to run next.
  • Scheduler:

The part of the OS that makes the choice.

  • Scheduling algorithm:
categories
categories
  • Preemptive algorithm
  • Nonpreemptive algorithm
definitions
definitions
  • Throughput:

The number of jobs per hour that the system completes

  • Turnaround time:

the statistically average time from the moment that a batch job is submitted until the moment it is completed.

scheduling in batch systems
Scheduling in batch systems
  • First-come first-served

Non-preemptive

  • Shortest job first

Non-preemptive

  • Round Robin

Preemptive

first come first served
First-come first-served
  • Example 1:

Throughput = 60*3/(24+3+3) = 6

Turnaround time = (24 + 26 +28)/3 = 26

shortest job first
Shortest job first
  • Example 1:

P1

P4

P2

P3

Throughput = 60*4/(10+8+18+3) = 6

Turnaround time = (10 + 3+ 19 + 33)/4 = 17.5

round robin
Round Robin
  • Example

Time quantum: 5

  • Throughput = 60*4/(10+8+18+3) = 6
  • Turnaround = (23+24+33+8)/4 = 22

P1(5)

P2(5)

P3(5)

P4(3)

P1(5)

P2(3)

P3(13)

round robin1
Round Robin
  • Exercise
project 1
Project 1
  • Run the skeleton programs.