Wednesday, November 20, 2019

Operating System Concepts Assignment Example | Topics and Well Written Essays - 1000 words

Operating System Concepts - Assignment Example 2. Methods and Object Synchronization (mutual exclusion): One process should be able to use only one resource at a time. The request by another process should be delayed until the resource has been released. 3. Deadlock prevention: Deadlock can be prevented by using different schemes or by avoiding the necessary conditions (mutual exclusion, hold and wait, no preemption and circular wait (Stalling, 274)) which hold true for it. The different schemes are: 2. (20 points) Given that the first three necessary conditions for a deadlock are in place, provide detailed comments on the feasibility of the following strategy and the potential outcomes based upon its application. All processes are given unique priorities. When more than one process is waiting for a resource and the resource becomes available, allocate the resource to the waiting process with the highest priority. Now, in the given scenario all processes have their unique priority. Let us assume there are two resources R1 and R2 and process P1 has higher property than P2. Consider P1 holds R1 and P2 holds R2 and P2 is requesting for R1. Now, if P1 requests for R2 it will not get the resource even if it has the higher priority, because resources are not preemptive. So deadlock is still possible in this condition. There exists one CPU in this system, which may run one program at a time. Should information be allowed to move from any level to any level or should transfers only occur from adjacent levels? Explain in detail.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.