Answered step by step
Verified Expert Solution
Question
1 Approved Answer
The concept from Operating System. There are only 2 questions; please answer them all. don't do a partial answer. Thanks. Deadlock is a state when
The concept from Operating System.
There are only 2 questions; please answer them all. don't do a partial answer. Thanks.
Deadlock is a state when a set of blocked processes each holding a resource are waiting to acquire a resource held by another process in the set. Deadlock can arise if the following four conditions hold simultaneously: Mutual exclusion: only one process at a time can use a resource. Hold and wait: a process holding at least one resource is waiting to acquire additional resources held by other processes. No pre-emption: a resource can be released only voluntarily by the process holding it, after that process has completed its task. Circular wait: there exists a set {P1, P2, ..., Pn} of waiting processes such that P1 is waiting for a resource that is held by P2, P2 is waiting for a resource that is held by P3, ..., Pn-1 is waiting for a resource that is held by Pn, and Pn is waiting for a resource that is held by P1. There are 4 choices for handling deadlocks: Choice #1: Ensure that the system will never enter a deadlock state 1. Deadlock Prevention - ensure that the system will never enter a deadlock state 2. Deadlock Avoidance - maintain the safe state by having the information about the maximum number of resources of each type it may need Choice #2: Allow the system to enter a deadlock state and then recover 1. Deadlock Detection 2. Deadlock Recovery a. Process Termination -Abort all deadlocked processes, or abort one deadlocked process at a time until every deadlock cycle is eliminated. May depend upon the priority of the process or process age and remaining time or resources the process has used or resources the process needs to complete or number of processes will need to terminated or the process are interactive or batch? b. Resource Pre-emption by selecting a victim or Rollback by return to some safe state, ie, restart the current process Choice #3: Ignore and don't care Resources may be a single instance or multiple instances. Resource allocation and wait for graph occurs for single instances generally and banker's algorithm works for multiple instances. 1 Q6. Consider the following segment table: Process Base register Limit Register 0 219 600 1 2300 14 2 90 100 3 1327 580 4 1952 96 Are the following logical addresses possible for each process? If yes, what will be the corresponding physical addresses for each process with its logical address written after comma? a. 0,430 b. 1,10 c. 2,500 d. 3,400 e. 4,112 Q7. Suppose that we have free segments with sizes: 6, 17, 25, 14, and 19. Place a program with size 13kB in the free segment using first-fit, best-fit and worst fitStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started