Platform 2
Platform 2
designs?
What are the requirements for a facility or capability 1. Only one process at a time is allowed into its
to provide support for mutual exclusion? critical section, among all processes that have
critical sections for the same resource or shared
object. 2. A process that halts in its noncritical
section must do so without interfering with other
processes. 3. No deadlock of starvation. Processes
requiring access to a critical section must not be
delayed indefinitely. 4. When no process is in a
critical section, any process that requests entry to
its critical section must be permitted to enter without
delay. 5. No assumptions must be made about the
relative process speeds or number of processors. 6.
A process shall remain inside the critical section for
a finite time only.
What are the important terminologies related to Atomic operation, critical section, race condition,
concurrency? and starvation.
What is cooperation by sharing in process Processes indirectly aware of each other, involving
interaction? processes that are not necessarily aware of each
other by their respective process identifications but
share access to some objects.
What are some potential control problems in Mutual exclusion, deadlock, starvation, and data
process interaction set-up? coherence.
What is cooperation by communication? Processes that are able to communicate with each
other by process identification and that are
designed to work jointly on some activity.
What are some OS concerns raised by the Keeping track of various processes, allocating and
existence of concurrency? deallocating different resources for each active
process, protecting the data and physical resources
of each process against unintended interference by
other processes, and ensuring that the operation of
a process and its output are independent of the
speed at which its execution is carried out relative to
the speed of other concurrent processes.
What is a counting semaphore? An integer value used for signaling processes, with
only three operations that can be performed on it:
initialize, decrement, and increment.
What is a binary semaphore? A semaphore that only takes the values zero (0)
and one (1).
What is a mutual exclusion (mutex) lock? A mechanism similar to a binary semaphore, but the
process that locks the mutex must be the one to
unlock it, and only the holder of the lock can
operate.
What is a condition variable? A data type used to block a process or a thread until
a specific condition is true.
What are the general resource categories? Reusable resources and consumable resources.
What is an example of a deadlock involving Two programs that compete for exclusive access to
reusable resources? a disk file and a tape drive, with each process
holding one resource and requesting the other.
What are consumable resources? Resources that can be created and destroyed, with
an unblocked producing process able to create any
number of resources, and when a resource is
acquired by a consuming process, the resource
ceases to exist.
What is an example of a deadlock involving A pair of processes in which each process attempts
consumable resources? to receive a message from the other.
What is the resource allocation graph? A directed graph that depicts the state of system
resource processes, wherein processes and
resources are represented by nodes connected by
edges.
What does an edge directed from a process to a A resource that has been requested by the process
resource indicate in a resource allocation graph? but not yet granted.
What does a dot within the resource node represent An instance of a resource.
in a resource allocation graph?
What is the necessary condition for a deadlock to Mutual exclusion, hold and wait, and no preemption.
occur?
What is circular wait? A closed chain of threads exists, such that each
thread holds at least one resource needed by the
next thread in the chain.
What is deadlock prevention? A strategy that disallows one of the four conditions
for deadlock occurrence by designing a system in
such a way that the possibility of deadlock is
excluded.
What is the indirect method of deadlock prevention? It prevents the first three conditions of deadlock
occurrence. Mutual exclusion cannot be disallowed,
but hold and wait can be prevented by requiring a
process to request all of its required resources at
once and blocking the process until all resources
can be granted simultaneously. No preemption can
be prevented by denying further requests, releasing
currently held resources, requesting again with
additional resources if necessary, or letting go of
other resources to proceed with other process
execution.
What is the direct method of deadlock prevention? It prevents the occurrence of the fourth condition of
deadlock occurrence by defining a linear ordering of
resource types to prevent circular wait.
What is deadlock avoidance? A strategy that does not grant a resource request if
the allocation might lead to a deadlock condition,
allowing more concurrency. Decisions are made
dynamically, and knowledge of future process
resource requests must be known.
What are the two approaches of deadlock Process initiation denial and resource allocation
avoidance? denial.
What are the restrictions in implementing the The maximum resource requirement for each
deadlock avoidance strategy? process must be stated in advance, the processes
under consideration must be unconstrained by any
synchronization requirements, there must be a fixed
number of resources to allocate, and no process
may exit while holding resources.
What are the recovery methods for deadlock Aborting all deadlock processes, backing up each
detection? deadlocked process to some previously defined
checkpoint and restarting all processes,
successively aborting deadlocked processes until
deadlock no longer exists, or successively
preempting resources until deadlock no longer
exists.
What are the selection criteria in successively Process with the least amount of processor time
aborting deadlocked processes or preempting consumed so far, process with least amount of
resources? output produced so far, process with the most
estimated remaining time, process with the least
total of resources allocated so far, or process with
the lowest priority.
What is the book reference for this information? Silberschatz, A., Galvin, P. & Gagne, G. (2018).
Operating systems concepts (10th ed.). John Wiley
& Sons, Inc.