Introduction to Operating System | NPTEL | Week 7 Answers

This set of MCQ(multiple choice questions) focuses on the Introduction to Operating System Week 7 Answers

You should practice these questions to improve fundamentals of Cyber security needed for various interviews (like company interview, campus interview, walk-in interview), entrance exams, placements and other competitive exams. All the questions in this particular section are based on only “Introduction to Operating System Week 7 Answers“.

Course layout

Week 1: Assignment solutions
Week 2:
Assignment solutions
Week 3:
Assignment solutions
Week 4: Assignment solutions

Week 5: Assignment Solutions
Week 6: Assignment solutions
Week 7: Assignment solutions
Week 8: Assignment solutions
Week 9: Assignment solutions
Week 10: Assignment solutions
Week 11: Assignment solutions
Week 12: Assignment solutions

NOTE: You can check your answer immediately by clicking show answer button. Moreover, this set of Introduction to Operating System Week 7 Answers” contains 10 questions.

Now, start attempting the quiz.

Introduction to Operating System Week 7 Answers

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

a) True
b) False

Answer: a) True

Introduction to Operating System Week 7 Answers

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

a) User threads can switch fast since it does not 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

Introduction to Operating System Week 7 Answers

Q3. Suppose we want to synchronize two concurrent process P and Q using binary semaphore 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)

Q4. Each process Pi where i = 1 … 9 is given as follows
What is the largest number of process that can be inside the critical section

a) 1
b) 2
c) 3
d) None of these

Answer: d) None of these

Introduction to Operating System Week 7 Answers

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

a) Release all resource before requesting a new resource
b) Number all resources uniquely and never request a lower numbered resource than the last one requested
c) Never request a resource after releasing any resource
d) Request and allocate all required resource before execution.

Answer: c) Never request a resource after releasing any resource

Q6. 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?

a) Both starvation and deadlock can occur
b) Starvation can occur but deadlock cannot occur
c) Starvation cannot occur, but deadlock can occur
d) Neither starvation nor deadlock occur.

Answer: b) Starvation can occur but deadlock cannot occur

Q7. State True/ False
The following resource allocation leads to deadlock

a) True
b) False

Answer: b) False

Introduction to Operating System Week 7 Answers

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

a) 5
b) 6
c) 10
d) None of these

Answer: b) 6

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

a) True
b) False

Answer: a) True

Q10. State true or false.

  1. Deadlock detection is possible using the allocation and request matrices alone.
  2. A way to recover from deadlock is to take away the resource from one of the processes or to kill the process itself.
  3. Banker’s algorithm is used to detect deadlocks by analyzing the unsafe states.

a) True, True, False
b) False, True, True
c) True, False, True
d) False, True, False

Answer: a) True, True, False

Introduction to Operating System Week 7 Answers

Q11. Which one of the following is FALSE?

a) User level threads are not scheduled by the kernel.
b) When a user level thread is blocked, all other threads of its process are blocked.
c) Context switching between user level threads is faster than context switching between kernel level threads.
d) Kernel level threads cannot share the code segment

Answer: d) Kernel level threads cannot share the code segment

Q12. 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?

a) 3
b) 20
c) 35
d) 37

Answer: d) 37

Introduction to Operating System Week 7 Answers

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

a) True
b) False

Answer: b) False

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

a) P1, P3, P4 , P0, P2 only
b) P2, P4, P3, P1, P0 only
c) Both a and b
d) None are safe sequences

Answer: a) P1, P3, P4 , P0, P2 only

Introduction to Operating System Week 7 Answers

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

a) When two processes share the same resource
b) Can never happen
c) When two processes run at the same time, waiting for resources held by each other
d) When an interrupt occurs

Answer: b) Can never happen

Introduction to Operating System Week 7 Answers

<< Prev- Introduction to Operating System Week 6 Assignment Solutions

>> Next- Introduction to Operating System Week 8 Assignment Solutions

DISCLAIMER: Use these answers only for the reference purpose. Quizermania doesn't claim these answers to be 100% correct. So, make sure you submit your assignments on the basis of your knowledge.

Programming in Java NPTEL week 1 quiz answers

Nptel – Deep Learning assignment solutions

For discussion about any question, join the below comment section. And get the solution of your query. Also, try to share your thoughts about the topics covered in this particular quiz.

Leave a Comment

Your email address will not be published. Required fields are marked *