DOC PREVIEW
UNO CSCI 4500 - Study Guide

This preview shows page 1-2-3-4-5 out of 15 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 15 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 15 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 15 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 15 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 15 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 15 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

CSCI 4500/8506 Page 1 Quiz 4 Practice QuestionsCSCI 4500/8506 – Fall 2011Sample Questions for Quiz 4(covers modules 7 and 8)1. Deadlock occurs when each process in a set of processesa. is waiting for an event (or exclusive-use resource) that only another process can cause(or release).b. terminates without closing all of the files it had open.c. is waiting on the same resource, and that resource is being exclusively used by anotherprocess.2. Which of the following resources is not one which can result in deadlocking processes?a. the central processor (CPU)b. a semaphorec. a disk file3. Which of the following is an example of a consumable resource?a. a memory regionb. an I/O devicec. a message sent through some sort of channel4. Which of the following is an example of a non-consumable resource?a. a signalb. a message sent through some sort of channelc. a memory region5. Which of the following resources is considered preemptible by many operating systems?a. primary memoryb. displaysc. All of the above resources are usually considered preemptible by many operatingsystems.6. What usually happens to a process if a resource it is using is preempted?a. The process is blocked until the resource is restored.b. The process is terminated abnormally.c. None of the other answer choices is correct.7. What is the state of a resource that is restored to a process from which it was previouslypreempted?a. The resource will have exactly the same state as when it was previously preempted.b. The resource will be set to a standard initial state.c. None of the other answer choices is correct.CSCI 4500/8506 Page 2 Quiz 4 Practice Questions8. Suppose a process requests a shared lock on a resource, and another process already holds ashared lock. What will happen?a. the process will not be granted the shared lock, but will be given an indication that theshared lock was not granted; that is, the process will not be blocked.b. the process will be granted the shared lock.c. None of the other answer choices is correct.9. There are four necessary conditions required for deadlock. Who first demonstrated theseconditions?a. Petersonb. Dekkerc. Coffman10. Which of the following is not a necessary condition for deadlock?a. at least three processesb. hold and waitc. circular wait11. What is meant by the hold and wait condition?a. Processes are allowed to continue holding (for exclusive use) resources while waiting(blocking) for additional resources.b. Processes must not hold any units of a resource if they want to obtain some units of theresource.c. None of the other answer choices is correct.12. What is meant by the no preemption condition?a. None of the resources held by processes can be preempted from those processes.b. No processes may preempt the use of the CPU by another other processes.c. None of the other answer choices is correct.13. A resource graph has two types of nodes. What do these nodes represent?a. resources and processesb. semaphores and processesc. blocked processes and ready processes14. Assume we have a resource graph that represents a deadlocked state. Also assume we startfrom a node associated with a deadlocked process and follow directed edges. Which of thefollowing nodes can we always reach in this edge-following?a. the node from which we startedb. a node associated with a consumable resourcec. a node associated with an unblocked processCSCI 4500/8506 Page 3 Quiz 4 Practice Questions15. Consider a given resource graph. Where can we find the nodes for the processes that aredeadlocked?a. They include each process node with no edges pointing to it or away from it.b. They are the process nodes in the cycle (or cycles) in the graph, if any.c. They include each process node with at least one edge pointing to it and at least one edgepointing away from it.16. What characterizes the algorithm Tanenbaum calls the ostrich algorithm?a. The algorithm searches for process nodes with two incoming edges and one outgoingedge.b. It basically means we do nothing, ignoring the possibility of deadlock.c. None of the other answer choices is correct.17. Why might the ostrich algorithm be chosen for a system?a. The system was designed to be deadlock free, or the probability of deadlock is so smallas to not justify the overhead of one of the other algorithms to deal with deadlock.b. The algorithm runs very efficiently and detects about 66 percent of the cases that lead todeadlock.c. None of the other answer choices is correct.18. The detect and recover approach to dealing with deadlock obviously requires that we detectwhen deadlock has occurred, and then recover from it. How may the recovery from deadlockbe performed?a. Terminate processes in the same order they were started until the deadlock disappears.b. Identify a deadlocked process and then terminate it, releasing the resources to which ithad exclusive use.c. None of the other answer choices is correct.19. The detect and recover approach to dealing with deadlock obviously requires that we detectwhen deadlock has occurred, and then recover from it. Which of the following approachesmay be used to detect deadlocked processes without constructing a resource graph andchecking for cycles?a. Find processes that have remained blocked for a considerable period of time.b. Find processes that are using a great deal of CPU time.c. Find processes that have not produced any output for a considerable period of time.20. What is done when the technique called checkpointing is used?a. Each process periodically makes a system call to inform the system that it is makingprogress. If it fails to make the call within a specified period, the system assumes theprocess is deadlocked and terminates it.b. All information about a running process is periodically recorded and saved so it can beused to restore the process from the saved checkpoint later if desired.c. None of the other answer choices is correct.CSCI 4500/8506 Page 4 Quiz 4 Practice Questions21. What is the essence of techniques used to prevent deadlock?a. They restrict a process from acquiring exclusive use of any additional resources until itreleases exclusive use of all the resources it currently holds.b. They deny, or prevent, the occurrence of one (or more) of the necessary conditions fordeadlock.c. None of the other answer choices is correct.22. To eliminate the need for exclusive use of a resourcea. the resource must be replicated a sufficient number of times, one per process.b. techniques must be used to allow the


View Full Document

UNO CSCI 4500 - Study Guide

Download Study Guide
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Study Guide and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Study Guide 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?