COMP 3500 Lecture 17: 17-Synchronization 6 Exercises-Handout

45 views2 pages

Document Summary

: >85%, : 70-85%, : 55-70%, : 40-55%, : < 40% Exercise 1 (plickers): what is the execution sequence of pi and pj? (20 seconds) semaphore flag initialized to 0. Pj: execute pi only after pj is executed, may execute pi after pj is executed, execute pj only after pi is executed, after pj is executed, pi can start. Exercise 2: what is the execution sequence of proc_a and proc_b? (2 minutes) Exercise 3 (plickers): there are three interacting processes. We assume that the execution is eventually halted. How many c"s are printed when the set of processes runs? (2 minutes: random number, 1, 2, 3. Exercise 4 (plickers): how many d"s are printed when this set of processes runs? (1 minute: random number, 1, 2, 3. Exercise 5 (plickers): given the above three concurrent processes, what is the smallest number of a"s that might be printed when this set of processes runs? (30.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers