project 2
play

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


  1. Project 2 Soumya Basu Department of Computer Science Cornell University September 18, 2015

  2. Administrivia

  3. Administrivia • Project 2 is due on September 30

  4. Administrivia • Project 2 is due on September 30 • Ground Truth

  5. First Hint

  6. First Hint Fix Project 1 Bugs!!!

  7. Purpose

  8. Purpose • Made a major assumption in Project 1…

  9. Purpose • Made a major assumption in Project 1… • Threads behave nicely and give up the CPU

  10. Purpose • Made a major assumption in Project 1… • Threads behave nicely and give up the CPU • Issues?

  11. Purpose • Made a major assumption in Project 1… • Threads behave nicely and give up the CPU • Issues? • Selfish Threads

  12. Purpose • Made a major assumption in Project 1… • Threads behave nicely and give up the CPU • Issues? • Selfish Threads • Potential Security risks

  13. The Three Parts

  14. The Three Parts • Specs say 5…

  15. The Three Parts • Specs say 5… • Start Receiving Clock Interrupts

  16. The Three Parts • Specs say 5… • Start Receiving Clock Interrupts • Add Alarms

  17. The Three Parts • Specs say 5… • Start Receiving Clock Interrupts • Add Alarms • Makes Thread Sleeping Possible

  18. The Three Parts • Specs say 5… • Start Receiving Clock Interrupts • Add Alarms • Makes Thread Sleeping Possible • Why do we care?

  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

  20. Receiving Clock Interrupts

  21. Receiving Clock Interrupts • KISS: Keep It Simple Student!

  22. Receiving Clock Interrupts • KISS: Keep It Simple Student! • Difference between:

  23. Receiving Clock Interrupts • KISS: Keep It Simple Student! • Difference between: • Testing/Coding

  24. Receiving Clock Interrupts • KISS: Keep It Simple Student! • Difference between: • Testing/Coding • Final Product

  25. Receiving Clock Interrupts • KISS: Keep It Simple Student! • Difference between: • Testing/Coding • Final Product • Changing Clock Period, Print Statements, etc.

  26. Alarms

  27. Alarms • Performance matters!

  28. Alarms • Performance matters! • How long does it take to find an element in your Project 1 queue?

  29. Alarms • Performance matters! • How long does it take to find an element in your Project 1 queue? • Is that good enough?

  30. Scheduling

  31. Scheduling • Let’s take stock of where we are…

  32. Scheduling • Let’s take stock of where we are… • You have an OS

  33. Scheduling • Let’s take stock of where we are… • You have an OS • Many Threads are Running

  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

  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?

  36. Round Robin

  37. Round Robin 1

  38. Round Robin 1 2

  39. Round Robin 1 2 3

  40. Round Robin 1 2 3 4

  41. Round Robin 1 2 3 4

  42. Round Robin 1 2 3 4

  43. Round Robin 1 2 3 4

  44. Round Robin 1 2 3 4

  45. Round Robin 2 3 4

  46. Round Robin 2 3 4 5

  47. Round Robin 2 3 4 5

  48. Round Robin 2 3 4 5

  49. Multilevel Queue Highest Lowest

  50. Multilevel Queue Round Robin Highest Lowest

  51. Multilevel Queue Round Robin Highest Round Robin Lowest

  52. Multilevel Queue Round Robin Highest Round Robin Round Robin Lowest

  53. Multilevel Queue Round Robin Highest Round Robin Round Robin Round Robin Lowest

  54. Multilevel Queue Round Robin Highest Round Robin Round Robin Round Robin Lowest

  55. Multilevel Queue Round Robin Highest Round Robin Round Robin Round Robin Lowest

  56. Multilevel Queue Round Robin Highest Round Robin Round Robin Round Robin Lowest

  57. Multilevel Queue Round Robin Highest Round Robin Round Robin Round Robin Lowest

  58. GDB (Gnu DeBugger) Demo

  59. GDB (Gnu DeBugger)

  60. GDB (Gnu DeBugger) • Many good guides out there for GDB!

  61. GDB (Gnu DeBugger) • Many good guides out there for GDB! • Here’s a good one that’s pretty short:

  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

  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):

  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

Recommend


More recommend