Project 2 Soumya Basu Department of Computer Science Cornell - - PowerPoint PPT Presentation

project 2
SMART_READER_LITE
LIVE PREVIEW

Project 2 Soumya Basu Department of Computer Science Cornell - - PowerPoint PPT Presentation

Project 2 Soumya Basu Department of Computer Science Cornell University September 18, 2015 Administrivia Administrivia Project 2 is due on September 30 Administrivia Project 2 is due on September 30 Ground Truth First Hint First


slide-1
SLIDE 1

Project 2

Soumya Basu Department of Computer Science Cornell University September 18, 2015

slide-2
SLIDE 2

Administrivia

slide-3
SLIDE 3

Administrivia

  • Project 2 is due on September 30
slide-4
SLIDE 4

Administrivia

  • Project 2 is due on September 30
  • Ground Truth
slide-5
SLIDE 5

First Hint

slide-6
SLIDE 6

Fix Project 1 Bugs!!! First Hint

slide-7
SLIDE 7

Purpose

slide-8
SLIDE 8

Purpose

  • Made a major assumption in Project 1…
slide-9
SLIDE 9

Purpose

  • Made a major assumption in Project 1…
  • Threads behave nicely and give up the CPU
slide-10
SLIDE 10

Purpose

  • Made a major assumption in Project 1…
  • Threads behave nicely and give up the CPU
  • Issues?
slide-11
SLIDE 11

Purpose

  • Made a major assumption in Project 1…
  • Threads behave nicely and give up the CPU
  • Issues?
  • Selfish Threads
slide-12
SLIDE 12

Purpose

  • Made a major assumption in Project 1…
  • Threads behave nicely and give up the CPU
  • Issues?
  • Selfish Threads
  • Potential Security risks
slide-13
SLIDE 13

The Three Parts

slide-14
SLIDE 14

The Three Parts

  • Specs say 5…
slide-15
SLIDE 15

The Three Parts

  • Specs say 5…
  • Start Receiving Clock Interrupts
slide-16
SLIDE 16

The Three Parts

  • Specs say 5…
  • Start Receiving Clock Interrupts
  • Add Alarms
slide-17
SLIDE 17

The Three Parts

  • Specs say 5…
  • Start Receiving Clock Interrupts
  • Add Alarms
  • Makes Thread Sleeping Possible
slide-18
SLIDE 18

The Three Parts

  • Specs say 5…
  • Start Receiving Clock Interrupts
  • Add Alarms
  • Makes Thread Sleeping Possible
  • Why do we care?
slide-19
SLIDE 19

The Three Parts

  • Specs say 5…
  • Start Receiving Clock Interrupts
  • Add Alarms
  • Makes Thread Sleeping Possible
  • Why do we care?
  • Multilevel feedback queue scheduler
slide-20
SLIDE 20

Receiving Clock Interrupts

slide-21
SLIDE 21

Receiving Clock Interrupts

  • KISS: Keep It Simple Student!
slide-22
SLIDE 22

Receiving Clock Interrupts

  • KISS: Keep It Simple Student!
  • Difference between:
slide-23
SLIDE 23

Receiving Clock Interrupts

  • KISS: Keep It Simple Student!
  • Difference between:
  • Testing/Coding
slide-24
SLIDE 24

Receiving Clock Interrupts

  • KISS: Keep It Simple Student!
  • Difference between:
  • Testing/Coding
  • Final Product
slide-25
SLIDE 25

Receiving Clock Interrupts

  • KISS: Keep It Simple Student!
  • Difference between:
  • Testing/Coding
  • Final Product
  • Changing Clock Period, Print Statements, etc.
slide-26
SLIDE 26

Alarms

slide-27
SLIDE 27

Alarms

  • Performance matters!
slide-28
SLIDE 28

Alarms

  • Performance matters!
  • How long does it take to find an element in your

Project 1 queue?

slide-29
SLIDE 29

Alarms

  • Performance matters!
  • How long does it take to find an element in your

Project 1 queue?

  • Is that good enough?
slide-30
SLIDE 30

Scheduling

slide-31
SLIDE 31

Scheduling

  • Let’s take stock of where we are…
slide-32
SLIDE 32

Scheduling

  • Let’s take stock of where we are…
  • You have an OS
slide-33
SLIDE 33

Scheduling

  • Let’s take stock of where we are…
  • You have an OS
  • Many Threads are Running
slide-34
SLIDE 34

Scheduling

  • Let’s take stock of where we are…
  • You have an OS
  • Many Threads are Running
  • Now forcing them to give up the CPU
slide-35
SLIDE 35

Scheduling

  • Let’s take stock of where we are…
  • You have an OS
  • Many Threads are Running
  • Now forcing them to give up the CPU
  • How do we pick who’s next?
slide-36
SLIDE 36

Round Robin

slide-37
SLIDE 37

Round Robin

1

slide-38
SLIDE 38

Round Robin

1 2

slide-39
SLIDE 39

Round Robin

1 2 3

slide-40
SLIDE 40

Round Robin

1 2 3 4

slide-41
SLIDE 41

Round Robin

1 2 3 4

slide-42
SLIDE 42

Round Robin

1 2 3 4

slide-43
SLIDE 43

Round Robin

1 2 3 4

slide-44
SLIDE 44

Round Robin

1 2 3 4

slide-45
SLIDE 45

Round Robin

2 3 4

slide-46
SLIDE 46

Round Robin

2 3 4 5

slide-47
SLIDE 47

Round Robin

2 3 4 5

slide-48
SLIDE 48

Round Robin

2 3 4 5

slide-49
SLIDE 49

Multilevel Queue

Highest Lowest

slide-50
SLIDE 50

Multilevel Queue

Round Robin Highest Lowest

slide-51
SLIDE 51

Multilevel Queue

Round Robin Round Robin Highest Lowest

slide-52
SLIDE 52

Multilevel Queue

Round Robin Round Robin Round Robin Highest Lowest

slide-53
SLIDE 53

Multilevel Queue

Round Robin Round Robin Round Robin Round Robin Highest Lowest

slide-54
SLIDE 54

Multilevel Queue

Round Robin Round Robin Round Robin Round Robin Highest Lowest

slide-55
SLIDE 55

Multilevel Queue

Round Robin Round Robin Round Robin Round Robin Highest Lowest

slide-56
SLIDE 56

Multilevel Queue

Round Robin Round Robin Round Robin Round Robin Highest Lowest

slide-57
SLIDE 57

Multilevel Queue

Round Robin Round Robin Round Robin Round Robin Highest Lowest

slide-58
SLIDE 58

GDB (Gnu DeBugger)

Demo

slide-59
SLIDE 59

GDB (Gnu DeBugger)

slide-60
SLIDE 60

GDB (Gnu DeBugger)

  • Many good guides out there for GDB!
slide-61
SLIDE 61

GDB (Gnu DeBugger)

  • Many good guides out there for GDB!
  • Here’s a good one that’s pretty short:
slide-62
SLIDE 62

GDB (Gnu DeBugger)

  • Many good guides out there for GDB!
  • Here’s a good one that’s pretty short:
  • http://www.cabrillo.edu/~shodges/cs19/progs/

guide_to_gdb_1.1.pdf

slide-63
SLIDE 63

GDB (Gnu DeBugger)

  • Many good guides out there for GDB!
  • Here’s a good one that’s pretty short:
  • http://www.cabrillo.edu/~shodges/cs19/progs/

guide_to_gdb_1.1.pdf

  • You might also need this (Hint hint):
slide-64
SLIDE 64

GDB (Gnu DeBugger)

  • Many good guides out there for GDB!
  • Here’s a good one that’s pretty short:
  • http://www.cabrillo.edu/~shodges/cs19/progs/

guide_to_gdb_1.1.pdf

  • You might also need this (Hint hint):
  • https://sourceware.org/gdb/onlinedocs/gdb/

Signals.html