Download
2 processes n.
Skip this Video
Loading SlideShow in 5 Seconds..
2. Processes PowerPoint Presentation
Download Presentation
2. Processes

2. Processes

186 Views Download Presentation
Download Presentation

2. Processes

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. 2. Processes

  2. 2.1. Introduction to Processes • 2.1.1. The Process Model • 2.1.2. Process Creation • 2.1.3. Process Termination • 2.1.4. Process Hierarchies • 2.1.5. Process States • 2.1.6. Implementation of Processes • 2.1.7. Threads 2

  3. 2.1 The Process Model 3

  4. 2.1.2 Process Creation 4

  5. 2.1.3 Process Termination 5

  6. 2.1.4 Process Hierarchy 6

  7. 2.1.5 Process States 7

  8. 2.1.6 Implementation of Processes 8

  9. 9

  10. 2.1.7 Threads 10

  11. 11

  12. 12

  13. 2.2. Interprocess Communication • 2.2.1. Race Conditions • 2.2.2. Critical Sections • 2.2.3. Mutual Exclusion with Busy Waiting • 2.2.4. Sleep and Wakeup • 2.2.5. Semaphores • 2.2.6. Mutexes • 2.2.7. Monitors • 2.2.8. Message Passing 13

  14. 2.2.1 Race Conditions 14

  15. 2.2.2 Critical Section 15

  16. 2.2.3 Mutual Exclusion with Busy Waiting • Disabling Interrupts • Lock Variables • Strict Alternation • Peterson’s Solution • The TSL instruction 16

  17. Disabling Interrupts 17

  18. Lock Variables 18

  19. Strict Alternation 19

  20. Peterson’s Solution 20

  21. The TSL instruction 21

  22. 2.2.4 Sleep and Wakeup 22

  23. The Producer-Consumer Problem 23

  24. 2.2.5 Semaphores 24

  25. Solving the Producer-Consumer Problem using Semaphores 25

  26. 2.2.6. Mutexes 26

  27. 2.2.7. Monitors 27

  28. Solving the Producer-Consumer Problem using Monitor (1) 28

  29. Solving the Producer-Consumer Problem using Monitor (2) 29

  30. 2.2.8. Message Passing 30

  31. 2.3. Classical IPC Problems • 2.3.1. The Dining Philosophers Problem • 2.3.2. The Readers and Writers Problem 31

  32. 2.3.1. The Dining Philosophers Problem (DPP) 32

  33. A nonsolution to DPP 33

  34. A solution to DPP (1) 34

  35. A solution to DPP (2) 35

  36. 2.3.2. The Readers and Writers Problem 36

  37. 2.4. Scheduling • 2.4.1. Introduction to Scheduling • 2.4.2. Scheduling in Batch Systems • 2.4.3. Scheduling in Interactive Systems • 2.4.4. Scheduling in Real-Time Systems • 2.4.5. Policy versus Mechanism • 2.4.6. Thread Scheduling 37

  38. 2.4.1. Introduction to Scheduling • Process Behavior • When to Schedule • Categories of Scheduling Algorithms • Scheduling Algorithm Goals 38

  39. Process Behavior 39

  40. Scheduling Algorithm Goals 40

  41. 2.4.2. Scheduling in Batch Systems • First-Come First Served • Shortest Job First • Shortest Remaining Time Next • Three-Level Scheduling 41

  42. First-Come First Served 42

  43. Shortest Job First 43

  44. Shortest Remaining Time Next 44

  45. Three-Level Scheduling 45

  46. 2.4.3. Scheduling in Interactive Systems • Round-Robin Scheduling • Priority Scheduling • Multiple Queues • Shortest Process Next • Guaranteed Scheduling • Lottery Scheduling • Fair-Share Scheduling 46

  47. Round-Robin Scheduling 47

  48. Priority Scheduling 48

  49. Multiple Queues 49

  50. Shortest Process Next 50