iii
play

III St R X Critealsectroisproblemm Io forever Tf Rz deiforeter - PDF document

4410 Schneider Concurrent Programming 9 12 2019 CS abstraction of core processor process thread sequential execution of atomic actors process to shared memory access private set of registers pc general purpose regs models time multiplexing


  1. 4410 Schneider Concurrent Programming 9 12 2019 CS abstraction of core processor process thread sequential execution of atomic actors process to shared memory access private set of registers pc general purpose regs models time multiplexing Arbitrary interleaorg with context swkh.es Shared memory models any shared resource Instruction that makes at most 1 atomicity reference to at most 1 shared memory location appears to be atomic R L X Ntl T X Add R I St R X R R L L X X add B III St R X

  2. Critealsectroisproblemm Io forever Tf Rz deiforeter entry entry CS C a exits exitz NCS Ncsa end end Means parallel or concurrent execution Terminology Pgm counter MTN 9 g qq.az an afterCs at Cs in G Assumption If then eventually after incese Csi is terminating Requirements A inksz Mutual Exclusion inks 7 Non Blocking It affentrye then eventually atess not blocked If in Ness then process P in NCS Pz

  3. Solution delays execution until B Def aitB aw is true J Boolean expr wise 71310 slap end implementer Introduce variables Solution Attempt in Mz Pi process do forever true in in await Tmz A 7h2 in CS false 7in M Ncs end Pz process Forever true Mz in await 7in mzh.tn Css false Mz Tmz NCSz end

  4. Solutionattempt 1 Mutual Exclusion A in CS Tmz in A Gz Mz in ring in Cq in CE Mz A Mz 17 In in A n false Mutual Exclusu satisfied Solution attempt 1 Non Bloclay Blocked infantry Antuna in A Mz In in entry Blocked A und in Hz A Mi Blocked intently 17 Blocked n in Centijd d m2 in Needed to be false not satisfied Non Blocking

  5. Solution attempt 2 weaken condition is await in.tl Ver turn could be 2 integer Invariant I turn 2 turnt x Add pji process do forever AI true in in turn 1 await 71kV 1 turn _7 AI Tmz in CS false 1 I M 7in Ncs end Pz process Forever true Mz Mz AI await return 2 tin xturr LI 2 Hz h nm Css false That I Mz NCSz end n

  6. n How to check soundness of assertions correctness sequential in any state salesfgy Execs p f terminates P s a s holds of the resulty then Q Q state Interference freedom 5 Edabg I processes prowess i i press pg S end end Must show B holds S pre G hp one process 4 P in the other for all 5 in coma Nz ftp.iea nYsiassertorsffEraY.eaekm

  7. Example of Soundfensound assertions X l X I F I I f if 2 if 2 2 A 1 1 2 y y Z Xty Z Xty 2 3 2 3 I unsound sound z Xty exec in If a slate satisfying prefz Xty which is then 2 y no guartee that E I holds

  8. Showing interference freedom for R R true vs man I Min AI Man Gin alter Tmz ht R Be false in vs Me A I Mar GM v ture ht ganz ht problem

  9. exec Soh thee in turn 2 i together notation Ls Use is exec to signify that S an indivisible operate as c E g turn 27 true n

  10. Add Pi process do forever 1 IS Eun 2 Em AI true in in turn 1 await 71kV 1 turn DAI A fine in CS false 1 I 7in in a Ncs end Pz process Forever turn had I true Nz I Mz AI await return 2 7in v turn L AI Hz h nm Cs's false That I Mz i NCSz end

  11. Interface freedom for if deleted C 7 VS processz processes finish M turn in 2 fun 2B inn Mi fabe in Tmz So.tn attuned injnfrin Vatanen 2 Add true when pgmcounter is about in process 1 to execute turn 2

  12. to repairrnteffeg.ee after Add Pi process do forever in HIS tan 2 Em AI true in turn 1 await 71kV at Gur D AI h turnt x Tmz in x CS false 1 I in 7in Ncs end Pz process Forever turn had I true I Mz Mz AI await xtwr 2 rn Vat Gun 2DhI x turn Hz h L Tim Css false That I Mz NCSz end

  13. Rev 9 24 Mute satisfied mfs links I n Yat Gan 7172 V turn I m h AI Mz N G H at Ctu d A X turn 2 X At in Cosa ratcturn Note 2 mess rattles l Atan 72 Atma A in Mz false

  14. Mutual bloody satisfied 71kV Eun D d A E in 7 YEN N Mz h 7 7h A 2 I A tu El r A IA in Hz A tenth 1h21 In A I the ten 2 A I n I false

  15. But ii Be Awd V Eun 7in Shaed variable references involves Violates defn of atomic v Eun D do slap end while 2b 7 Av 2 do slap end star while in He false 12 at Ctu D V Eun Gin 2x ez I while 7h2 de Lz Iz TM X e k lez Eun 1 X end var reference Code involves only 1 shared

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend