Instructions: Analyze The Given Concurrency Mechanism Part III: Monitor

Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

IT2105

Instructions: Analyze the given concurrency mechanism Part III: Monitor


figures and answer the corresponding questions for each
type. Use 3-5 sentences in answering. (6 items x 5 points)

Part I: Counting Semaphore

Figure 1. A simple program structure of counting semaphore primitives.

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

Figure 3. The structure of a monitor relative to concurrency.

Questions:
5. Deduce at least one (1) characteristic of a monitor
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?

Grading Rubric:
Criteria Performance Indicator Points
Content Correct ideas, concepts, and/or 3
examples were included.
Organization The presentation of idea was 2
generally organized.
TOTAL 5
Figure 2. A simple program structure of binary semaphore primitives.
Note: DO NOT COPY AND PASTE. Students who copy and paste their work from any website
or their classmate will automatically receive a failing mark for 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?

04 Quiz 1 *Property of STI


Page 1 of 1

You might also like