Sei sulla pagina 1di 26

ITE 250

OS quiz # 4
Instructions:
• Write T if the statement is true and F if the
statement is false.
• Strictly no Erasures!!! Erasures = 0 point
• Trust yourself do not trust the answer of your
seatmate.
READY???
1.

• Race condition happens when


several processes access and
manipulate the same data
concurrently, outcome
depends on which order each
access takes place.
2.
• To solve critical section
problem each process must
ask permission to enter critical
section in entry section.
3.

• Peterson’s solutions is the


combinations of mutual
exclusion and semaphores.
4.

• Semaphore is a
synchronization tool that
requires busy waiting.
5.

• Deadlock happens when two


or more processes are
waiting indefinitely for a
priority queue that can be
caused by only one of the
waiting processes.
6.

• Starvation is indefinite
blocking. In which a process
may never be removed from
the semaphore queue in which
it is suspended.
7.

• Readers and writers


problem is commonly
found in databases like
online reservation and file
systems.
8.

• The main complexity of


bounded buffer problem is
that it must maintain the
count for producer the
number of empty and full
containers that are available.
9.

• Process Synchronization
was introduced to handle
problems that arose in
multiple threaded process
executions.
10.

• A Critical Section is a priority


technique arrange processes
that may accesses shared
variables and has to be
executed as an atomic action.
11.

• Starvation can be solved


using a technique called
mutual exclusion.
12.

• In readers writers problem.


The reader and the writer
may execute in the
database at the same time.
13.

• In bounded buffer problem.


The consumer will eat
resources until it is full which
results to deadlock.
14.

• In readers-writers Problem it
allows multiple readers to
read at the same time. Only
one single writer can access
the shared data at the same
time
15.

• In dining-philosophers problem
a philosopher needs both the
fork on his left and on his right
to eat. The forks are shared
with the neighbors on either
side.
16.

• In sleeping barber problem


the barber it is like a server
where it sleeps when it has
no client to serve to.
17.

• Starvation can occur in


sleeping barber problem.
18.

• In cigarette smoker
problem the smoker will
gather the resources in
order it could smoke.
19.

• In cigarette smoker
problem, the smokers
represent as processes and
the agent serves as
operating system.
20.

• The readers-writers
problem is often generally
thought of as a client-
server relationship.
Exchange papers

Write corrected by:


Answers
1. T 11. T
2. T 12. F
3. F 13. F
4. F 14. T
5. F 15. T
6. T 16. T
7. T 17. T
8. F 18. F
9. F 19. T
10. F 20. F