1 / 12

Unit 5 part 2

Process schedule operating system

saltons
Download Presentation

Unit 5 part 2

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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 4/6/2015 1

  2. 4/6/2015 balance balance balance balance balance balance onecannotenter ; onecannotenter onecannotenter onecannotenter } 2

  3. 4/6/2015 ; p1w p2w occ t t f f f t t t t t t t t f f t f t t f t t f t 3

  4. 4/6/2015 ND NR result ND NR ND NR result Nothing done since There is some process Waiting for S 4

  5. 4/6/2015 i P i P F1 P1 P2 F2 5

  6. 4/6/2015 p3 p4 p1 p2 40% 90% 30% 94% . 6

  7. 4/6/2015 ( ) . 7

  8. 4/6/2015 . •   8

  9. 4/6/2015 9

  10. 4/6/2015 4 6 8 1 4 5 2 مدختسم ) 1 ( مدختسم ) 2 ( مدختسم ) 3 ( رفوتلما 2 4 6 8 1 4 5 2 مدختسم ) 1 ( مدختسم ) 2 ( مدختسم ) 3 ( رفوتلما 4 6 8 1 4 6 1 مدختسم ) 1 ( مدختسم ) 2 ( مدختسم ) 3 ( رفوتلما 10 5 3 8 2 1 1 مدختسم ) 1 ( مدختسم ) 2 ( مدختسم ) 3 ( رفوتلما 10

  11. 4/6/2015 P6 P5 P1 P2 P4 P3 11

  12. 4/6/2015 Test‐And‐Set p1w p2w occ P1: void main() { boolean p1wait = true; while(!done) { while (p1wait) testAndset(P1wait,occupied); CRITICAL SECTION p1wait = true; occupied = false; other stuff.. } P2: void main() { booleanp2wait = true; while(!done) { while (p2wait) testAndset(P2wait,occupied); CRITICAL SECTION p2wait = true; occupied = false; other stuff.. } t t f f t t f t t t t f t f t R7 t f t t t f t f t 12

More Related