Professional Documents
Culture Documents
1. List four design issues for which the concept of concurrency is relevant
a. Communication among process
b. Sharing of and competing for resources
c. Synchronization of the activities of multiple processes
d. Allocation of processor time to processes
3. List three degrees of awareness between processes and briefly define each
a. Processes unaware of each other
i. These are independent processes that are not intended to work together
b. Processes indirectly aware of each other
i. These are processes that are not necessarily aware of each other by their
respective process IDs, but that share access to some object, such as an I/O
buffer
c. Process directly aware of each other
i. These are processes that are able to communicate with each other by process ID
and which are designed to work jointly on some activity
5. List the THREE control problems associated with competing processes and briefly define each
a. Mutual exclusion – competing processes can only access a resource that both wish to
access one at a time; mutual exclusion mechanisms must enforce
this one at a time policy
b. Deadlock – if competing processes need exclusive access to more than one resource
then deadlock can occur if each processes gained control of one resource
and is waiting for the other resource.
c. Starvation – one of a set of competing processes may be indefinitely denied access to a
needed resource because other members of the set are monopolizing that
resource.
P (Semaphore S) { V (Semaphore S) {
S = s – 1; S = s + 1;
If (s < 0) { If (s >= 0) {
// add process to queue // remove process p from queue
block (); wakeup(p);
} }
} }
10. What conditions are generally associated with the readers/ writers problems?
a. Any number of readers may simultaneously read the file
b. Only one writer at a time may write to the file
c. If a writer is writing to the file, no reader may read it and vice versa