1. Exercise 7.14 on page 342 (Exercise 7.6 on page 300 for version 7). 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 bankers 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

2. Exercise 7.17 on page 343 (Exercise 7.12 on page 301 for version 7). Consider the following snap shot of a system:

Allocation Max Available
A B C D A B C D A B C D
P0 0 0 1 2 0 0 1 2 1 5 2 0
P1 1 0 0 0 1 7 5 0
P2 1 3 5 4 2 3 5 6
P3 0 6 3 2 0 6 5 2
P4 0 0 1 4 0 6 5 6

Answer the following questions using the bankers 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?

3. Exercise 8.11 on page 388 (Exercise 8.3 on page 342 for version 7). Given five memory partitions of 100 KB, 500 KB, 200KB, 300 KB, an d600 KB (in order), how would each of the first-fit, best-fit, and worst-fit algorithms place processes of 212 KB, 417 KB, 112 KB, and 426 KB (in order)? Which algorithm makes the most efficient use of memory?

4. Exercise 8.23 on page 390 (Exercise 8.12 on page 344 for version 7). Consider the following segment table

Segment Base Length
0 219 600
1 2300 14
2 90 100
3 1327 580
4 1952 96

What are the physical addresses for the following logical addresses?

  • 0, 430
  • 1, 10
  • 2,500
  • 3, 400
  • 4,112
Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.