NPTEL Operating System Fundamentals Week 7 Assignment Solutions

This set of MCQ(multiple choice questions) focuses on the NPTEL Operating System Fundamentals Week 7 Assignment Solutions.

You should practice these questions to improve Operating System Fundamentals 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 “NPTEL Operating System Fundamentals Week 7 Assignment Solutions“.

Operating System Fundamentals NPTEL 2022 Week 7 Assignment Solutions

Q1. Which of the following is incorrect about Monitors?

a) It is a high-level abstraction that provides a convenient and effective mechanism for process synchronization
b) Multiple processes may be active within the monitor at a time
c) Mutual exclusion is guaranteed by the operating system
d) Internal variables are only accessible by codes within the procedure

Answer: b) Multiple processes may be active within the monitor at a time

Q2. In Peterson’s algorithm, if the “turn” variable is not present (that is, the solution uses only the “flag” variable), the resulting solution will violate

a) Mutual exclusion
b) Progress condition
c) Bounded wait
d) None of the conditions

Answer: c) Bounded wait

Q3. Which of the following is incorrect?

a) counting semaphore can take integer values ranging over an unrestricted domain
b) binary semaphore range only between 0 and 1
c) binary semaphore can be implemented as counting semaphore
d) none of the above

Answer: d) none of the above

Q4. In the bounded-waiting mutual exclusion solution using test-and-set instruction, for a system with N processes, the maximum number of times other processes may enter into critical section after a process has desired to do so is

a) N
b) 2N
c) N – 1
d) 2N – 1

Answer: c) N – 1

Q5. Match the following columns –

a) P→1, Q→2, R→3
b) P→2, Q→3, R→1
c) P→2, Q→1, R→3
d) P→1, Q→3, R→2

Answer: c) P→2, Q→1, R→3

Operating System Fundamentals NPTEL week 7 Assignment Solutions

Q6. For a producer-consumer problem with unbounded buffer size, semaphores needed are

a) mutex, full, empty
b) mutex, full
c) mutex, empty
d) full, empty

Answer: b) mutex, full

Q7. In the bounded-buffer producer-consumer problem, suppose that in the consumer process, the wait statements corresponding to semaphores “full” and “mutex” have been interchanged. The resulting algorithm

a) Still works fine
b) May create problem when the buffer is full
c) May create problem when the buffer is empty
d) None of the other options

Answer: c) May create problem when the buffer is empty

Operating System Fundamentals NPTEL week 7 Assignment Solutions

Q8. In the following code, two processes are using semaphores S1 and S2, both initialized to 1.

a) Violate mutual exclusion
b) Have potential for deadlock
c) Can never enter into their critical sections
d) None of the other options

Answer: b) Have potential for deadlock

Operating System Fundamentals NPTEL week 7 Assignment Solutions

Q9. Select the incorrect option-

a) A process must execute “wait(mutex)” before entering the monitor and “signal(mutex)” after leaving the monitor
b) The signaling processes can use next to suspend themselves
c) An integer variable “next_count” is provided to count the number of processes suspended on next
d) None of the above

Answer: d) None of the above

Q10. In Peterson’s algorithm, if the “flag” variable is not present (that is, the solution uses only the “turn” variable), the resulting solution will violate

a) Mutual exclusion
b) Progress condition
c) Bounded wait
d) None of the conditions

Answer: b) Progress condition

Operating System Fundamentals NPTEL week 7 Assignment Solutions


Previous Course – Week 7 Assignment Solutions

Q1. Which of the following conditions must be satisfied to solve the critical section problem? is non-preemptive?

a. Mutual Exclusion

b. Progress

c. Bounded Waiting

d. All of the mentioned

Ans. d

Q2. In a critical section –

a. when one process is executing in its critical section other process is allowed to enter its critical section

b. when one process is executing in the critical section no other process is allowed enter in the critical section

c. several processes access and manipulate the same data concurrently

d. None of the above

Ans. b

Q3. Concurrent access to shared data may result in __

a. data insecurity

b. data inconsistency

c. data consistency

d. none of the mentioned

Ans. b

Q4. Peterson’s solution is good algorithm solution which work for how many concurrent processes?

a. one

b. three

c. four

d. five

Ans. a

Q5. A minimum of how many variables are required to be shared to solve the critical section problem?

a. one

b. three

c. two

d. four

Ans. c

Q6. Semaphore is a/an _ which is used to solve the critical section problem.

a. special program for a system

b. integer variable

c. hardware for a system

d. none of the mentioned

Ans. b

Q7. Process synchronization can be done on

a. software level

b. hardware level

c. Both software and hardware level

d. none of the above

Ans. c

Q8. Which are the two kinds of semaphores in operating system?

a. mutex and decimal

b. binary and counting

c. mutex and counting

d. binary and decimal

Ans. b

Q9. What are Spinlocks?

a. CPU cycles wasting locks over critical sections of programs

b. Locks that avoid time wastage in context switches

c. Locks that work better on multiprocessor systems

d. All of the mentioned

Ans. d

Q10. The bounded buffer problem is know as

a. producer-consumer problem

b. reader – writer problem

c. dining philosophers problem

d. none

Ans. a)

<< Prev- Operating System Fundamentals Week 6 Assignment Solutions

>> Next- Operating System Fundamentals Week 10 Assignment Solutions


Introduction To Internet Of Things | NPTEL | Assignment Solutions

ULTIMATE Graphic Design quiz

170+ Grammar quiz: Beginner’s Level questions

NPTEL Leadership assignment solutions

Java Programming: Coursera quiz answers

Online Web development Test for Hiring and Recruitment

The above question set contains all the correct answers. But in any case, you find any typographical, grammatical or any other error in our site then kindly inform us. Don’t forget to provide the appropriate URL along with error description. So that we can easily correct it.

Thanks in advance.

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 *