Question: a,b,c 12. Although deadlock is a real problem, it is often ignored during the design of the operating system due to the inefficiencies which deadlock
a,b,c
12. Although deadlock is a real problem, it is often ignored during the design of the operating system due to the inefficiencies which deadlock prevention and/or deadlock detection introduce One approach to reduce the overhead is to group resources into multiple classes, use a total ordering among these classes, and use a technique tailored to the class for resource allocation within that class. For example, four reasonable classes may be (1) swap space, (2) process resources such as files, tape drives, etc. (3) main memory, (4) internal resources such as communication channels among processes (a) (4) Is the sequence C1:R2, C1:R1, C3:R5, C1:R4, C4:R1 allowed (assuming that in Cx, the 'x' refers to the class number and Rx is a resource in that class as described above, and that once the resource is held, it is held for the duration of the process execution)? Is the sequence C1:R2, C1:R1, C2:R3, C4:R7 allowed? What general statement can be made about 4the required ordering of resource acquisitions within a process? Is the above ordering of resource classes reasonable to expect of processes? Why or why not? (b) (3) Thinking about main memory as a resource is interesting, because much of the time, main memory can be preempted from the process it is allocated to. In most systems, what happens when a process' memory is preempted? Why is preemption not typically an option for other resource types (such as a file or tape drive) for handling deadlock recovery? (c) (3) If we want to use the banker's algorithm for handing the swap space, what information must be provided by every process before it can be allocated swap space? What can the operating system do with a running process that requests swap space when the banker's algorithm rejects the allocation as a potential deadlock situation? 12. Although deadlock is a real problem, it is often ignored during the design of the operating system due to the inefficiencies which deadlock prevention and/or deadlock detection introduce One approach to reduce the overhead is to group resources into multiple classes, use a total ordering among these classes, and use a technique tailored to the class for resource allocation within that class. For example, four reasonable classes may be (1) swap space, (2) process resources such as files, tape drives, etc. (3) main memory, (4) internal resources such as communication channels among processes (a) (4) Is the sequence C1:R2, C1:R1, C3:R5, C1:R4, C4:R1 allowed (assuming that in Cx, the 'x' refers to the class number and Rx is a resource in that class as described above, and that once the resource is held, it is held for the duration of the process execution)? Is the sequence C1:R2, C1:R1, C2:R3, C4:R7 allowed? What general statement can be made about 4the required ordering of resource acquisitions within a process? Is the above ordering of resource classes reasonable to expect of processes? Why or why not? (b) (3) Thinking about main memory as a resource is interesting, because much of the time, main memory can be preempted from the process it is allocated to. In most systems, what happens when a process' memory is preempted? Why is preemption not typically an option for other resource types (such as a file or tape drive) for handling deadlock recovery? (c) (3) If we want to use the banker's algorithm for handing the swap space, what information must be provided by every process before it can be allocated swap space? What can the operating system do with a running process that requests swap space when the banker's algorithm rejects the allocation as a potential deadlock situation
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
