You are on page 1of 2

IT18106

Names (1) Norodin Anayatin __________________ Section BSIT201A_ Date September 15, 2019
(2) Gene Roe S. Cuenca

Quiz (Pairs)
Concurrency
I. ESSAY (80 points)
Perform what is being asked. Write your answers on the space provided.

1. State the four conditions of a deadlock. (20 points)


Mutual Exclusion is a share data that is often to avoid race condition. It is a one process that shares by the
resources and all the processes desiring to do so at the same time for instances in an intersection. If a 4
car will intersect each other. No process will be doing it will be a deadlock. It can solve if one car will be
giver a way.
Hold and wait is a one process that will hold a resources and another process will be wait until the first
process will be done. For example, in a classroom teacher wants to teach his/her students but there is a
teacher that didn’t done to teach and all need to do is to wait until it finish.
No Preemption is a one process that taking a resources and the other resources in advance and cannot
take the resources that being used by the process. Like for example, in creating a PSA, it must be claim
twice and it cannot be granted again
Circular Wait is one process that needing a resources and the resources, if the process will be done the
resources will be come up to another process and it will be turned around and around until the process will
be satisfied.

2. Differentiate Monitors and Semaphores. (20 points)


Monitors is an abstract data type that used in a process of the synchronization that contains shared data
that allow to execute through the procedures. If other process tries to access, it will be blocked
Semaphores is a number of resources that present in a process. When a process is modifying the value
the OS will be distinguished. It has a wait() and signal() keys.

3. Differentiate Deadlock Prevention, Avoidance and Detection. (20 points)


deadlock prevention contains a resources that is made in the system that they are handled. it is also has
a four required conditions, the Mutual Exclusion, hold and wait, no preemption and circular wait. but it
can only prevent by one condition while the deadlock avoidance is to avoid deadlocks, the process must
tell OS the number of resources so that it can be complete its execution and there is no circular wait
condition and the deadlock detection is use to determining and identifying the deadlock. it is to check the
allocation for all possible if the system is in deadlock state. Example of it is in the intersection, if a 4 cars
intersect and no way, one will be back up in short give a way.
4. Differentiate Concurrency from Deadlock. (20 points)
concurrency is the computation of processes within a time frame to give an impression of simultaneous
execution. This is not the same thing as actually running simultaneously while the deadlock is a process or
thread enters a waiting state because a requested system resource is held by another waiting process,
which in turn is waiting for another resource held by another waiting process. If a process is unable to
change its state indefinitely because the resources requested by it are being used by another waiting
process, then the system is said to be in a deadlock. Example of deadlock is one ballpen 2 person. They
will write their name by one ballpen. That would be deadlock because no one is give up. in Concurrency
the example is the tool called adjustable, it has a many purposes.
CRITERIA PERFORMANCE INDICATORS POINTS
Provided pieces of evidence, supporting details,
Content 8
and factual scenarios
Grammar Used correct grammar, punctuation, spelling, and
4
capitalization.
Organization Expressed the points in clear and logical
4
of ideas arrangement of ideas in the paragraph
Format Adhered to the required style/appearance 4
Total 20

04 Quiz 1 *Property of STI


Page 1 of 1

You might also like