Operating System

1. A counting semaphore was initialized to 7. Then 20 P (wait) operations and x V (signal) operations were completed on this semaphore. If the final value of semaphore is 5, then the value x will be BPSC TRE 4 operating system practice set 1 2. Two atomic operations permissible on Semaphores are BPSC TRE 4 operating system practice set 1 3. A disk head is initially at cylinder 50. The FCFS request sequence is 60, 90, 30, 20. What is the total head movement? BPSC TRE 4 operating system practice set 1 4. A disk head is initially at cylinder 100. The FCFS request sequence is 55, 20, 80. What is the total head movement? BPSC TRE 4 operating system practice set 1 5. Which of the following is NOT a memory management technique used by operating systems? BPSC TRE 4 operating system practice set 1 6. Which of the following is a file system commonly used in operating systems? BPSC TRE 4 operating system practice set 1 7. Which of the following is NOT a type of interrupt? BPSC TRE 4 operating system practice set 1 8. What is a page in paging? BPSC TRE 4 operating system practice set 1 9. In a system with a page size of 4 KB and a physical address space of 64 GB, what is the number of bits required for the page offset? BPSC TRE 4 operating system practice set 1 10. What is a segment base in segmentation? BPSC TRE 4 operating system practice set 1 11. What causes thrashing to occur? BPSC TRE 4 operating system practice set 1 12. Consider a system with a total physical memory of 8 GB and total virtual memory of 16 GB. If the system is using 6 GB of physical memory and 10 GB of virtual memory, how much memory is being swapped out? BPSC TRE 4 operating system practice set 1 13. How is the TLB typically organized? BPSC TRE 4 operating system practice set 1 14. Which of the following is a common file operation? BPSC TRE 4 operating system practice set 1 15. Which of the following best defines an Operating System? Operating system Quiz all chapter practice set 16. Consider a disk queue with requests for I/O to blocks on cylinders 98, 183, 37, 122, 14, 124, 65, 67. Considering FCFS (First Come First Served) scheduling, the total number of head movements is, if the disk head is initially at 53? BPSC TRE 4 operating system practice set 1 17. Thread shares with other threads belonging to the same process its BPSC TRE 4 operating system practice set 1 18. Which type of operating system is designed to respond to events within a specified time limit? BPSC TRE 4 operating system practice set 1 19. In paging, a process is divided into fixed-size units called: BPSC TRE 4 operating system practice set 1 20. Which file system is commonly associated with modern Microsoft Windows systems? BPSC TRE 4 operating system practice set 1 21. Which type of interrupt is generated by an external hardware device? BPSC TRE 4 operating system practice set 1 22. What is a frame in a paging system? BPSC TRE 4 operating system practice set 1 23. If the page size is 8 KB, how many bits are required for the page offset? BPSC TRE 4 operating system practice set 1 24. What does the segment limit specify in a segmentation system? BPSC TRE 4 operating system practice set 1 25. Which of the following is a major cause of thrashing? BPSC TRE 4 operating system practice set 1 26. A computer has 12 GB of physical memory and 18 GB of virtual memory in use. If 10 GB of physical memory is currently occupied, how much virtual memory is outside physical memory under the simplified model? BPSC TRE 4 operating system practice set 1 27. What is the primary purpose of a Translation Lookaside Buffer (TLB)? BPSC TRE 4 operating system practice set 1 28. Which operation is used to open an existing file for access? BPSC TRE 4 operating system practice set 1 29. Which of the following is NOT a primary function of an Operating System? Operating system Quiz all chapter practice set 30. Consider the disk request queue 82, 170, 43, 140, 24, 16, 190 with the initial head position at 50. What is the total head movement using FCFS scheduling? BPSC TRE 4 operating system practice set 1 31. Which of the following is private to each thread in a process? BPSC TRE 4 operating system practice set 1 32. Which operating system is specifically designed to control and manage a dedicated device? BPSC TRE 4 operating system practice set 1 33. In paging, physical memory is divided into fixed-size units called: BPSC TRE 4 operating system practice set 1 34. Which file system is commonly used by Linux distributions? BPSC TRE 4 operating system practice set 1 35. Which type of interrupt is generated by the execution of a special instruction or software condition? BPSC TRE 4 operating system practice set 1 36. What is the primary purpose of a page table? BPSC TRE 4 operating system practice set 1 37. If a paging system uses a page size of 1 KB, how many bits are required for the page offset? BPSC TRE 4 operating system practice set 1 38. Which two values are primarily stored in each segment-table entry? BPSC TRE 4 operating system practice set 1 39. Which of the following is a characteristic symptom of thrashing? BPSC TRE 4 operating system practice set 1 40. A system has 16 GB of physical memory and 24 GB of virtual memory in use. If 14 GB of physical memory is currently occupied, how much virtual memory is outside physical memory under the simplified model? BPSC TRE 4 operating system practice set 1 41. What information is primarily stored in a TLB entry? BPSC TRE 4 operating system practice set 1 42. Which operation is used to retrieve data from an existing file? BPSC TRE 4 operating system practice set 1 43. Which type of Operating System allows multiple users to access a computer system and share its resources concurrently? Operating system Quiz all chapter practice set 44. In FCFS disk scheduling, how are disk I/O requests serviced? BPSC TRE 4 operating system practice set 1 45. Which of the following is generally shared by threads belonging to the same process? BPSC TRE 4 operating system practice set 1 46. Which type of operating system allows multiple users to access computer resources simultaneously? BPSC TRE 4 operating system practice set 1 47. Which memory management technique divides a program into variable-sized logical units such as code, data and stack? BPSC TRE 4 operating system practice set 1 48. Which file system was developed by Apple for use with older versions of Mac OS and macOS? BPSC TRE 4 operating system practice set 1 49. What is the name of the routine executed by the CPU to handle an interrupt? BPSC TRE 4 operating system practice set 1 50. Which of the following is true about the size of a page and a frame in paging? BPSC TRE 4 operating system practice set 1 51. A paging system has a page size of 16 KB. What is the number of bits in the page offset? BPSC TRE 4 operating system practice set 1 52. How is the physical address obtained in basic segmentation when the offset is valid? BPSC TRE 4 operating system practice set 1 53. What happens to CPU utilization during severe thrashing? BPSC TRE 4 operating system practice set 1 54. A system uses 20 GB of virtual memory and 12 GB of physical memory. If 9 GB of physical memory is currently in use, how much virtual memory is outside physical memory under the simplified model? BPSC TRE 4 operating system practice set 1 55. What happens when a required page-number translation is found in the TLB? BPSC TRE 4 operating system practice set 1 56. Which operation is used to store data into a file? BPSC TRE 4 operating system practice set 1 57. Which statement about system calls is correct? Operating system Quiz all chapter practice set 58. A disk head is initially at cylinder 40. The FCFS request sequence is 10, 50, 20. What is the total head movement? BPSC TRE 4 operating system practice set 1 59. Which of the following is normally private to an individual thread? BPSC TRE 4 operating system practice set 1 60. Which operating system is mainly designed to execute jobs in groups without requiring direct user interaction during execution? BPSC TRE 4 operating system practice set 1 61. Which type of fragmentation is commonly associated with paging? BPSC TRE 4 operating system practice set 1 62. Which of the following file systems supports journaling? BPSC TRE 4 operating system practice set 1 63. Which type of interrupt can normally be disabled or ignored temporarily by the CPU? BPSC TRE 4 operating system practice set 1 64. What is a page fault? BPSC TRE 4 operating system practice set 1 65. A system has a physical address space of 32 GB and a page size of 4 KB. How many bits are required for a physical address? BPSC TRE 4 operating system practice set 1 66. A segment has a base address of 5000 and an offset of 300. What physical address is generated, assuming the offset is within the segment limit? BPSC TRE 4 operating system practice set 1 67. Which technique can help reduce thrashing by ensuring that processes receive enough frames for their active pages? BPSC TRE 4 operating system practice set 1 68. What is the main purpose of swap space in a virtual memory system? BPSC TRE 4 operating system practice set 1 69. What happens when a required page-number translation is not found in the TLB? BPSC TRE 4 operating system practice set 1 70. Which operation removes a file from the file system? BPSC TRE 4 operating system practice set 1 71. Which component of an Operating System executes in privileged mode and manages core system resources? Operating system Quiz all chapter practice set 72. Which disk scheduling algorithm selects the pending request with the shortest seek distance from the current head position? BPSC TRE 4 operating system practice set 1 73. Which memory area is commonly shared among threads of the same process? BPSC TRE 4 operating system practice set 1 74. Which type of operating system provides users with the ability to interact with the system while programs are executing and shares CPU time among users or processes? BPSC TRE 4 operating system practice set 1 75. Which type of fragmentation is primarily associated with variable-sized memory allocation and segmentation? BPSC TRE 4 operating system practice set 1 76. Which file system is known for having a maximum individual file size of approximately 4 GB? BPSC TRE 4 operating system practice set 1 77. Which interrupt is designed for conditions that require immediate attention and normally cannot be disabled by the usual interrupt mask? BPSC TRE 4 operating system practice set 1 78. Which hardware component is commonly used to speed up virtual-to-physical address translation? BPSC TRE 4 operating system practice set 1 79. A system has a physical memory size of 16 GB and a page size of 4 KB. How many physical memory frames are available? BPSC TRE 4 operating system practice set 1 80. A segment has a base address of 8000 and a limit of 1000. Which offset is valid for accessing the segment? BPSC TRE 4 operating system practice set 1 81. Which action can help control thrashing when the degree of multiprogramming is too high? BPSC TRE 4 operating system practice set 1 82. When physical memory becomes insufficient for the current memory demand, which operation may occur? BPSC TRE 4 operating system practice set 1 83. Which component normally contains the page table in a virtual memory system? BPSC TRE 4 operating system practice set 1 84. Which operation changes the name of an existing file without being a read or write operation? BPSC TRE 4 operating system practice set 1 85. What is the primary purpose of the booting process in a computer system? Operating system Quiz all chapter practice set 86. Which of the following is NOT normally shared among threads of the same process? BPSC TRE 4 operating system practice set 1 87. Which type of operating system is designed to manage resources across multiple interconnected computers and make them work together? BPSC TRE 4 operating system practice set 1 88. Which technique allows a program to execute even when the entire program cannot fit into physical main memory at once? BPSC TRE 4 operating system practice set 1 89. Which of the following is the modern default file system introduced by Apple for macOS, iOS and related platforms? BPSC TRE 4 operating system practice set 1 90. Which hardware component commonly generates periodic interrupts used by an operating system for timekeeping and scheduling? BPSC TRE 4 operating system practice set 1 91. Which technique loads a page into physical memory only when the page is actually needed? BPSC TRE 4 operating system practice set 1 92. A logical address is 32 bits long and the page size is 4 KB. How many bits are used for the page number? BPSC TRE 4 operating system practice set 1 93. Which register points to the location of the segment table in memory? BPSC TRE 4 operating system practice set 1 94. Which of the following is most directly associated with thrashing? BPSC TRE 4 operating system practice set 1 95. If a system has 8 GB of physical memory and 12 GB of virtual memory in use, with 8 GB of physical memory occupied, how much virtual memory is outside physical memory under the simplified model? BPSC TRE 4 operating system practice set 1 96. If a system has a TLB hit ratio of 80%, what percentage of address translations result in a TLB miss? BPSC TRE 4 operating system practice set 1 97. Which of the following are standard file-system operations? BPSC TRE 4 operating system practice set 1 98. Which of the following best describes a process in an Operating System? Operating system Quiz all chapter practice set 99. Which disk scheduling algorithm moves the disk head toward one end while servicing requests in that direction and then reverses direction? BPSC TRE 4 operating system practice set 1 100. Which of the following is a characteristic of threads belonging to the same process? BPSC TRE 4 operating system practice set 1 101. Which type of operating system is commonly used to manage computers connected to a network and provide services such as file and printer sharing? BPSC TRE 4 operating system practice set 1 102. Which of the following is a page replacement algorithm used in virtual memory systems? BPSC TRE 4 operating system practice set 1 103. Which component of a file system keeps information about files and their locations on storage? BPSC TRE 4 operating system practice set 1 104. What generally happens when the CPU accepts an interrupt? BPSC TRE 4 operating system practice set 1 105. Which of the following is a common page replacement algorithm? BPSC TRE 4 operating system practice set 1 106. A system has a 36-bit physical address and a page size of 4 KB. How many bits are required for the physical frame number? BPSC TRE 4 operating system practice set 1 107. What happens if the offset in a logical address is greater than or equal to the permitted segment limit? BPSC TRE 4 operating system practice set 1 108. What is the primary effect of thrashing on system performance? BPSC TRE 4 operating system practice set 1 109. Which statement best describes the relationship between physical and virtual memory in a system using paging? BPSC TRE 4 operating system practice set 1 110. Which statement about a TLB is correct? BPSC TRE 4 operating system practice set 1 111. Which operation releases an open file so that the process no longer has it open? BPSC TRE 4 operating system practice set 1 112. Which of the following information is typically stored in a Process Control Block (PCB)? Operating system Quiz all chapter practice set 113. Which of the following is an advantage of multithreading within a process? BPSC TRE 4 operating system practice set 1 114. Which of the following is an example of an operating system used in mobile devices? BPSC TRE 4 operating system practice set 1 115. A process waiting for an I/O operation to complete is generally in which state? Operating system Quiz all chapter practice set 116. Which operating system characteristic allows several programs to be kept in memory and executed by the CPU concurrently? BPSC TRE 4 operating system practice set 1 117. What is context switching in an Operating System? Operating system Quiz all chapter practice set 118. Which of the following is NOT an operating system? BPSC TRE 4 operating system practice set 1 119. Which CPU scheduling algorithm selects the ready process with the smallest next CPU burst and, in its non-preemptive form, runs it until completion or blocking? Operating system Quiz all chapter practice set 120. A Round Robin CPU scheduler uses a time quantum of 4 ms. Three processes P1, P2 and P3 arrive at time 0 with CPU burst times of 5 ms, 3 ms and 1 ms, respectively. If the initial ready queue is P1, P2, P3, what is the completion time of P1? Operating system Quiz all chapter practice set 121. Which statement correctly distinguishes a thread from a process? Operating system Quiz all chapter practice set 122. Which CPU scheduling algorithm executes processes in the order of their arrival without preempting a running process? Operating system Quiz all chapter practice set 123. Three processes P1, P2 and P3 arrive at time 0 with CPU burst times of 6 ms, 2 ms and 4 ms, respectively. Under non-preemptive SJF scheduling, what is the average waiting time? Operating system Quiz all chapter practice set 124. Which statement correctly describes Shortest Remaining Time First (SRTF) scheduling? Operating system Quiz all chapter practice set 125. Consider three processes P1, P2 and P3, all arriving at time 0, with burst times of 5 ms, 3 ms and 1 ms, respectively. Under non-preemptive priority scheduling, the priorities are P1 = 2, P2 = 1 and P3 = 3, where a smaller number indicates a higher priority. What is the execution order? Operating system Quiz all chapter practice set 126. In Round Robin scheduling, what happens when a running process does not finish its CPU burst before its time quantum expires? Operating system Quiz all chapter practice set 127. A process arrives at time 3 ms and completes at time 12 ms. If its CPU burst time is 5 ms, what are its turnaround time and total waiting time, respectively? Operating system Quiz all chapter practice set 128. A process arrives at time 4 ms and starts its first CPU execution at time 7 ms. What is its response time? Operating system Quiz all chapter practice set 129. What is the primary purpose of the critical-section problem in process synchronization? Operating system Quiz all chapter practice set 130. A binary semaphore is initialized to 1. A process successfully executes wait() and enters its critical section. What is the semaphore value immediately after the wait() operation? Operating system Quiz all chapter practice set 131. Which statement correctly distinguishes a mutex from a counting semaphore? Operating system Quiz all chapter practice set 132. Which synchronization construct encapsulates shared data and operations and generally allows only one process or thread at a time to execute within its procedures? Operating system Quiz all chapter practice set 133. What is a race condition in an Operating System? Operating system Quiz all chapter practice set 134. In the bounded-buffer producer-consumer problem, a buffer has N slots. Which initial semaphore values are conventionally used for empty slots, full slots and mutual exclusion, respectively? Operating system Quiz all chapter practice set 135. Which of the following is NOT a necessary condition for deadlock to occur? Operating system Quiz all chapter practice set 136. In a Resource Allocation Graph (RAG), what does an edge from a process to a resource represent? Operating system Quiz all chapter practice set 137. Which technique prevents deadlock by ensuring that at least one of the four necessary deadlock conditions can never hold? Operating system Quiz all chapter practice set 138. A system has three resource types. Before granting a resource request, the operating system checks whether the resulting state remains safe. Which deadlock-handling technique is being used? Operating system Quiz all chapter practice set 139. A system has 10 instances of a resource. The current allocation is P1 = 2, P2 = 2 and P3 = 1. Their maximum demands are P1 = 5, P2 = 4 and P3 = 3. What is the current Available amount of the resource? Operating system Quiz all chapter practice set 140. Which of the following is a possible method of recovering from a deadlock? Operating system Quiz all chapter practice set 141. Which statement correctly distinguishes a logical address from a physical address? Operating system Quiz all chapter practice set 142. Which memory allocation technique requires a process to occupy a single continuous block of physical memory? Operating system Quiz all chapter practice set 143. A memory system has 1000 KB of free memory divided into partitions of 200 KB, 300 KB and 500 KB. Which type of partitioning uses fixed-size partitions determined before process allocation? Operating system Quiz all chapter practice set 144. A process is allocated a 100 KB memory partition but requires only 70 KB. What type of fragmentation is primarily caused by the unused 30 KB inside the allocated partition? Operating system Quiz all chapter practice set 145. A system uses a page size of 4 KB and a logical address space of 32 bits. How many bits are required for the page number? Operating system Quiz all chapter practice set 146. Which statement correctly describes segmentation in memory management? Operating system Quiz all chapter practice set 147. Which memory allocation algorithm allocates a process to the first available memory block that is large enough to satisfy its requirement? Operating system Quiz all chapter practice set 148. Free memory blocks are 100 KB, 500 KB, 200 KB, 300 KB and 600 KB. A process requires 212 KB. Which block will Best Fit allocate to the process? Operating system Quiz all chapter practice set 149. Which memory allocation algorithm allocates a process to the largest available memory block? Operating system Quiz all chapter practice set 150. Free memory blocks are 100 KB, 500 KB, 200 KB, 300 KB and 600 KB. A process requires 212 KB. Which block will Worst Fit allocate to the process? Operating system Quiz all chapter practice set 151. Which statement correctly describes the Next Fit memory allocation algorithm? Operating system Quiz all chapter practice set 152. What is demand paging in virtual memory? Operating system Quiz all chapter practice set 153. A process references a page that is not currently present in physical memory. What event occurs? Operating system Quiz all chapter practice set 154. A system has three page frames and uses FIFO page replacement. For the reference string 1, 2, 3, 1, 4, how many page faults occur? Operating system Quiz all chapter practice set 155. Which of the following is a common page replacement algorithm used to decide which page should be removed from physical memory? Operating system Quiz all chapter practice set 156. What is thrashing in a virtual memory system? Operating system Quiz all chapter practice set 157. Which concept represents the set of pages that a process is actively using during a particular period of execution? Operating system Quiz all chapter practice set 158. A system has three page frames and uses FIFO page replacement. For the reference string 1, 2, 3, 1, 4, 2, 5, how many page faults will occur? Operating system Quiz all chapter practice set 159. Which page replacement algorithm replaces the page that will not be used for the longest period of time in the future? Operating system Quiz all chapter practice set 160. A system has three page frames and uses the Optimal page replacement algorithm. For the reference string 1, 2, 3, 4, 1, 2, 5, how many page faults occur? Operating system Quiz all chapter practice set 161. Which page replacement algorithm replaces the page that has not been used for the longest period of time? Operating system Quiz all chapter practice set 162. A system has three page frames and uses LRU page replacement. For the reference string 1, 2, 3, 1, 4, 2, how many page faults occur? Operating system Quiz all chapter practice set 163. What is the main purpose of the Second Chance page replacement algorithm? Operating system Quiz all chapter practice set 164. Which data structure is commonly associated with the implementation of the Clock page replacement algorithm? Operating system Quiz all chapter practice set 165. Which of the following best defines a file in an operating system? Operating system Quiz all chapter practice set 166. Which type of directory structure allows a directory to contain files as well as other directories? Operating system Quiz all chapter practice set 167. Which of the following is NOT normally considered a file attribute maintained by an operating system? Operating system Quiz all chapter practice set 168. Which file access method allows records or blocks to be accessed in any order using their relative location? Operating system Quiz all chapter practice set 169. Which file allocation method stores a file in a set of contiguous disk blocks? Operating system Quiz all chapter practice set 170. A file requires 5 disk blocks. Under contiguous allocation, the first block is 100 and the file occupies consecutive blocks. What will be the block numbers allocated to the file? Operating system Quiz all chapter practice set 171. Which statement correctly describes the structure of a magnetic disk? Operating system Quiz all chapter practice set 172. Which disk scheduling algorithm selects the disk request that is closest to the current position of the disk head? Operating system Quiz all chapter practice set 173. A disk head is initially at cylinder 50. The request queue is 82, 170, 43, 140, 24 and 16. Using FCFS disk scheduling, what is the total head movement? Operating system Quiz all chapter practice set 174. A disk head is at cylinder 50 and the pending requests are 82, 170, 43, 140, 24 and 16. Using SSTF, which request will be serviced first? Operating system Quiz all chapter practice set 175. Which disk scheduling algorithm moves the disk head in one direction servicing requests and, after reaching the end, reverses direction? Operating system Quiz all chapter practice set 176. A disk has cylinders 0 to 199. The head is at 50 and is moving toward higher cylinders. The pending requests are 82, 140, 20 and 10. Under SCAN, which request will be serviced first? Operating system Quiz all chapter practice set 177. Which statement correctly describes the C-SCAN disk scheduling algorithm? Operating system Quiz all chapter practice set 178. A disk has cylinders numbered 0 to 199. If the C-SCAN head is moving toward higher cylinders and reaches cylinder 199, where does it move next for continuing the circular scan? Operating system Quiz all chapter practice set 179. What is the main difference between LOOK and SCAN disk scheduling? Operating system Quiz all chapter practice set 180. In C-LOOK disk scheduling, after servicing the last request in one direction, where does the disk head move? Operating system Quiz all chapter practice set 181. Which of the following is an example of an I/O device? Operating system Quiz all chapter practice set 182. What is the primary function of a device controller in an operating system? Operating system Quiz all chapter practice set 183. Which I/O technique temporarily stores data while it is being transferred between devices operating at different speeds? Operating system Quiz all chapter practice set 184. What is the main purpose of caching in I/O management? Operating system Quiz all chapter practice set 185. Which I/O technique is commonly used to manage jobs sent to a device such as a printer by placing them in a queue on secondary storage? Operating system Quiz all chapter practice set 186. Which I/O technique allows a device controller to transfer a block of data directly between an I/O device and main memory without continuous CPU intervention? Operating system Quiz all chapter practice set 187. What is the primary purpose of protection in an operating system? Operating system Quiz all chapter practice set 188. Which mechanism is primarily used to verify the identity of a user before granting access to a system? Operating system Quiz all chapter practice set 189. Which of the following best describes access control in an operating system? Operating system Quiz all chapter practice set 190. Which of the following is a security threat in which an attacker attempts to obtain confidential information by pretending to be a trusted entity? Operating system Quiz all chapter practice set 191. Which type of operating system collects jobs and executes them without requiring direct interaction from the user during execution? Operating system Quiz all chapter practice set 192. Which operating system concept allows multiple programs to reside in main memory at the same time so that the CPU can switch to another program when one is waiting for I/O? Operating system Quiz all chapter practice set 193. Which operating system capability allows a user to run multiple tasks apparently at the same time by rapidly switching the CPU among them? Operating system Quiz all chapter practice set 194. A computer system has two or more CPUs that can execute processes simultaneously. Which operating system concept is associated with this system? Operating system Quiz all chapter practice set 195. Which type of operating system manages a group of networked computers and makes their resources appear to users as part of a coordinated system? Operating system Quiz all chapter practice set 196. Which type of operating system is designed to provide a response within a specified time constraint for critical tasks? Operating system Quiz all chapter practice set