Homework 07: Chapter 07 Questions
Due: Thursday, March 1th by 5:59 PM
Assignment ID: hwk07
Header
Please put the following at the top of a flat text file, hwk07.txt:- Your name
- CSCI 3250
- hwk07
- Date
Homework Questions
Write the answers to the following questions in hwk07.txt:- Is it possible to have a deadlock involving only a single process? Explain.
- Exercise 7.11
- Given the following resource allocation graph:
is this system in an unsafe state? If so, what is at least one thing that could be changed to make it be in a safe state? If not, what event(s) would be necessary for it to be in an unsafe state? - What are the two main questions to be addressed when determining how often a detection algorithm should be run?
- Once deadlock has be detected, explain what possible remedies exist and the consequences of each.
- In a real computer system, neither the resources available nor the demands of processes for resources are consistent over long periods (months). Resources break or are replaced, new processes come and go, new resources are bought and added to the system. If deadlock is controlled by the banker's algorithm, which of the following changes can be made safely (without introducing the possibility of deadlock), and under what circumstances?
- Increase Available (new resources added)
- Decrease Available (resource permanently removed from system)
- Increase Max for one process (the process needs more resources than allowed, it may want more)
- Decrease Max for one process (the process decides it does not need that many resources)
- Increase the number of processes
- Decrease the number of processes
- Consider the following snapshot of a system:
Allocation Max Need Available ABCD ABCD ABCD ABCD P0 0012 0012 1520 P1 1000 1750 P2 1354 2356 P3 0632 0652 P4 0014 0656
Answer the following questions using the banker's algorithm:- What is the content of the matrix Need?
- Is the system in a safe state?
- If a request from process P1 arrives for (0,4,2,0), can the request be granted immediately?
Submission
Submit hwk07.txt using the handin program. For example, for this homework, type the following in a terminal exactly as it appears:handin hwk07 hwk07.txt
Alternatively, you can submit the assignment from