Back to the 2023 paper
Similar questions
Operating SystemExplain the Producer-Consumer problem and discuss how semaphores can be used to solve it.20257mOPERATING SYSTEMClearly justify why deadlocks cannot arise in a bounded buffer producers-consumers system.20227mOperating SystemConsider a system with five processes P0 through P4 and have three resource types A, B, C. Resource type A has ten instances, resource type B has five instances, and resource type C has seven instances. Suppose that the following snapshot represents the current state of the system: | | Allocation | Max | Available | | :--- | :---: | :---: | :---: | | | A B C | A B C | A B C | | P0 | 0 1 0 | 7 5 3 | 3 3 2 | | P1 | 2 0 0 | 3 2 2 | | | P2 | 3 0 2 | 9 0 2 | | | P3 | 2 1 1 | 2 2 2 | | | P4 | 0 0 2 | 4 3 3 | | The system is currently in safe state. Suppose now that P1 requests additional resources as (A=1, B=0, C=2). Is this request can be immediately granted? Justify your answer.20237mOperating SystemConsider a system with five processes P0 through P4 and four resources type A, B, C and D. Using the Banker's algorithm answer that the system is in a safe state? | | 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 | |20247m
PreviousConsider a system with five processes P0 through P4 and have three resource types A, B, C. Resource type A has ten instances, resource type B has five instances, and resource type C has seven instances. Suppose that the following snapshot represents the current state of the system: | | Allocation | Max | Available | | :--- | :---: | :---: | :---: | | | A B C | A B C | A B C | | P0 | 0 1 0 | 7 5 3 | 3 3 2 | | P1 | 2 0 0 | 3 2 2 | | | P2 | 3 0 2 | 9 0 2 | | | P3 | 2 1 1 | 2 2 2 | | | P4 | 0 0 2 | 4 3 3 | | The system is currently in safe state. Suppose now that P1 requests additional resources as (A=1, B=0, C=2). Is this request can be immediately granted? Justify your answer.NextDiscuss critical section problem. Illustrate the classic software-based solution to this problem known as Peterson's solution.