Part I: Counting Semaphore Questions: In your perspective, what makes counting semaphore primitives a good concurrency mechanism? How does the structure of counting semaphore primitives differ from...


Part I: Counting Semaphore





Questions:



  1. In your perspective, what makes counting semaphore primitives a good concurrency mechanism?

  2. How does the structure of counting semaphore primitives differ from binary semaphore primitives?



Part II: Binary Semaphore







Part III: Monitor







































Instructions: Analyze the given concurrency mechanism<br>figures and answer the corresponding questions for each<br>type. Use 3-5 sentences in answering. (6 items x5 points)<br>Part III: Monitor<br>entering<br>jo anand<br>Part I: Counting Semaphore<br>struct senaphore (<br>sassaonad<br>int count;<br>Monitor waiting area<br>Entrance<br>:anenb edkgenenb<br>MONITOR<br>void semlait (semaphore s)<br>Condition el<br>:--1unoo<br>I to > 1unoo8) 3T<br>Condition variables<br>Procedure 1<br>(s eroudeues) teubTsues proA<br>!++zunooS<br>I (o =>3unoos) IT<br>/* place process P on ready list */:<br>Figure 1. A simple program structure of couning semaphore primibves<br>cwait (en) O<br>y aunpaso<br>Questions:<br>1. In your perspective, what makes counting semaphore<br>primitives a good concurrency mechanism?<br>2. How does the structure of counting semaphore<br>primitives differ from binary semaphore primitives?<br>ananb juadan<br>Part II: Binary Semaphore<br>struct binary_sanaphore (<br>미머<br>!onTRA (ouo ozaz) unue<br>fonanb edkIenenb<br>Figure 3. The stucture of a monitor relative to concurrency.<br>Questions:<br>5. Deduce at least one (1) characteristic of a moniton<br>based on Figure 3. Elaborate on your answer.<br>6. Would you agree that a monitor, as a concurrency<br>mechanism, can support process synchronization?<br>Why or why not?<br>toze - onteA<br>/* place this process in s.queue /:<br>Grading Rubric:<br>Criteria<br>Performance In dicator<br>Points<br>Content<br>Correct ideas, concepts, and/or<br>examples were induded.<br>Organization The presentation of idea was<br>3.<br>2.<br>!/. 1STT Apeaa uo a ssapoad oerd /<br>TOTAL<br>Figure 2. A simple program structure of binary semaphore primiives<br>Note: DO NOTCOPY AND PASTE. Stvdents who copy and paste heir work from any webste<br>or her alassate wlaubmaticaly recalve a failing mark far this activity.<br>Questions:<br>3. Briefly explain the purpose of the semWaitB and<br>semSignalB functions in Figure 2.<br>4.<br>Based on Figures 1 and 2, which semaphore<br>structure is easier to implement and why?<br>

Extracted text: Instructions: Analyze the given concurrency mechanism figures and answer the corresponding questions for each type. Use 3-5 sentences in answering. (6 items x5 points) Part III: Monitor entering jo anand Part I: Counting Semaphore struct senaphore ( sassaonad int count; Monitor waiting area Entrance :anenb edkgenenb MONITOR void semlait (semaphore s) Condition el :--1unoo I to > 1unoo8) 3T Condition variables Procedure 1 (s eroudeues) teubTsues proA !++zunooS I (o =>3unoos) IT /* place process P on ready list */: Figure 1. A simple program structure of couning semaphore primibves cwait (en) O y aunpaso Questions: 1. In your perspective, what makes counting semaphore primitives a good concurrency mechanism? 2. How does the structure of counting semaphore primitives differ from binary semaphore primitives? ananb juadan Part II: Binary Semaphore struct binary_sanaphore ( 미머 !onTRA (ouo ozaz) unue fonanb edkIenenb Figure 3. The stucture of a monitor relative to concurrency. Questions: 5. Deduce at least one (1) characteristic of a moniton based on Figure 3. Elaborate on your answer. 6. Would you agree that a monitor, as a concurrency mechanism, can support process synchronization? Why or why not? toze - onteA /* place this process in s.queue /: Grading Rubric: Criteria Performance In dicator Points Content Correct ideas, concepts, and/or examples were induded. Organization The presentation of idea was 3. 2. !/. 1STT Apeaa uo a ssapoad oerd / TOTAL Figure 2. A simple program structure of binary semaphore primiives Note: DO NOTCOPY AND PASTE. Stvdents who copy and paste heir work from any webste or her alassate wlaubmaticaly recalve a failing mark far this activity. Questions: 3. Briefly explain the purpose of the semWaitB and semSignalB functions in Figure 2. 4. Based on Figures 1 and 2, which semaphore structure is easier to implement and why?

Jun 04, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here