Introduction To Operating Systems NPTEL Week 7 Assignment
These are solution for Introduction To Operating Systems NPTEL Week 7 Assignment
Course Name: Introduction To Operating Systems
Link of course: Click here

Consider a system with the above resource allocation. Answer the question 1 and 2 based on this graph.
Q1) The safe sequence of execution for the process in the above figure is
a. p3, p1, p2, p4
b. p2, p1, p4, p3
c. p3, p1, p4, p2
d. Deadlock occurs
Answer: b. p2, p1, p4, p3
Q2) Consider a situation with the dining philosopher’s problem having n philosophers. What is the minimum number of forks required to prevent a deadlock?
a. n-1
b. n
c. n+1
d. 2n
Answer: c. n+1
A system has 5 process and 3 resources (A, B, C). The maximum count of resources are (10, 5, 7). Consider the following table of resource allocation.

Q3) The above allocation result in unsafe state of the process.
a. True
b. False
Answer: b. False
These are solution for Introduction To Operating Systems NPTEL Week 7 Assignment
Q4) Consider P1 has made a request of (1,0,2), then what will be a safe sequence?
a. P1, P2, P3, P4, P0
b. P1, P3, P0, P4, P2
c. P1, P3, P4, P0, P2
d. Unsafe sequence
Answer: c. P1, P3, P4, P0, P2
Q5) Consider a system with 6 processes, where each process needs 2 copies of Resource R. The maximum units of R required to cause deadlock is _________.
Answer: 6
Q6) Consider a system with 6 processes, where each process needs 2 copies of Resource R.The minimum units of R for deadlock free is ________.
Answer: 7
These are solution for Introduction To Operating Systems NPTEL Week 7 Assignment
Each process Pi where i = 1 … 9 is given as follows
pi: Repeat p10 : Repeat
P(Mutex) V(Mutex)
// Critical section //critical section
V(mutex) V(mutex)
Q7) What is the largest number of processes that can be inside the critical section
a. 10
b. 0
c. 3
d. None of these
Answer: a. 10
Q8) Consider a system has 3 process P1, P2, and P3. Process P1 needs 11 units of resource R; Process P2 needs 21 units of R and Process P3 needs 16 unit of R. What is the maximum unit of resource R that leads to deadlock?
Answer: 45
Q9) Which of the following is false about User User threads?
a. User threads can switch fast since it does involve kernel.
b. User threads are lightweight since they do not require system calls.
c. Kernel is not aware of the behavior of every user threads i.e. if it is blocking or runnable.
d. None of these
Answer: d. None of these
These are solution for Introduction To Operating Systems NPTEL Week 7 Assignment
Q10) Suppose we want to synchronize two concurrent processes P and Q using binary semaphores S and T.
Synchronization statements can be inserted only at points W,X,Y,Z. Which of the following can lead to an output starting with ‘00110011’?
a. W : P(S) X : V(S) Y : P(T) Z : V(T) and initially S = T = 1
b. W : P(S) X : V(T) Y : P(T) Z : V(S) and initially S = 1 and T=0
c. W : P(S) X : V(T) Y : P(T) Z : V(S) and initially S = T = 1
d. W : P(S) X : V(S) Y : P(T) Z : V(T) and initially S = 1 and T = 0
Answer: b. W : P(S) X : V(T) Y : P(T) Z : V(S) and initially S = 1 and T=0
These are solution for Introduction To Operating Systems NPTEL Week 7 Assignment
All weeks of Introduction To Operating Systems: https://progies.in/answers/nptel/introduction-to-operating-systems
More NPTEL Solutions: https://progies.in/answers/nptel
* The material and content uploaded on this website are for general information and reference purposes only. Please do it by your own first. COPYING MATERIALS IS STRICTLY PROHIBITED.