Introduction to Operating Systems Week 7 NPTEL Assignment Answers 2025

Need help with this week’s assignment? Get detailed and trusted solutions for Introduction to Operating Systems Week 7 NPTEL Assignment Answers. Our expert-curated answers help you solve your assignments faster while deepening your conceptual clarity.

✅ Subject: Introduction to Operating Systems
📅 Week: 7
🎯 Session: NPTEL 2025 July-October
🔗 Course Link: Click Here
🔍 Reliability: Verified and expert-reviewed answers
📌 Trusted By: 5000+ Students

For complete and in-depth solutions to all weekly assignments, check out 👉 NPTEL Introduction to Operating Systems Week 7 NPTEL Assignment Answers

🚀 Stay ahead in your NPTEL journey with fresh, updated solutions every week!

NPTEL Introduction to Operating Systems Week 7 Assignment Answers 2025

1. State true or false.

A program to compute the sum of first 10,000 numbers can be divided into 4 sub parts and executed on 4 CPUs using either fork or threads. The reason why we prefer threads is because large portions of the data/code between the 4 sub-parts are very similar and need not be duplicated.

  • true
  • false
Answer : See Answers

2. Which of the following is false about User threads?

  • User threads can switch fast since it does not involve kernel
  • User threads are lightweight since they do not require system calls
  • Kernel is not aware of the behavior of every user threads i.e. if it is blocking or runnable
  • None of these
Answer :

3. Suppose we want to synchronize two concurrent process P and Q using binary semaphore S and T.

Process P: Process Q:
while(1){ while(1){
W: Y:
print ‘0’; print ‘1’;
print ‘0’; print ‘1’;
X: Z:
}

Synchronization statements can be inserted only at points W,X,Y,Z. Which of the following can lead to an output starting with ‘00110011’ ?

  • W : P(S) X : V(S) Y : P(T) Z: V(T) and initially S = T= 1
  • W : P(S) X : V(T) Y : P(T) Z: V(S) and initially S = 1 and T= 0
  • W : P(S) X : V(T) Y : P(T) Z: V(S) and initially S = T= 1
  • W : P(S) X : V(S) Y : P(T) Z: V(T) and initially S = 1 and T= 0
Answer :

4. 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)

What is the largest number of process that can be inside the critical section

  • 1
  • 2
  • 3
  • None of these
Answer :

5. Which of the following is not valid for deadlock prevention scheme?

  • Release all resource before requesting a new resource
  • Number all resources uniquely and never request a lower numbered resource than the last one requested
  • Never request a resource after releasing any resource
  • Request and allocate all required resource before execution
Answer :

6. An OS implements a policy that requires a process to release all resources before making a request for another resource. Which of the following is true based on above statement?

  • Both starvation and deadlock can occur
  • Starvation can occur but deadlock cannot occur
  • Starvation cannot occur, but deadlock can occur
  • Neither starvation nor deadlock occur
Answer : See Answers

7. Consider a situation with the dining philosopher’s problem having 5 philosophers. What is the minimum number of forks required to prevent a deadlock?

  • 5
  • 6
  • 10
  • None of these
Answer :

8. State True/False

In dining philosopher problem (with N philosophers), all the even numbered philosophers takes the left fork first and then the right fork and all the odd numbered philosopher takes the right fork first and then the left fork. This arrangement will prevent deadlock.

  • True
  • False
Answer :

9. State true or false.

        a. Deadlock detection is possible using the allocation and request matrices alone.
        b. A way to recover from deadlock is to take away the resource from one of the processes or to kill the process itself.
        c. Banker’s algorithm is used to detect deadlocks by analyzing the unsafe states.
  • True, True, False
  • False, True, True
  • True, False, True
  • False, True, False
Answer :

10. Which one of the following is FALSE?

  • User level threads are not scheduled by the kernel
  • When a user level thread is blocked, all other threads of its process are blocked
  • Context switching between user level threads is faster than context switching between kernel level threads
  • Kernel level threads cannot share the code segment
Answer : See Answers

11. Consider a system has 3 process P1, P2, P3. Process P1 needs 20 units of resource R, P2 needs 15 units of R and P3 needs 5 unit of R. What is the maximum unit of resource R that leads to deadlock?

  • 3
  • 20
  • 35
  • 37
Answer :

12. 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.

State True/False

The above resource allocation leads to deadlock
  • True
  • False
Answer :

13. Which one these is a safe sequence in Question 13?

  • P1, P3, P4 , P0, P2 only
  • P2, P4, P3, P1, P0 only
  • Both a and b
  • None are safe sequences
Answer :

14. In a non-multiprogramming OS, a deadlock could occur

  • When two processes share the same resource
  • Can never happen
  • When two processes run at the same time, waiting for resources held by each other
  • When an interrupt occurs
Answer :  See Answers