Techno India Batanagar Department of Computer Science & Engineering Model Questions Subject Name: Operating System Multiple Choice Questions: Subject Code: CS603 1) Shell is the exclusive feature of a) UNIX b) DOS c) System software d) Application Software 2) A Program in execution is called a) Process b) Instruction c) Procedure d) Function 3) Interval between the time of submission and completion of the job is called a) Waiting time b) Turnaround time c) Throughput d) Response time 4) A scheduler which selects processes from secondary storage device is called a) Short term scheduler b) Long term scheduler c) Medium term scheduler. d) Process scheduler 5) The scheduling in which CPU is allocated to the process with least CPU-burst time is called a) Priority Scheduling b) Shortest job first Scheduling c) Round Robin Scheduling d) Multilevel Queue Scheduling 6) Which scheduling policy is most suitable for a time-shared operating system? a) Shortest-job First. b) Elevator. c) Round-Robin. d) First-Come-First-Serve. 7) SSTF stands for a) Shortest-Seek-time-first scheduling b) Small small-time-first scheduling c) simple-seek-time-first scheduling d) small-simple-time-first scheduling 8) In UNIX, Which system call creates the new process? a) fork b) create c) new
9) In priority scheduling algorithm, when a process arrives at the ready queue, its priority is compared with the priority of: a) all process b) currently running process c) parent process d) init process 10) Time quantum is defined in: a) shortest job scheduling algorithm b) round robin scheduling algorithm c) priority scheduling algorithm d) multilevel queue scheduling algorithm 11) A multithreaded program P executes with x number of threads and uses y number of locks for ensuring mutual exclusion while operating on shared memory locations. All locks in the program are non-reentrant, i.e., if a thread holds a lock l, then it cannot reacquire lock l without releasing it. If a thread is unable to acquire a lock, it blocks until the lock becomes available. The minimum value of x and the minimum value of y together for which execution of P can result in a deadlock are: a) x = 1, y = 2 b) x =2, y=1 c) x = 2,y=2 d) x = 1, y = 1 12) The processes that are residing in main memory and are ready and waiting to execute are kept on a list called: a) job queue b) ready queue c) execution queue d) process queue 13) What is operating system? a) collection of programs that manages hardware resources b) system service provider to the application programs c) link to interface the hardware and application programs d) all of the mentioned 14) Dispatch latency is: a) the speed of dispatching a process from running to the ready state b) the time of dispatching a process from running to ready state and keeping the CPU idle c) the time to stop one process and start running another one d) None of these 15) Scheduling is done so as to : a) increase CPU utilization b) decrease CPU utilization c) keep the CPU more idle d) None of these
16) Waiting time is : a) the total time in the blocked and waiting queues b) the total time spent in the ready queue c) the total time spent in the running queue d) the total time from the completion till the submission of a process 17) The portion of the process scheduler in an operating system that dispatches processes is concerned with: a) assigning ready processes to CPU b) assigning ready processes to waiting queue c) assigning running processes to blocked queue d) All of these 18) Consider the following statements with respect to user level threads and kernel supported threads; 1. Context switch is faster with kernel supported threads. 2. For user level threads, a system call can block the entire process 3. Kernel supported threads can be scheduled independently 4. User level threads are transparent to kernel. Which of the above statements are true? a) 2,3 and 4 b) 2 and 3 c) 1 and 3 d) 1 and 2 19) Which of the following statements are true? I. Shortest remaining time first scheduling may cause starvation. II. Preemptive scheduling may cause starvation. III. Round robin is better than FCFS in terms of response time. a) I only b) I and III c) II and III d) I, II, III 20) Using a larger block size in a fixed block size file system leads to a) better disk throughput but poorer disk space utilization b) better disk throughput and better disk space utilization c) poor disk throughput but better disk space utilization d) poor disk throughput and poor disk space utilization
21) The minimum number of page frames that must be allocated to a running process in a virtual memory environment is determined by a) the instruction set architecture b) page size c) physical memory size d) the number of process in memory 22) The optimal page replacement algorithm will select the page that a) has not been used for the longest time in the past b) will not be used for the longest time in the future c) has been used least number of times d) has been used most number of times 23) Consider a virtual memory system with FIFO page replacement policy: for an arbitrary page access pattern, increasing the number of page frames in the main memory will a) always decrease the number of page faults b) always increase the number of page faults c) sometimes increase the number of page faults d) never affect the number of page faults 24. A thread is usually defined as a light weight process because an operating system maintains smaller data structures for a thread than for a process. In relation to this, which of the following is true? a) On per thread basis, the operating system maintains only cpu register state b) The OS does not maintain a separate stack for each thread. c) On prethread basis, the operating system does not maintain virtual memory system. d) On per thread basis, the operating system maintains only scheduling and accounting information. 25. Which of the following statement is false? a) virtual memory implements the translation of a program's address space into physical memory address space b) virtual memory allows each program to exceed the size of the primary memory c) virtual memory increases the degree of multi programming d) virtual memory reduces the context switching overhead
26. Which of the following condition is required for deadlock to be possible? a) mutual exclusion b) a process may hold allocated resources while awaiting assignment of other resources c) no resource can be forcibly removed from a process holding it d) all of the mentioned 27. A system is in the safe state if: a) the system can allocate resources to each process in some order and still avoid a deadlock b) there exist a safe sequence c) both (a) and (b) 28. The circular wait condition can be prevented by: a) defining a linear ordering of resource types b) using thread c) using pipes d) all of the mentioned 29. Which one of the following is a visual ( mathematical ) way to determine the deadlock occurrence? a) resource allocation graph b) starvation graph c) inversion graph 30. Multithreaded programs are: a) lesser prone to deadlocks b) more prone to deadlocks c) not at all prone to deadlocks d) None of these 31. For Mutual exclusion to prevail in the system: a) at least one resource must be held in a non-sharable mode b) the processor must be a uniprocessor rather than a multiprocessor c) there must be at least one resource in a sharable mode d) All of these 32. For non-sharable resources like a printer, mutual exclusion: a) must exist b) must not exist c) may exist d) None of these
33. Multiprogramming of computer system increases a) memory b) storage c) CPU utilization d) cost 34. CPU fetches the instruction from memory according to the value of: a) program counter b) status register c) instruction register d) program status word 35. A memory buffer used to accommodate a speed differential is called: a) stack pointer b) cache c) accumulator d) disk buffer 36. Which one of the following is the address generated by CPU? a) physical address b) absolute address c) logical address 37. Run time mapping from virtual to physical address is done by: a) memory management unit b) CPU c) PCI 38. Memory management technique in which system stores and retrieves data from secondary storage for use in main memory is called: a) fragmentation b) paging c) mapping 39. The address of a page table in memory is pointed by: a) stack pointer b) page table base register c) page register d) program counter 40. The page table contains: a) base address of each page in physical memory b) page offset c) page size
41. In fixed sized partition, the degree of multiprogramming is bounded by. a) the number of partitions b) the CPU utilization c) the memory size d) All of these 42. A process can be terminated due to: a) normal exit b) fatal error c) killed by another process d) all of the mentioned 43. What is interprocess communication? a) communication within the process b) communication between two process c) communication between two threads of same process 44. Which system call returns the process identifier of a terminated child? a) wait b) exit c) fork d) get 45. The address of the next instruction to be executed by the current process is provided by the: a) CPU registers b) program counter c) process stack d) pipe 46. The number of processes completed per unit time is known as. a) output b) Throughput c) Efficiency d) Capacity 47. The state of a process is defined by: a) the final activity of the process b) the activity just executed by the process c) the activity to next be executed by the process d) the current activity of the process 48. Disk scheduling includes deciding a) which should be accessed next b) order in which disk access requests must be serviced c) the physical location of the file d) the logical location of the file 49. Belady anamoly occurs in a) Optimal replacement b) FIFO c) LRU d) both in FIFO and LRU 50. Which among following scheduling algorithms give minimum average waiting time a) FCFS b) SJF c) Round robin d) On priority
51. Dirty bit is used to show a) Page with corrupted data b) Wrong page in memory c) Page that is modified after being loaded in the cache memory d) page that is less frequently accessed 52. Semaphores are used to solve the problem of a) race condition b) process synchronization c) mutual exclusion d) belady problem 53. In which scheduling policies, context switching never takes place a) FCFS b) round robin c) Shortest job first d) Pre-empitive 54. Which is single user operating system? a) MS-DOS b) UNIX c) XENIX d) LINUX 55. Problem of thrashing is affected significantly by a) program structure b) program size c) primary storage size d) all of above 56. Banker's algorithm deals with a) deadlock prevention b) deadlock avoidance c) deadlock recovery d) mutual exclusion 57. PCI stands for a) Programmable computer Interface b) Peripheral Computer Interface c) programmable Control Interface d) Peripheral Component Interface 58. The no. of address lines required to address 4k of memory a. 11 b. 12 c. 14 d. 16 59. What is a shell? a) It is a hardware component b) It is a command interpreter c) It is a part in compiler d) It is a tool in CPU scheduling 60. A page fault occurs a) when the page is not in the memory b) when the page is in the memory c) when the process enters the blocked state d) when the process is in the ready state
61. If the Disk head is located initially at 32, find the nu mber of disk moves required with FCFS if the disk queue of I/O blocks requests are 98, 37,14,124,65,67. a) 310 b) 324 c) 315 d) 321 62. The state of a process after it encounters an I/O instruction is. a) Ready b) Blocked/Waiting c) Idle d) Running 63. The number of processes completed per unit time is known as. a) Output b) Throughput c) Efficiency d) Capacity. 64. A critical region a) is a piece of code which only one process executes at a time b) is a region prone to deadlock c) is a piece of code which only a finite number of processes execute d) is found only in Windows NT operation system 65.The mechanism that bring a page into memory only when it is needed is called a) Segmentation b) Fragmentation c) Demand Paging d) Page Replacement 66. PCB = a) Program Control Block b) Process Control Block c) Process Communication Block d) None of the above 67. Switching the CPU to another Process requires to save state of the old process and loading new process state is called as. a) Process Blocking b) Context Switch c) Time Sharing d) None of the above 68. is a high level abstraction over Semaphore. a) Shared memory b) Message passing c) Monitor d) Mutual exclusion 69. Which of the following requires a device driver? a) Register b) Cache c) Main memory d) Disk 70. A process executes the code fork(); fork(); fork(); The total number of child processes created is a) 3 b) 4 c) 7 d) 8
71.The time taken to switch between user and kernel modes of execution be t1 while the time taken to switch between two processes be t2. Which of the following is TRUE? a) t1 > t2 b) t1 = t2 c) t1 < t2 d) nothing can be said about the relation between t1 and t2 72. Which of the following process scheduling algorithm may lead to starvation? a) FIFO b) Round Robin c) Shortest Job Next d) None of the above 73. Consider the following table of arrival time and burst time for three processes P0, P1 and P2. Process Arrival time Burst Time P0 0 ms 9 ms P1 1 ms 4 ms P2 2 ms 9 ms The pre-emptive shortest job first scheduling algorithm is used. Scheduling is carried out only at arrival or completion of processes. What is the average waiting time for the three processes? a) 5.0 ms b) 4.33 ms c) 6.33 d)7.33 74. The model in which one kernel thread is mapped to many user-level threads is called: a) Many to One model b) One to Many model c) Many to Many model d) One to One model 75. Consider three CPU-intensive processes, which require 10, 20 and 30 time units and arrive at times 0, 2 and 6, respectively. How many context switches are needed if the operating system implements a shortest remaining time first scheduling algorithm? Do not count the context switches at time zero and at the end. a)1 b)2 c)3 d)4 76. In segmentation, each address is specified by: a) a segment number & offset b) an offset & value c) a value & segment number d) a key & value 77. The offset d of the logical address must be : a) greater than segment limit b) between 0 and segment limit c) between 0 and the segment number d) greater than the segment number
78. A Process Control Block(PCB) does not contain which of the following : a) Code b) Stack c) Bootstrap program d) Data 79. What is a long-term scheduler? a) It selects which process has to be brought into the ready queue b) It selects which process has to be executed next and allocates CPU c) It selects which process to remove from memory by swapping d) None of the mentioned 80. Remote Procedure Calls are used : a) for communication between two processes remotely different from each other on the same system b) for communication between two processes on the same system c) for communication between two processes on separate systems d) None of the mentioned 81. The remote method invocation : a) allows a process to invoke memory on a remote object b) allows a thread to invoke a method on a remote object c) allows a thread to invoke memory on a remote object d) allows a process to invoke a method on a remote object 82. The initial program that is run when the computer is powered up is called : a) boot program b) bootloader c) initializer d) bootstrap program 83. In a memory mapped input/output : a) the CPU uses polling to watch the control bit constantly, looping to see if device is ready b) the CPU writes one data byte to the data register and sets a bit in control register to show that a byte is available c) the CPU receives an interrupt when the device is ready for the next byte d) the CPU runs a user written code and does accordingly 84. Which operation is performed by an interrupt handler? a) Saving the current state of the system b) Loading the interrupt handling code and executing it c) Once done handling, bringing back the system to the original state it was before the interrupt occurred d) All of the mentioned
85. A system is in the safe state if a) the system can allocate resources to each process in some order and still avoid a deadlock b) there exist a safe sequence c) all of the mentioned 86. The circular wait condition can be prevented by a) defining a linear ordering of resource types b) using thread c) using pipes d) all of the mentioned 87. For effective operating system, when to check for deadlock? a) every time a resource request is made b) at fixed time intervals c) every time a resource request is made at fixed time intervals 88. Multithreaded programs are: a) lesser prone to deadlocks b) more prone to deadlocks c) not at all prone to deadlocks 89. The disadvantage of a process being allocated all its resources before beginning its execution is: a) Low CPU utilization b) Low resource utilization c) Very high resource utilization d) None of the mentioned 90. The bounded buffer problem is also known as : a) Readers Writers problem b) Dining Philosophers problem c) Producer Consumer problem d) None of the mentioned 91. Semaphore is a/an... to solve the critical section problem. a) Hardware for a system b) Special program for a system c) Integer variable d) none of the above 92. Which of the following statements are true? I. Shortest remaining time first scheduling may cause starvation II. Preemptive scheduling may cause starvation III. Round robin is better than FCFS in terms of response time a) I only b) I and III only c) II and III only d) I, II and III
93. Consider the following set of processes, the length of the CPU burst time given in milliseconds : Process Burst time P1 6 P2 8 P3 7 P4 3 Assuming the above process being scheduled with the SJF scheduling algorithm: a) The waiting time for process P1 is 3ms b) The waiting time for process P1 is 0ms c) The waiting time for process P1 is 16ms d) The waiting time for process P1 is 9ms 94. An SJF algorithm is simply a priority algorithm where the priority is : a) the predicted next CPU burst b) the inverse of the predicted next CPU burst c) the current CPU burst d) anything the user wants 95. Aging is : a) keeping track of cache contents b) keeping track of what pages are currently residing in memory c) keeping track of how many times a given page is referenced d) increasing the priority of jobs to ensure termination in a finite time 96. Concurrent access to shared data may result in : a) data consistency b) data insecurity c) data inconsistency 97. A situation where several processes access and manipulate the same data concurrently and the outcome of the execution depends on the particular order in which access takes place is called : a) data consistency b) race condition c) aging d) starvation 98. Mutual exclusion implies that: a) if a process is executing in its critical section, then no other process must be executing in their critical sections b) if a process is executing in its critical section, then other processes must be executing in their critical sections c) if a process is executing in its critical section, then all the resources of the system must be blocked until it finishes execution
99. The TestAndSet instruction is executed: a) after a particular process b) periodically c) atomically 100. The signal operation of the semaphore basically works on the basic system call. a) continue() b) wakeup() c) getup() d) start() 101. The two kinds of semaphores are : a) mutex & counting b) binary & counting c) counting & decimal d) decimal & binary 102. All processes share a semaphore variable mutex, initialized to 1. Each process must execute wait(mutex) before entering the critical section and signal(mutex) afterward. Suppose a process executes in the following manner : signal(mutex);... critical section... wait(mutex); In this situation : a) a deadlock will occur b) processes will starve to enter critical section c) several processes maybe executing in their critical section d) all of the mentioned 103. Consider the methods used by processes P1 and P2 for accessing their critical sections whenever needed, as given below. The initial values of shared boolean variables S1 and S2 are randomly assigned. Method used by P1 : while(s1==s2); Critical section S1 = S2; Method used by P2 : while(s1!=s2); Critical section S2 = not(s1); Which of the following statements describes properties achieved? a) Mutual exclusion but not progress b) Progress but not mutual exclusion c) Neither mutual exclusion nor progress d) Both mutual exclusion and progress
104. The state of the data accessed by an aborted transaction must be restored to what it was just before the transaction started executing. This restoration is known as of transaction. a) safety b) protection c) roll back d) revert back 105. The number of resources requested by a process: a) must always be less than the total number of resources available in the system b) must always be equal to the total number of resources available in the system c) must not exceed the total number of resources available in the system d) must exceed the total number of resources available in the system 106. Given a priori information about the number of resources of each type that maybe requested for each process, it is possible to construct an algorithm that ensures that the system will never enter a deadlock state. a) minimum b) average c) maximum d) approximate 107. The wait-for graph is a deadlock detection algorithm that is applicable when : a) all resources have a single instance b) all resources have multiple instances c) all resources have a single & multiple instance d) all of the mentioned 108.An edge from process Pi to Pj in a wait for graph indicates that : a) Pi is waiting for Pj to release a resource that Pi needs b) Pj is waiting for Pi to release a resource that Pj needs c) Pi is waiting for Pj to leave the system d) Pj is waiting for Pi to leave the system 109. A system has 3 processes sharing 4 resources. If each process needs a maximum of 2 units then, deadlock : a) can never occur b) may occur c) has to occur 110. A deadlock can be broken by : a) abort one or more processes to break the circular wait b) abort all the process in the system c) preempt all resources from all processes
111. Address Binding is : a) going to an address in memory b) locating an address with the help of another address c) binding two addresses together to form a new address in a different memory space d) a mapping from one address space to another 112. The swaps processes in and out of the memory. a) Memory manager b) CPU c) CPU manager d) User 113. If a higher priority process arrives and wants service, the memory manager can swap out the lower priority process to execute the higher priority process. When the higher priority process finishes, the lower priority process is swapped back in and continues execution. This variant of swapping is sometimes called : a) priority swapping b) pull out, push in c) roll out, roll in 114. Which of the following is TRUE? a) Overlays are used to increase the size of physical memory b) Overlays are used to increase the logical address space c) When overlays are used, the size of a process is not limited to the size of the physical memory d) Overlays are used whenever the physical address space is smaller than the logical address space 115. Operating System maintains the page table for a) each process b) each thread c) each instruction d) each address 116. The operating system and the other processes are protected from being modified by an already running process because : a) they are in different memory spaces b) they are in different logical addresses c) they have a protection algorithm d) every address generated by the CPU is being checked against the relocation and limit registers
117. The first fit, best fit and worst fit are strategies to select a a) process from a queue to put in memory b) processor to run the next process c) free hole from a set of available holes d) all of the mentioned 118. A solution to the problem of external fragmentation is : a) compaction b) larger memory space c) smaller memory space 119. Logical memory is broken into blocks of the same size called a) frames b) pages c) backing store 120. Every address generated by the CPU is divided into two parts : a) frame bit & page number b) page number & page offset c) page offset & frame bit d) frame offset & page offset 121. With paging there is no fragmentation. a) internal b) external c) either type of 122. Each entry in a Translation look-aside buffer (TLB) consists of : a) key b) value c) bit value d) constant 123. The percentage of times a page number is found in the TLB is known as : a) miss ratio b) hit ratio c) miss percent d) None of the mentioned 124. The segment base contains the : a) starting logical address of the process b) starting physical address of the segment in memory c) segment length
125. For large data transfers, is used. a) dma b) programmed I/O c) controller register 126. Spooling: a) holds a copy of the data b) is fast memory c) holds the only copy of the data d) holds output for a device 127. RAID stands for : a) Redundant Allocation of Inexpensive Disks b) Redundant Array of Important Disks c) Redundant Allocation of Independent Disks d) Redundant Array of Independent Disks 128. If a thread invokes the exec system call, a) only the exec executes as a separate process. b) the program specified in the parameter to exec will replace the entire process c) the exec is ignored as it is invoked by a thread. 129. In asymmetric encryption a) same key is used for encryption and decryption b) different keys are used encryption and decryption c) no key is required for encryption and decryption 130. In distributed system each processor has its own a) local memory b) clock c) both local memory and clock