Question 1: Banker Algorithm
A Banker algorithm is deadlock avoidance algorithm used for resource allocation. In the following example, there are five processes, P1, P2, P3, P4, P5 and three resource types A (with 10 instances),
B (with 5 instances) and C (with 7 instances). The Available, Allocation and MAX matrices are given as:
a. Page replacement algorithm decide which memory pages to page out when a page of memory needs to be allocated. And it happens when a page fault occurs, and a free page cannot be used to satisfy the allocation. Based on this statement, explain the different page replacement algorithms and how are they different from each other. What are the advantages and disadvantages of using those algorithms?
b. Given a page reference string: 1 2 3 4 2 1 5 6 2 1 2 3 7 6 3 2 1 2 3 6. If we consider the frame
size is 4. What is number of page faults in optimal page replacement algorithm?
Get Free Quote!
400 Experts Online