Answered step by step
Verified Expert Solution
Question
1 Approved Answer
operating system need done fast by professionals 1. (25 points ) Suppose we use the Banker's Algorithm to avoid deadlock. Consider a system that has
operating system need done fast by professionals
1. (25 points ) Suppose we use the Banker's Algorithm to avoid deadlock. Consider a system that has 5 processes P, P2, Ps, Ps, Ps and four types of resources a, b, c and d; it has 6 units of a, 3 units of b, 4 units of c, 2 units of d. The matrix EXISTINGI denotes the existing resource units and is always (5 3 4 2). AVAILABLED denotes the units available for allocation; ALLOCATEDU denotes the units that have been allocated to the processes; NEEDI denotes the units that may still be needed by the processes to complete the tasks. Suppose at a certain state the matrices are as shown below. EXISTING (5 3 42) 0 10 1 P2 ALLOCATED 1 01 0 P3 1 1 0 0P 1 010 P NEED 2 0 10 1 1 0 0 a) What is the AVAILABLE matrix? b) Is the system in a safe state? Why? c) If P4 makes a request of (0 1 0 0), should the system grant the request? (If not, what should the system do?) You must show your steps clearly to prove that your answer is correct! 2. (25 points ) Five batch jobs A through D arrive at a computer center in the order A to D at almost the same time. They have estimated running times of 6, 5, 1, and 2 time units. Their (externally determined) priorities are 3, 5, 2, and 1, respectively, with 5 being the highest priority. For each of the following scheduling algorithms, determine the mean process waiting time. Ignore process switching overhead. Draw Gnatt charts to show your steps. (a) Round Robin (assume quantum-1) (b) Priority scheduling (c) First-come first-served (d) Shortest job first For (a), assume that the system is multitasking, and that each job gets its fair share of the CPU; job B, which has the highest priority is started first. For (b) through (d) assume that only one job at a time runs, until it finishes. All jobs are completely CPU bound. 3. (25 points) A UNIX i-node system has 1 KB blocks. Assume that each pointer takes up four bytes. What is the maximum file size that can be accessed using each of the following methods? Show your steps. (Assume that there are 12 pointers pointing to 12 data blocks direct blocks accessing method.) a) direct blocks b) single indirect c) doulbe indirect d) triple indirectStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started