OS MCQ 1-9 PDF
Document Details
Uploaded by TenaciousCornet
Tags
Summary
This is a set of multiple choice questions about the fundamental concepts of an operating system.
Full Transcript
OS MCQ 1-9 1. What is the primary role of an operating system (OS)? a) Managing a computer's hardware b) Acting as an intermediary between the user and hardware c) Providing an environment for programs to work d) All of the above Answer: d) All of the above...
OS MCQ 1-9 1. What is the primary role of an operating system (OS)? a) Managing a computer's hardware b) Acting as an intermediary between the user and hardware c) Providing an environment for programs to work d) All of the above Answer: d) All of the above 2. What are the goals of an operating system? a) Execute user programs and make problem-solving easier b) Provide security for the hardware only c) Focus solely on user interaction d) Minimize system efficiency Answer: a) Execute user programs and make problem-solving easier 3. Which of the following is NOT a component of a computer system? a) Hardware b) Operating system c) Users d) Cloud services Answer: d) Cloud services 4. In the user view of an operating system, what is the design priority for workstations like laptops or PCs? a) Resource utilization b) Ease of use, performance, and security c) Minimal battery consumption d) Complex user interfaces Answer: b) Ease of use, performance, and security 5. How are operating systems optimized for mobile devices? a) Focus on resource utilization and power efficiency b) Maximize hardware efficiency only c) Ensure the system works with minimal user interaction d) Provide touch screen and voice recognition capabilities Answer: a) Focus on resource utilization and power efficiency pg. 1 6. What is a key characteristic of operating systems in embedded computers? a) Complex user interfaces b) Optimized for usability and battery life c) Little or no user interface d) Designed to keep all users happy Answer: c) Little or no user interface 7. In the system view, what is the operating system's primary role as a resource allocator? a) Preventing unauthorized user access b) Efficient use of hardware resources like CPU time and memory c) Enhancing battery life for mobile devices d) Managing network connections Answer: b) Efficient use of hardware resources like CPU time and memory 8. What is the purpose of the control program within an operating system? a) Allocating resources to user programs b) Preventing errors and improper use of the computer c) Providing security to users d) Enhancing application programs Answer: b) Preventing errors and improper use of the computer 9. What is the OS program running at all times on a computer called? a) Kernel b) System program c) Application program d) Buffer Answer: a) Kernel 10. Which of the following is NOT a type of program associated with the operating system? a) Kernel b) System program c) Application program d) Local buffer Answer: d) Local buffer 11. What connects CPUs and device controllers to shared memory in a computer system? a) Common bus b) Local buffer c) Cache memory d) Kernel interface pg. 2 Answer: a) Common bus 12. What manages I/O operations and provides a uniform interface between device controllers and the kernel? a) Application program b) Device driver c) System program d) Tertiary storage Answer: b) Device driver 13. Which type of storage is directly accessible by the CPU and is typically volatile? a) Secondary storage b) Main memory c) Tertiary storage d) Magnetic tape Answer: b) Main memory 14. What type of memory serves as an extension of main memory and provides large, nonvolatile storage capacity? a) Registers b) Secondary storage c) Tertiary storage d) Cache memory Answer: b) Secondary storage 15. Which storage type is primarily used for storing backup copies of material? a) Main memory b) Cache memory c) Tertiary storage d) Secondary storage Answer: c) Tertiary storage 16. What is the primary factor that differentiates various storage systems in a hierarchy? a) Cost only b) Speed, size, and volatility c) Only size and speed d) Accessibility Answer: b) Speed, size, and volatility pg. 3 17. What does caching in storage systems involve? a) Storing backups on magnetic tapes b) Copying information into faster storage systems c) Increasing the volatility of memory d) Replacing primary storage with tertiary storage Answer: b) Copying information into faster storage systems 18. What is the trade-off in a storage hierarchy? a) Size and volatility b) Speed and cost c) Size and speed d) Cost and volatility Answer: c) Size and speed 19. What is the role of a core in a single-processor system? a) Manages I/O devices b) Executes instructions and stores data locally c) Handles OS scheduling d) Runs special-purpose processes Answer: b) Executes instructions and stores data locally 20. What type of processors are included in single-processor systems for specific tasks? a) Multicore processors b) Device-specific processors c) Master processors d) Slave processors Answer: b) Device-specific processors 21. What is a key characteristic of multiprocessor systems? a) Single-core CPUs b) Only one processor executes tasks c) Multiple processors tightly coupled together d) No communication between processors Answer: c) Multiple processors tightly coupled together 22. Which of the following is NOT an advantage of multiprocessor systems? a) Increased throughput b) Decreased reliability c) Economy of scale d) Increased reliability pg. 4 Answer: b) Decreased reliability 23. In asymmetric multiprocessing, what is the relationship between processors? a) All processors are peers b) Master-slave relationship c) Independent tasks execution d) Shared control of tasks Answer: b) Master-slave relationship 24. How does symmetric multiprocessing (SMP) differ from asymmetric multiprocessing? a) SMP has predefined tasks for slave processors b) SMP allows all processors to perform all tasks equally c) SMP assigns specific tasks to master processors d) SMP has no scheduling mechanisms Answer: b) SMP allows all processors to perform all tasks equally 25. What is a primary advantage of multicore systems? a) Reduced power usage compared to multiple single-core chips b) Slower communication within the chip c) Higher latency in memory access d) Limited scalability Answer: a) Reduced power usage compared to multiple single-core chips 26. How does a multicore processor appear to the operating system? a) As a single-core CPU b) As multiple standard CPUs c) As a device-specific processor d) As a master-slave system Answer: b) As multiple standard CPUs 27. What is a major drawback of NUMA (Non-Uniform Memory Access) systems? a) Limited scalability b) Increased latency for remote memory access c) Inability to support multicore processors d) Lack of shared physical address space Answer: b) Increased latency for remote memory access pg. 5 28. What can operating systems do to minimize the NUMA penalty? a) Use asymmetric multiprocessing b) Avoid shared system interconnects c) Employ careful CPU and memory management d) Eliminate multicore processor support Answer: c) Employ careful CPU and memory management 29. What is a key characteristic of multicore systems? a) Multiple cores on a single chip b) Slower on-chip communication than between-chip communication c) Higher power consumption than single-core chips d) Only suitable for single-user systems Answer: a) Multiple cores on a single chip 30. What is the primary purpose of clustered systems? a) Reduce power consumption b) Combine multiple systems to work together c) Replace multiprocessor systems d) Simplify single-core processing Answer: b) Combine multiple systems to work together 31. What type of clustering involves one machine in a hot-standby mode? a) Symmetric clustering b) Asymmetric clustering c) High-performance clustering d) Parallel clustering Answer: b) Asymmetric clustering 32. Where is the bootstrap program typically stored? a) Secondary storage b) RAM c) ROM or EPROM d) Cache memory Answer: c) ROM or EPROM pg. 6 33. In a non-multiprogramming system, what happens if a process waits for an I/O operation? a) The CPU remains idle b) Another process takes over immediately c) A new process is loaded d) The operating system shuts down Answer: a) The CPU remains idle 34. What is the main purpose of multitasking (time-sharing) systems? a) Run batch processes without user interaction b) Allow users to interact with jobs while they are running c) Reduce hardware interrupts d) Focus solely on single-user applications Answer: b) Allow users to interact with jobs while they are running 35. What mechanism enables programs larger than physical memory to run in a multitasking system? a) Cache memory b) Virtual memory c) Bootstrap program d) Asymmetric clustering Answer: b) Virtual memory 36. What is required to manage multiple processes in memory during multitasking? a) Only CPU scheduling b) Memory management c) Hot-standby mode d) Cache optimization Answer: b) Memory management 37. What does virtual memory achieve in a multitasking system? a) Restricts processes to physical memory limits b) Provides faster CPU switching c) Enables execution of processes not fully in memory d) Prevents deadlocks completely Answer: c) Enables execution of processes not fully in memory 38. What must a multitasking system provide to prevent deadlocks? a) A file system and storage management b) Only process swapping c) Mechanisms for process synchronization and communication d) Dedicated hardware for process management pg. 7 Answer: c) Mechanisms for process synchronization and communication 39. What is the purpose of dual-mode operation in an operating system? a) To enhance user interface design b) To allow direct access to hardware by user programs c) To protect the OS and system components d) To eliminate the need for privileged instructions Answer: c) To protect the OS and system components 40. What is the mode bit value when the system is in kernel mode? a) 1 b) 0 c) -1 d) Undefined Answer: b) 0 41. At system boot time, in which mode does the hardware start? a) User mode b) Kernel mode c) Supervisor mode d) Idle mode Answer: b) Kernel mode 42. What event causes the hardware to switch from user mode to kernel mode? a) When the CPU finishes a process b) During a system shutdown c) When a trap or interrupt occurs d) During user application execution Answer: c) When a trap or interrupt occurs 43. How does the operating system prevent infinite loops in user programs? a) By disabling the user mode b) By setting a timer before scheduling the process c) By increasing the process priority d) By directly controlling user applications Answer: b) By setting a timer before scheduling the process pg. 8 44. What happens when the timer counter reaches zero? a) The system shuts down b) The timer is reset c) An interrupt is generated d) The process continues execution Answer: c) An interrupt is generated 45. Which of the following instructions can only be executed in kernel mode? a) Arithmetic operations b) I/O control and timer management c) Application-level calculations d) Memory allocation for user programs Answer: b) I/O control and timer management 46. What happens if a user program attempts to execute a privileged instruction? a) The hardware executes the instruction directly b) The program continues without interruption c) The hardware traps it to the operating system d) The instruction is ignored without any action Answer: c) The hardware traps it to the operating system 47. Which instruction is an example of a privileged instruction? a) Arithmetic addition b) Switching to kernel mode c) Memory allocation in user space d) File system access by the user Answer: b) Switching to kernel mode 48. What role does the timer play in the operating system? a) It ensures the system remains in user mode b) It allows user programs to execute indefinitely c) It maintains control over the CPU by generating interrupts d) It provides memory management functions Answer: c) It maintains control over the CPU by generating interrupts 49. What is a process in the context of operating systems? a) A passive entity like a program b) A program in execution c) A memory management system d) A thread manager pg. 9 Answer: b) A program in execution 50. Which of the following is true about a thread? a) It is a type of memory unit b) It is a lightweight process within a process c) It is a type of file system manager d) It is responsible for disk scheduling Answer: b) It is a lightweight process within a process 51. What is the main difference between single-threaded and multi-threaded processes? a) Single-threaded processes require more memory b) Multi-threaded processes have one program counter per thread c) Multi-threaded processes do not execute in parallel d) Single-threaded processes have multiple program counters Answer: b) Multi-threaded processes have one program counter per thread 52. Which of the following is NOT an activity of process management? a) Scheduling processes on CPUs b) Allocating memory to processes c) Creating and deleting files d) Providing mechanisms for process synchronization Answer: c) Creating and deleting files 53. What is the purpose of memory management in an operating system? a) To store backup files onto stable media b) To keep track of memory usage and allocate space c) To schedule processes on the CPU d) To synchronize threads within processes Answer: b) To keep track of memory usage and allocate space 54. What is a key responsibility of the operating system in file-system management? a) Managing CPU scheduling b) Creating and deleting files and directories c) Allocating memory for processes d) Handling deadlocks Answer: b) Creating and deleting files and directories pg. 10 55. Which activity is NOT part of mass-storage management? a) Partitioning b) Disk scheduling c) Backup file storage d) Process synchronization Answer: d) Process synchronization 56. What does "mounting" refer to in the context of operating systems? a) Copying files into memory b) Making a file system available for use c) Allocating cache memory d) Scheduling disk access Answer: b) Making a file system available for use 57. What is the primary purpose of caching in a computer system? a) To permanently store frequently accessed data b) To copy data from slower to faster storage temporarily c) To allocate resources to processes d) To optimize file system mapping Answer: b) To copy data from slower to faster storage temporarily 58. Which OS activity involves determining access permissions like read, write, or append? a) File-system management b) Memory management c) Process management d) Cache management Answer: a) File-system management 59. What must multitasking environments ensure in the storage hierarchy? a) Use the most recent value b) Allow multiple processes c) Ensure single-user operation d) Restrict access to the CPU Answer: a) Use the most recent value 60. What must a multiprocessor environment provide in hardware? a) Fast access to devices b) Cache coherency c) Infinite memory allocation d) Restricted process execution pg. 11 Answer: b) Cache coherency 61. The I/O subsystem consists of which components? a) Buffering, caching, and spooling b) Paging, swapping, and spooling c) Interrupts, timers, and caching d) Devices, registers, and spooling Answer: a) Buffering, caching, and spooling 62. What are the two methods for handling I/O? a) Interrupt-based and buffer-based b) Synchronous and Asynchronous c) Sequential and Parallel d) Direct and Indirect Answer: b) Synchronous and Asynchronous 63. What occurs in synchronous I/O after it starts? a) Control returns immediately b) Control returns to the user program only upon completion c) User program is suspended d) The process continues without waiting Answer: b) Control returns to the user program only upon completion 64. What is the result of asynchronous I/O? a) The user program continues without waiting for I/O completion b) The process is suspended until I/O completes c) The operating system takes full control of the I/O process d) All processes are halted until the I/O completes Answer: a) The user program continues without waiting for I/O completion 65. What is the primary mechanism for controlling access to resources in an OS? a) Scheduling b) Protection c) File management d) Virtual memory Answer: b) Protection pg. 12 66. What is one example of a security threat to a system? a) Process synchronization b) Denial-of-service attacks c) Timer management d) Memory fragmentation Answer: b) Denial-of-service attacks 67. What ensures that a process executes only within its own address space? a) Memory-addressing hardware b) Device control registers c) Process synchronization d) File-system management Answer: a) Memory-addressing hardware 68. What ensures that no process can gain control of the CPU indefinitely? a) Process scheduling b) Protection c) Timer d) Cache management Answer: c) Timer 69. What must the OS do in the case of device-control registers? a) Allow user-level access b) Ensure they are not accessible to users c) Provide direct manipulation by programs d) Increase the speed of access Answer: b) Ensure they are not accessible to users 70. What is an example of a privileged instruction? a) User data retrieval b) Device control c) File manipulation d) Memory allocation Answer: b) Device control 71. What does the OS use to handle interrupt-driven processes? a) Memory management b) Resource allocation c) Timer management d) Device drivers pg. 13 Answer: d) Device drivers 72. What is a method for handling non-blocking I/O in a program? a) Synchronous execution b) Using a single-threaded application c) Multi-threaded applications d) Storing I/O operations in memory Answer: c) Multi-threaded applications 73. What is required for process protection in an OS? a) Memory-addressing hardware b) Shared memory allocation c) Process termination d) File-system management Answer: a) Memory-addressing hardware 74. What does privilege escalation allow a user to do? a) Change to an effective ID with more rights b) Decrease their rights c) Increase process execution time d) Limit access to system resources Answer: a) Change to an effective ID with more rights 75. What does virtualization allow operating systems to do? a) Run as standalone applications b) Run as applications within other operating systems c) Isolate hardware components d) Reduce system resource allocation Answer: b) Run as applications within other operating systems 76. What does virtualization abstract from a single computer? a) Software applications only b) Hardware (CPU, memory, disk drives, etc.) c) User permissions d) Network configurations Answer: b) Hardware (CPU, memory, disk drives, etc.) pg. 14 77. What is a distributed system? a) A single, monolithic computer system b) A collection of separate computer systems networked to share resources c) A local server running several applications d) A cloud-based system with no networked devices Answer: b) A collection of separate computer systems networked to share resources 78. How are networks characterized in distributed systems? a) Based on their geographical distance b) By the number of users they support c) By their software compatibility d) By their ability to run virtual environments Answer: a) Based on their geographical distance 79. What are the types of networks mentioned? a) Local, Mobile, and Wide Area Networks b) Local Area Network (LAN), Wide Area Network (WAN), Metropolitan Area Network (MAN), and Personal Area Network (PAN) c) Private and Public Networks d) LAN and Cloud Networks Answer: b) Local Area Network (LAN), Wide Area Network (WAN), Metropolitan Area Network (MAN), and Personal Area Network (PAN) 80. What does a distributed operating system provide? a) A centralized environment b) A less autonomous environment with communication between computers c) Multiple independent operating systems d) Exclusive control over hardware resources Answer: b) A less autonomous environment with communication between computers 81. What type of illusion does a distributed operating system create for the user? a) That the network is unstable b) That multiple operating systems are running c) That a single operating system controls the entire network d) That all computers are isolated Answer: c) That a single operating system controls the entire network pg. 15 82. Which type of computing environment is characterized by applications that run on a user’s device while connected to a network? a) Cloud Computing b) Traditional Computing c) Peer-to-Peer d) Client Server Answer: d) Client Server 83. What are the types of operating system environments mentioned? a) Distributed, Mobile, Cloud b) Traditional, Mobile, Client Server, Peer-to-Peer, Cloud Computing, Real-Time Embedded Systems c) Mobile, Embedded, Client Server d) Virtualized, Distributed, Traditional Answer: b) Traditional, Mobile, Client Server, Peer-to-Peer, Cloud Computing, Real-Time Embedded Systems 84. Which of the following is a characteristic of mobile systems compared to traditional laptops? a) Mobile systems have more memory capacity than laptops. b) Mobile systems support augmented reality with additional OS features like GPS. c) Mobile systems are used only for email and web browsing. d) Mobile systems use wired Ethernet for connectivity. Answer: b) Mobile systems support augmented reality with additional OS features like GPS. 85. In a Client-Server system, which entity responds to client requests? a) Peer-to-peer system b) Server systems c) Network systems d) Local systems Answer: b) Server systems 86. In Peer-to-Peer (P2P) systems, what is the relationship between clients and servers? a) P2P systems distinguish clients from servers b) There is no distinction between clients and servers c) Clients control the servers d) Servers communicate directly with other servers Answer: b) There is no distinction between clients and servers pg. 16 87. What is the defining feature of cloud computing? a) It delivers storage and applications as a service across a network. b) It uses physical storage devices to deliver services. c) It requires a client-server architecture. d) It involves peer-to-peer networking. Answer: a) It delivers storage and applications as a service across a network. 88. Embedded systems are commonly found in which of the following devices? a) Desktop computers b) Personal smartphones c) Car engines, manufacturing robots, and microwave ovens d) Office workstations Answer: c) Car engines, manufacturing robots, and microwave ovens 89. Which of the following is a type of hardware interrupt? a) System call b) I/O completion interrupt c) Exception or trap d) Timer interrupt Answer: b) I/O completion interrupt 90. Which of the following actions is considered a privileged instruction? a) Reading the clock b) Modifying entries in the device-status table c) Turning off interrupts d) Issuing a system call Answer: c) Turning off interrupts 91. What is a characteristic of real-time operating systems used in embedded systems? a) They have no time constraints. b) They do not use specialized hardware. c) They process tasks with well-defined, fixed time constraints. d) They run in a virtualized environment. Answer: c) They process tasks with well-defined, fixed time constraints. pg. 17 92. What service does the operating system provide for program execution? a) It helps in debugging the programs. b) It loads a program into memory and runs it. c) It allocates resources for running programs. d) It provides a graphical user interface for applications. Answer: b) It loads a program into memory and runs it. 93. Which of the following is a user interface variation that might be provided by an operating system? a) CLI b) GUI c) Touch-screen interface d) All of the above Answer: d) All of the above 94. What type of operation involves working with files or I/O devices? a) Program execution b) Resource allocation c) I/O operations d) Error detection Answer: c) I/O operations 95. Which of the following is an important function of file-system manipulation in an operating system? a) Debugging user programs b) Managing file storage and access c) Detecting errors in hardware d) Allocating memory resources Answer: b) Managing file storage and access 96. What is the primary purpose of the operating system’s communications service? a) To communicate between processes running on the same or different computers. b) To allow users to interface with the OS. c) To handle memory allocation for programs. d) To log system resource usage. Answer: a) To communicate between processes running on the same or different computers. 97. Which type of service is responsible for detecting and correcting errors in the system? a) Resource allocation b) Debugging facilities c) Error detection d) File-system manipulation pg. 18 Answer: c) Error detection 98. What service is necessary when multiple processes are running concurrently and need resources allocated to them? a) Debugging facilities b) Resource allocation c) Logging d) I/O operations Answer: b) Resource allocation 99. Why is logging an important service in an operating system? a) It helps in resource allocation. b) It tracks the usage of computer resources by users. c) It improves the user interface. d) It handles file-system manipulation. Answer: b) It tracks the usage of computer resources by users. 100. Which of the following services is designed to enhance the user's and programmer's ability to use the system effectively? a) Debugging facilities b) Protection and security c) Resource allocation d) Error detection Answer: a) Debugging facilities 101. What function is part of the protection and security service in an operating system? a) Providing system logs b) Handling program execution c) Protecting resources from unauthorized access d) Detecting hardware errors Answer: c) Protecting resources from unauthorized access 102. Who typically uses the Command-Line Interface (CLI) more efficiently? a) Novice users b) System administrators and power users c) Regular users d) All of the above Answer: b) System administrators and power users pg. 19 103. What is one advantage of using the CLI over a GUI? a) It has a more user-friendly design. b) It offers faster access to required tasks. c) It automatically completes repetitive tasks. d) It provides more visual features. Answer: b) It offers faster access to required tasks. 104. How can repetitive tasks be managed in the CLI? a) By using the GUI to automate them b) By recording command-line steps into a file c) By relying on system calls to handle them d) By using an API to execute them Answer: b) By recording command-line steps into a file 105. What is the role of system calls in an operating system? a) They provide a programming interface to OS services. b) They handle the user interface functions. c) They manage user data and preferences. d) They provide access to external hardware. Answer: a) They provide a programming interface to OS services. 106. What is one reason programmers prefer using an Application Programming Interface (API) over direct system calls? a) APIs are simpler to implement in hardware. b) APIs offer better program portability. c) APIs interact directly with the operating system. d) APIs provide more system-specific functionality. Answer: b) APIs offer better program portability. 107. How is a system call typically implemented in an operating system? a) By using a unique identifier or number for each system call. b) By calling the program directly from memory. c) By using an interpreter that processes the call at runtime. d) By mapping the call to a specific hardware device. Answer: a) By using a unique identifier or number for each system call. pg. 20 108. Why would an application programmer prefer programming according to an API rather than invoking actual system calls? a) APIs are less detailed and easier to work with. b) System calls provide better program portability. c) APIs ensure that a program works on any system supporting the same API. d) System calls do not require a run-time environment (RTE). Answer: c) APIs ensure that a program works on any system supporting the same API. 109. What is a primary advantage of using block and stack methods for passing parameters to the OS? a) They limit the number of parameters being passed. b) They can pass parameters in registers. c) They do not limit the number or length of parameters. d) They improve the performance of system calls. Answer: c) They do not limit the number or length of parameters. 110. In which case is the "block method" used for passing parameters to the OS in Linux? a) When there are fewer than five parameters. b) When there are more than five parameters. c) When parameters need to be passed in registers. d) When the program does not require parameters. Answer: b) When there are more than five parameters. 111. Which of the following is NOT one of the six major categories of system calls? a) Process control b) File management c) Memory management d) Device management Answer: c) Memory management 112. Which of the following is an example of a process control system call? a) Create file b) Open file c) Create process d) Read device Answer: c) Create process pg. 21 113. Which system call category includes operations like "create file" and "delete file"? a) Process control b) Device management c) File management d) Communications Answer: c) File management 114. What is a common model of inter-process communication in which processes exchange messages? a) Shared-memory model b) Message-passing model c) Memory-mapped model d) File-based model Answer: b) Message-passing model 115. Which system call category includes operations related to controlling access to resources and setting permissions? a) File management b) Protection c) Device management d) Communications Answer: b) Protection 116. What is the function of the "get time or date" system call? a) It sets system permissions. b) It retrieves the system's current time or date. c) It creates or deletes files. d) It manages device attributes. Answer: b) It retrieves the system's current time or date. 117. What is the purpose of the "allocate and free memory" system call? a) It manages file system permissions. b) It handles memory allocation for processes. c) It communicates between different processes. d) It sets or gets device attributes. pg. 22 Answer: b) It handles memory allocation for processes. 118. What type of system is Arduino? a) Single-tasking b) Multitasking c) Real-time d) Distributed Answer: a) Single-tasking 119. Which of the following is true about Arduino? a) It has a user interface. b) It runs multiple programs simultaneously. c) It has no operating system. d) It uses FreeBSD. Answer: c) It has no operating system. 120. Which of the following is an example of a multitasking system? a) Arduino b) FreeBSD c) Raspberry Pi d) Windows XP Answer: b) FreeBSD 121. What is a primary function of system programs (or system utilities)? a) Provide hardware control b) Provide a convenient environment for program development and execution c) Manage user accounts d) Execute application programs Answer: b) Provide a convenient environment for program development and execution 122. Which of the following is a type of system service for file management? a) File creation, deletion, and renaming b) File encryption c) Network file sharing d) File synchronization Answer: a) File creation, deletion, and renaming pg. 23 123. What kind of information is often stored as status information in system services? a) Available memory and disk space b) User settings and preferences c) Network traffic statistics d) Application error logs Answer: a) Available memory and disk space 124. Which of the following is part of system services under file modification? a) Debuggers b) Text editors c) Program compilers d) File-system utilities Answer: b) Text editors 125. Which system service supports programming languages? a) Program loading b) File manipulation c) Programming-language support d) Status information Answer: c) Programming-language support 126. What do background services (also known as daemons) typically do? a) They handle file system errors. b) They launch at boot time and run in the background. c) They manage user logins and passwords. d) They execute application programs. Answer: b) They launch at boot time and run in the background. 127. Which of the following is NOT considered a system service? a) File management b) Program execution c) Application programs d) Background services Answer: c) Application programs 128. What does a linker do during the compilation process? a) Compiles source code into binary b) Combines relocatable object files into a single executable file c) Debugs the source code d) Formats the application for each operating system pg. 24 Answer: b) Combines relocatable object files into a single executable file 129. Where does a program reside before it is executed? a) In the CPU b) In the primary memory c) On secondary storage as a binary executable file d) In the operating system kernel Answer: c) On secondary storage as a binary executable file 130. What is the role of a loader in the execution process? a) It compiles the source code. b) It moves the executable file from secondary storage to memory. c) It links multiple object files into a single file. d) It allocates memory for the application during execution. Answer: b) It moves the executable file from secondary storage to memory. 131. What is the first step in designing an operating system? a) Defining goals and specifications b) Selecting hardware c) Creating a user interface d) Choosing a programming language Answer: a) Defining goals and specifications 132. What are the two main categories of requirements for an operating system? a) User goals and hardware goals b) User goals and system goals c) System goals and hardware goals d) User preferences and system preferences Answer: b) User goals and system goals 133. Which of the following is a user goal for an operating system? a) Easy to design and implement b) Efficient and error-free c) Convenient to use, easy to learn, reliable, safe, and fast d) Flexible and maintainable Answer: c) Convenient to use, easy to learn, reliable, safe, and fast pg. 25 134. Which of the following is a system goal for an operating system? a) Easy to use and learn b) Flexible, reliable, error-free, and efficient c) Safe and fast d) Convenient to use Answer: b) Flexible, reliable, error-free, and efficient 135. What is the difference between policy and mechanism in OS design? a) Policy determines how something is done, while mechanism specifies what needs to be done. b) Policy specifies what needs to be done, while mechanism determines how to do it. c) Policy and mechanism are the same. d) Mechanism defines the system's goals. Answer: b) Policy specifies what needs to be done, while mechanism determines how to do it. 136. What is an example of a policy decision in operating system design? a) Timer b) CPU protection c) Interrupt after every 100 seconds d) Memory management Answer: c) Interrupt after every 100 seconds 137. What is the monolithic structure in operating systems? a) A system where the kernel is divided into several modules b) A system with no structure at all c) A structure where all functionality is in a single, static binary file d) A structure that uses a distributed model Answer: c) A structure where all functionality is in a single, static binary file 138. What is the kernel in a monolithic structure? a) The user interface of the operating system b) Everything below the system-call interface and above the physical hardware c) The system programs that interact with the hardware d) The memory management unit Answer: b) Everything below the system-call interface and above the physical hardware 139. Which of the following is an advantage of monolithic kernels? a) Easy to implement and extend b) High performance and efficiency c) Flexible and reliable d) Better fault tolerance pg. 26 Answer: b) High performance and efficiency 140. What is the main disadvantage of monolithic kernels? a) They are difficult to implement and extend b) They have poor performance c) They are easy to debug d) They require minimal system resources Answer: a) They are difficult to implement and extend 141. What is a characteristic of the monolithic approach in operating systems? a) Loosely coupled system b) Tightly coupled system c) Simple and modular design d) Flexible and easy to extend Answer: b) Tightly coupled system 142. What is an advantage of designing a loosely coupled system? a) Changes in one component affect other components as well b) Changes in one component affect only that component, not others c) It simplifies debugging and construction d) It requires no system components Answer: b) Changes in one component affect only that component, not others 143. How is modularity typically achieved in operating systems? a) By using a tightly coupled approach b) By dividing the system into layers c) By using a single monolithic kernel d) By keeping all components in one address space Answer: b) By dividing the system into layers 144. In the layered approach, what is the bottom layer? a) The user interface b) The hardware c) The kernel d) The system programs Answer: b) The hardware pg. 27 145. What is the advantage of the layered approach in OS design? a) Simplicity of construction and debugging b) Faster system performance c) Greater flexibility in adding new components d) Fewer system errors Answer: a) Simplicity of construction and debugging 146. If an error occurs while debugging a specific layer in a layered system, what can be concluded? a) The error is in one of the layers below it b) The error is in the kernel c) The error must be on that layer d) The error affects the entire system Answer: c) The error must be on that layer 147. What is a disadvantage of the layered approach in operating systems? a) It makes debugging more complex b) The functionality of each layer can be difficult to define c) It reduces system performance d) It increases the number of layers Answer: b) The functionality of each layer can be difficult to define 148. What is the main characteristic of a microkernel operating system? a) It integrates all services into the kernel. b) It removes nonessential components from the kernel and runs them in user-level programs. c) It uses a monolithic kernel for system operations. d) It combines user and kernel space into a single address space. Answer: b) It removes nonessential components from the kernel and runs them in user-level programs. 149. What is the primary advantage of microkernels in terms of system extensibility? a) All new services are added to kernel space. b) It requires modification of the kernel to add services. c) New services are added to user space, so they do not require modification of the kernel. d) It simplifies the system architecture, making it easier to extend. Answer: c) New services are added to user space, so they do not require modification of the kernel. 150. Which of the following is an example of a microkernel operating system? a) Linux b) Windows c) MachOS d) Ubuntu pg. 28 Answer: c) MachOS 151. What is the communication method used between user modules in a microkernel system? a) Shared memory b) Direct function calls c) Message passing d) File system manipulation Answer: c) Message passing 152. What is one of the main advantages of microkernels regarding system security and reliability? a) More code runs in kernel mode, making the system more stable. b) Less code runs in kernel mode, reducing potential failure points. c) The kernel is larger, making it harder for attackers to target. d) All services run in the kernel, which is more secure. Answer: b) Less code runs in kernel mode, reducing potential failure points. 153. Which of the following is a disadvantage of microkernel systems? a) They have better performance than monolithic kernels. b) The communication between user space and kernel space introduces performance overhead. c) Microkernels require large amounts of kernel space. d) They are difficult to port to new hardware. Answer: b) The communication between user space and kernel space introduces performance overhead. 154. What is a hybrid operating system? a) An operating system that uses only a single model for its structure. b) An operating system that combines multiple structural models to meet different needs. c) An operating system that only uses a monolithic kernel. d) An operating system that only uses a microkernel. Answer: b) An operating system that combines multiple structural models to meet different needs. 155. Which of the following is an example of a hybrid operating system? a) Linux, which combines monolithic and modular structures. b) Windows, which is purely monolithic. c) macOS, which only uses a microkernel. d) FreeBSD, which uses a layered approach exclusively. Answer: a) Linux, which combines monolithic and modular structures. pg. 29 156. What is the purpose of the Unified Extensible Firmware Interface (UEFI) in modern systems? a) To replace the BIOS and provide faster boot times. b) To replace the operating system kernel. c) To enhance the graphics rendering performance of the OS. d) To provide an alternative to system logging. Answer: a) To replace the BIOS and provide faster boot times. 157. What is one of the advantages of using UEFI over BIOS? a) UEFI is slower and less efficient. b) UEFI supports better 32-bit systems. c) UEFI provides support for larger disks and better 64-bit system support. d) UEFI does not support the boot process for modern operating systems. Answer: c) UEFI provides support for larger disks and better 64-bit system support. 158. What does the bootstrap program do during the system boot process? a) It initializes and runs the user interface. b) It loads the kernel into memory and starts the operating system. c) It performs graphical rendering tasks for the user interface. d) It tunes the system’s performance and fixes bugs. Answer: b) It loads the kernel into memory and starts the operating system. 159. In the event of a system crash, what type of file is generated to capture the state of the system? a) Log file b) Core dump file c) Boot loader file d) Trace file Answer: b) Core dump file 160. What is the purpose of performance tuning during the debugging process? a) To fix bugs in the application code. b) To generate a crash dump. c) To add new features to the operating system. d) To improve system performance by identifying and eliminating bottlenecks. Answer: d) To improve system performance by identifying and eliminating bottlenecks. 161. What type of file is generated when there is an OS failure, such as a crash? a) Performance log file b) Crash dump file c) Debug file d) Trace file pg. 30 Answer: b) Crash dump file 162. What is a process? a) A program in execution. b) A passive entity stored on disk. c) A collection of instructions in a file. d) A hardware component responsible for program execution. Answer: a) A program in execution. 163. What happens when a program becomes a process? a) It is saved to disk. b) It is loaded into memory and begins execution. c) It is terminated. d) It remains a passive entity. Answer: b) It is loaded into memory and begins execution. 164. Which of the following is a common technique for loading executable files? a) Using only a command-line interface (CLI). b) Using only a graphical user interface (GUI). c) Both using GUI and CLI. d) Using only disk management tools. Answer: c) Both using GUI and CLI. 165. What is the memory layout of a process divided into? a) Only the data section and heap section. b) Text, data, heap, and stack sections. c) Only the heap and stack sections. d) Text, data, and CPU sections. Answer: b) Text, data, heap, and stack sections. 166. In a process, which section contains the program code (the executable code)? a) Stack section. b) Data section. c) Text section. d) Heap section. Answer: c) Text section. pg. 31 167. What happens to the stack and heap sections during program execution? a) They remain fixed in size. b) They are not used during execution. c) They shrink and grow dynamically. d) Only the stack section grows, and the heap shrinks. Answer: c) They shrink and grow dynamically. 168. What are the states that a process can be in during execution? a) Ready, Waiting, Terminated, and Running. b) New, Waiting, Running, Ready, and Terminated. c) Executing, Stopped, and Waiting. d) Starting, Processing, and Finished. Answer: b) New, Waiting, Running, Ready, and Terminated. 169. How many processes can be running on any processor core at any given instant? a) Multiple processes can run simultaneously. b) No processes can run at the same time c) Only one process can be running. d) The number of processes is dependent on the available memory. Answer: c) Only one process can be running. 170. What is the difference between the text, data, heap, and stack sections of a process? a) They have identical sizes and functions. b) The text and data sections are fixed in size, while the heap and stack grow or shrink during execution. c) The stack section stores program code, while the heap section contains temporary data. d) The heap section is fixed, while the text and data sections grow dynamically. Answer: b) The text and data sections are fixed in size, while the heap and stack grow or shrink during execution 171. What does a Process Control Block (PCB) serve as in an operating system? a) A repository for all data needed to start or restart a process. b) A repository for CPU instructions c) A storage area for process execution code. d) A communication channel between processes. Answer: a) A repository for all data needed to start or restart a process. pg. 32 172. In terms of processes, what is a "parent" process? a) A process that has no children. b) A process that creates another process. c) A process that is always in the "Ready" state. d) A process that terminates all its child processes. Answer: b) A process that creates another process. 173. What is the term used to describe the number of processes currently in memory? a) Degree of execution. b) Process queue. c) Degree of multiprogramming. d) Process state. Answer: c) Degree of multiprogramming. 174. What is the main purpose of multiprogramming? a) To allow multiple processes to execute on separate cores. b) To maximize CPU utilization by ensuring a process is running at all times. c) To prioritize CPU-bound tasks over I/O-bound tasks. d) To keep the system in a constant state of waiting. Answer: b) To maximize CPU utilization by ensuring a process is running at all times. 175. What is the main difference between the "Ready queue" and the "Wait queue"? a) The Ready queue holds processes that are waiting for I/O, while the Wait queue holds processes that are ready to execute. b) The Ready queue contains processes waiting for memory allocation, while the Wait queue contains processes in the execution state. c) The Ready queue holds processes that are ready to execute, while the Wait queue contains processes waiting for resources. d) There is no significant difference between the Ready and Wait queues. Answer: c) The Ready queue holds processes that are ready to execute, while the Wait queue contains processes waiting for resources. 176. What is a "context switch"? a) A process where the CPU handles multiple processes at once. b) A function to initialize a process when it is first created. c) A procedure where the OS saves the state of a process before switching to another. d) A mechanism that pauses processes for memory management. Answer: c) A procedure where the OS saves the state of a process before switching to another. pg. 33 177. Which of the following steps occurs during a context switch? a) The kernel loads new instructions from the disk. b) The system saves the state of the current process and loads the state of the next process. c) The process state is moved from the ready queue to the waiting queue. d) The system halts all processes and reboots. Answer: b) The system saves the state of the current process and loads the state of the next process. 178. What is the main function of process creation in an operating system? a) To assign a unique process ID and allocate system resources. b) To terminate existing processes. c) To assign multiple cores to a single process. d) To create a single process that does not require any system resources. Answer: a) To assign a unique process ID and allocate system resources. 179. What is used to identify and manage processes in most systems? a) Process state number (psn). b) Process identifier (pid). c) Process scheduling time. d) Process execution order. Answer: b) Process identifier (pid). 180. What does a parent process create when it forms a tree of processes? a) A direct child process that cannot create other processes. b) A series of independent processes. c) Child processes, which can also create their own processes. d) A process that does not interact with any other processes. Answer: c) Child processes, which can also create their own processes. 181. What system call is used by a process to request termination in an operating system? a) exit() b) terminate() c) stop() d) close() Answer: a) exit() 182. What happens when a parent process terminates before calling the wait() system call? a) The child process is immediately deleted. b) The child process becomes an orphan process. c) The child process continues execution without any issues. d) The child process is paused until the parent terminates. pg. 34 Answer: b) The child process becomes an orphan process. 183. What is a zombie process? a) A process that is still running but has no memory assigned to it. b) A process that has terminated but is not yet removed from the process table due to the parent not calling wait(). c) A process that is waiting for its child processes to terminate. d) A process that does not have a parent process. Answer: b) A process that has terminated but is not yet removed from the process table due to the parent not calling wait(). 184. Which system call allows a parent process to wait for a child process to terminate? a) exit() b) create() c) wait() d) terminate() Answer: c) wait() 185. What is the primary distinction between independent and cooperating processes? a) Independent processes can share data with others; cooperating processes cannot. b) Independent processes do not share data, while cooperating processes can affect or be affected by other processes, including sharing data. c) Independent processes run on different CPUs; cooperating processes always run on the same CPU. d) Independent processes communicate via shared memory; cooperating processes communicate via message passing. Answer: b) Independent processes do not share data, while cooperating processes can affect or be affected by other processes, including sharing data. 186. Which of the following is an advantage of shared memory for interprocess communication? a) It is easier to implement in a distributed system. b) It can be faster than message passing since it does not require kernel intervention. c) It is better for exchanging smaller amounts of data. d) It automatically handles synchronization issues. Answer: b) It can be faster than message passing since it does not require kernel intervention. 187. What is the main advantage of message passing in interprocess communication? a) It is faster than shared memory. b) It allows direct synchronization of processes. c) It is easier to implement in a distributed system. d) It avoids the need for buffering. pg. 35 Answer: c) It is easier to implement in a distributed system. 188. What issue arises when using shared memory for interprocess communication? a) Synchronization of access to shared memory. b) Lack of a standard communication link. c) Difficulty in implementing message passing. d) Difficulty in identifying the processes involved. Answer: a) Synchronization of access to shared memory. 189. Which type of buffer assumes that there is a fixed buffer size? a) Unbounded-buffer b) Dynamic-buffer c) Circular-buffer d) Bounded-buffer Answer: d) Bounded-buffer 190. What does the term "logical implementation of a communication link" refer to in interprocess communication? a) The physical medium used for communication. b) The specifics of how data is sent and received, including direct or indirect communication, synchronization, and buffering. c) The hardware used for communication. d) The encryption methods used in communication. Answer: b) The specifics of how data is sent and received, including direct or indirect communication, synchronization, and buffering. 191. In the unbounded-buffer scenario, what happens when the producer process generates new items? a) The producer waits if the buffer is full. b) The producer never waits, and can always produce new items. c) The consumer process waits for items to be produced. d) The producer pauses until the consumer processes items. Answer: b) The producer never waits, and can always produce new items. 192. In the bounded-buffer scenario, what happens when the buffer is full? a) The producer never waits, and items are produced continuously. b)The producer discards any new items to avoid waiting c) The consumer waits until the buffer is full. d) The producer must wait until the consumer consumes some items and frees space in the buffer Answer: d) The producer must wait until the consumer consumes some items and frees space in the buffer. pg. 36 193. What does the term "bounded-buffer" mean in the context of interprocess communication? a) There is no limit on the size of the buffer. b) The buffer has a fixed size, which limits the number of items that can be stored. c) The producer process cannot add any items to the buffer. d) The buffer is always full and the consumer waits indefinitely. Answer: b) The buffer has a fixed size, which limits the number of items that can be stored. 194. What happens when the buffer is empty in the unbounded-buffer model? a) The producer waits for the consumer to consume the items. b) Both the producer and consumer wait for the buffer to be filled c)The consumer waits until items are available in the buffer. d) The producer stops producing items. Answer: c) The consumer waits until items are available in the buffer. 1. In direct communication between processes, the sender process specifies: a) The name of the recipient process. b) The type of message being sent. c) The mailbox ID where the message should be sent. d) The operating system function to use for communication. Answer: a) The name of the recipient process. 2. Which of the following is not true for direct communication? a) Processes must explicitly name each other. b) The communication link is associated with exactly two processes. c) A link may be unidirectional or bi-directional. d) Multiple links can exist between the same pair of processes. Answer: d) Multiple links can exist between the same pair of processes. 3. What is an advantage of indirect communication using mailboxes? a) It simplifies message passing as processes don't need to know each other's identities. b) It ensures that only one link exists between any pair of processes. c) It eliminates the need for process synchronization. d) It makes communication faster by avoiding message queues. Answer: a) It simplifies message passing as processes don't need to know each other's identities. 4. What happens in a blocking send operation? a) The sender immediately resumes operation after sending the message. b) The sender process is blocked until the message is received by the recipient or mailbox. c) The sender process never waits for the recipient process to be ready. d) The sender sends a Null message if the mailbox is full. Answer: b) The sender process is blocked until the message is received by the recipient or mailbox. pg. 37 5. What is the characteristic of a zero-capacity queue in IPC buffering? a) The sender never waits. b) Messages are automatically buffered. c) No messages are queued; the sender must wait until the recipient is ready. d) Messages are stored indefinitely until the recipient processes them. Answer: c) No messages are queued; the sender must wait until the recipient is ready. 6. Which statement is true about ordinary and named pipes? a) Ordinary pipes can be accessed without a parent-child relationship. b) Named pipes require a parent-child relationship between processes. c) Ordinary pipes are used for communication between a parent and a child process. d) Named pipes can only be created in the command line environment. Answer: c) Ordinary pipes are used for communication between a parent and a child process. 7. Which of the following combinations ensures a rendezvous between sender and receiver processes? a) Blocking send and non-blocking receive. b) Non-blocking send and blocking receive. c) Blocking send and blocking receive. d) Non-blocking send and non-blocking receive. Answer: c) Blocking send and blocking receive. 8. What does the UNIX command ls | less signify? a) The ls command consumes the output of the less command. b) The less command produces input for the ls command. c) The ls command serves as the producer, and its output is consumed by the less command. d) The two commands run independently without interacting. Answer: c) The ls command serves as the producer, and its output is consumed by the less command. 9. What does a socket consist of in a networked communication system? a) The process ID of both communicating processes. b) The mailbox ID shared between processes. c) A combination of an IP address and a port number. d) A direct link between the sender and receiver processes. Answer: c) A combination of an IP address and a port number. 10. Which statement is true for an unbounded buffer in IPC? a) The sender must wait if the buffer is full. b) The buffer has a fixed length of n messages. c) The sender never waits, as the buffer has no practical limit. d) Messages in the buffer are automatically discarded after processing. Answer: c) The sender never waits, as the buffer has no practical limit. pg. 38 pg. 39