In this article, you will get NPTEL Assignment Answers of Week 7 (2023) of the course Operating System Fundamentals
Week 7 Due date: 2023-09-13, 23:59 IST.
CLICK HERE TO GO FOR WEEK 7 ASSIGNMENT OF OS FUNDAMENTALS (NPTEL)
Note : Answers are marked with red color.
1.Which of the following is a synchronization mechanism used to solve the critical section problem?
(A) Deadlock
(B) Thread
(C) Semaphore
(D) Intermpt
(E) Cache
2. Which of the following is a key component used in Peterson’s algorithm for mutual exclusion in operating systems?
(A) Binary semaphore
(B) Mutex Lock
(C) Turn variable
(D) Monitor
(E) Semaphore
3. Which of the following represents the purpose of the “test_and_set” instruction?
(A) Checks if a lock is available and acquires it if available
(B) Sets a variable to a specified value
(C) Checks if a variable is equal to a specified value
(D) Atomically reads the value of a variable and sets it to a new value
(E) Suspends the execution of a process for a specified duration
(A) (B) (C) (D) (E)
5. Which of the following represents the busy waiting in operating systems?
(A) A technique that allows a process to relinquish the CPU and enter a waiting state until
a certain condition is satisfied.
(B) A method of synchronization that uses semaphore variables to prevent multiple
processes from accessing a shared resource simultaneously,
(C) A mechanism that allows a process to execute a loop continuously while waiting for a
certain condition to become true.
(D) An algorithm used to achieve mutual exclusion in critical section problem.
(E) A mechanism that suspends the execution of a process for a specified duration.
6. Of the following is true for “test_and_set()” and “compare_and_swap()” algorithms?
(A) Both of them satisfy the mutual exclusion
(B) Both of them satisfy the bounded-waiting requirement
(C) Only “test_and_set()” satisfies mutual exclusion
(D) Only “compare_and_swap()” satisfies mutual exclusion
(E) None of them satisfy the mutual exclusion
(A) (B) (C) (D) (E)
8. What is use of the Monitor construct in the operating system?
(A) It manages concurrent access to shared resources
(B) It provides mutual exclusion
(C) It encapsulates shared data along with the procedures that operate on that data
(D)lt allows a process to wait until a specific condition becomes true before proceeding
(E) All of the above
9. Processor instruction that may be used for solving critical section problems should be able to do the following operation(s) as part of its execution
(A) Memory read
(B) Memory write
(C) Both memory read and write
(D) Monitor
(E) None of them
10. Which of the following can be used to design a correct solution to the Readers-Writers problem?
(A) Semaphore
(B) Monitor
(C) Semaphore and Monitor
(D) Mutex lock
(E) Spinlock
11. In the operating system. a Resource Allocator Monitor is a
(A) mechanism for process scheduling
(B) synchronization construct for managing shared resources
(C) technique for deadlock detection and recovery
(D) mechanism for inter-process communication
(E) mechanism for memory allocation and deallocation
12. A Resource Allocator Monitor is used
(A) for the allocation of resources among multiple processes
(B) for the deallocation of resources from multiple processes
(C) to provide a higher-level abstraction for shared resource usage
(D) to ensure mutual exclusion among competing processes
(E) All of the above
13. Which of the following statement is time for resuming processes within a monitor?
(A) Processes are resumed sequentially based on their arrival time
(B) Processes are resumed randomly to introduce fairness
(C) Processes are resumed in a priority-based order
(D) Processes are not resumed within a monitor
(E) None of the above
14. Assume that a semaphore variable t is initialized with a value of IO. Four processes Pl, P2, PS, and P4 concurrently perform the following operations: wait(t), signal(t), wait(t), and wait(t). Assuming that each process executes its operation atomically and no other operations modify t. What will be the final value oft after these operations?
(A) 7
(B) 8
(C) 9
(D) 10
(E) 11
(A) (B) (C) (D) (E)