Deadlock Avoidance
· Requires a process to declare the maximum instances of each resource type needed
· Upon request, the system must determine whether the allocation will leave the system in a safe state
· Number of processes in the system { n}
· Number of resource classes { m}
· Data structures
_ available
_ A vector of length m
_ Number of available resources of each type
_ available[j] = k ) k instances of resource class Rj are available
_ maximum
_ An n _ m matrix
_ De_nes maximum demand for each process
_ maximum[i,j] = k ) process pi may request at most k instances of resource class Rj
_ allocation
_ An n* m matrix
_ Defines the number of resources of each type currently allocated to each process
_ allocation[i,j] = k ) process pi is currently allocated k instances of resource class Rj
_ need
_ An n _ m matrix
_ Indicates the remaining resource need of each process
_ need[i,j] =k process pi may need k more instances of resource type Rj in order to complete its task
_ need[i,j] = maximum[i,j] - allocation[i,j]
المادة المعروضة اعلاه هي مدخل الى المحاضرة المرفوعة بواسطة استاذ(ة) المادة . وقد تبدو لك غير متكاملة . حيث يضع استاذ المادة في بعض الاحيان فقط الجزء الاول من المحاضرة من اجل الاطلاع على ما ستقوم بتحميله لاحقا . في نظام التعليم الالكتروني نوفر هذه الخدمة لكي نبقيك على اطلاع حول محتوى الملف الذي ستقوم بتحميله .