Memory Management: Algorithms and Techniques
Classified in Computers
Written on in
English with a size of 4.4 KB
Memory Management Problems and Solutions
Deadlock Scenario
A system has four processes and five allocable resources. The current allocation and maximum needs are as follows:
What is the smallest value of x for which this is a safe state?
The needs matrix is as follows:
- 0 1 0 0 1
- 0 2 1 0 0
- 1 0 3 0 0
- 0 0 1 1 1
If x is 0, we have a deadlock immediately. If x is 1, process D can run to completion. When D is finished, the available vector is 1 1 2 2 1. Now, A has ‘10211’ and ‘11221’ is available which together satisfies maximum need. So, A is finished and now ‘2 1 4 3 2’ is available, which can satisfy C. Once C is done, the available resources are 3 2 4 4 2, which can help B finish. So, x =1 will do.
Memory Compaction
A swapping system eliminates... Continue reading "Memory Management: Algorithms and Techniques" »