Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Base on Operating System. Please answer the question (5) perfectly Deadlock is a state when a set of blocked processes each holding a resource are

image text in transcribed

image text in transcribed

Base on Operating System. Please answer the question (5) perfectly

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. Q5. Given five memory partitions of 100Kb, 500Kb, 200Kb, 300Kb, 600Kb (in order), how would the first-fit, best-fit, and worst-fit algorithms place processes of 212 Kb, 417 Kb. 112 Kh, and 426 Kk (in order)? Which algorithm makes the most efficient use of memory? | Q6. Consider the following segment table: Process Base register Limit Register 0 219 600 2300 14 2 90 100 3 1327 580 4 1952 96 1 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

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Principles Programming And Performance

Authors: Patrick O'Neil

1st Edition

1558603921, 978-1558603929

More Books

Students also viewed these Databases questions

Question

What are the skills of management ?

Answered: 1 week ago