Answered step by step
Verified Expert Solution
Question
1 Approved Answer
i) In the code below, three processes are competing for six resources labeled A to F. a. Using a resource allocation graph, show the
i) In the code below, three processes are competing for six resources labeled A to F. a. Using a resource allocation graph, show the possibility of a deadlock in this implementation. b. Modify the order of some of the get requests to prevent the possibility of any deadlock. You cannot move requests across procedures, only change the order inside each procedure. Use a resource allocation graph to justify you answer. Vid Po Void Po Ved Po ( C ( While(true) While (true) While(true) ( A D (C) pr tet(11), //critical regions://critical region://critical region //use A,B,C e D.E.B // C.F.D release (A) release(D) release(C): release (B release(K) release F release (C) release releas(D) > > } etisalat 12:19 PM Dr Henna 30810 ii) The two variables a and b have initial values of 1 and 2, respectively. The following code is for Linux system: Thread Thread2 mb() b-4c-b mmb(); What possible errors are avoided by the use of the memory barriers? (2Marks) @7 28% etisalat 12:19 PM Dr Henna 30810 Questions cover CLO6: L5 Question 2 5Marks i) Consider a fixed partitioning scheme with equal-size partitions of 2^16 bytes and a total main memory size of 2^24 bytes. A process table is maintained that includes a pointer to a partition for each resident process. How many bits are required for the pointer? (1 Marks) @7 28% etisalat Dr Henna 12:19 PM 30810 prywer van vi u avganvin un va a. 0,228 b. 2,648 c. 3,776 d. 1,98 (0.5*4=2Marks) iii) Consider a dynamic partitioning scheme. Show that, on average, the memory contains half as many holes as segments. (2Marks) 28%
Step by Step Solution
★★★★★
3.35 Rating (164 Votes )
There are 3 Steps involved in it
Step: 1
Answers 1 Part i a When the resources C and F are locked by process P2 and waiting for D to complete the process The process PO locked resources A and ...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