Part I: Counting Semaphore
Questions:
Part II: Binary Semaphore
Part III: Monitor
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?
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here