50 multiple-choice questions with answers and detailed explanations. Untimed — choose an answer to check it instantly.
0/50 answered0 correct
Question 1 of 50
What is the purpose of the long-term scheduler in an operating system?
Correct answer: B) To decide which processes should be added to the ready queue
Explanation: Explanation: The long-term scheduler selects processes from the job pool and loads them into the ready queue to be executed by the short-term scheduler.
Question 2 of 50
In a system with demand paging, what causes a page fault?
Correct answer: A) When a process accesses a page that is not in main memory
Explanation: Explanation: A page fault occurs when a process tries to access a page that is not currently loaded into main memory, requiring it to be fetched from secondary storage.
Question 3 of 50
Which of the following is true about the First-Come, First-Served (FCFS) scheduling algorithm?
Correct answer: A) It can cause the convoy effect
Explanation: Explanation: In FCFS scheduling, processes are executed in the order they arrive. This can lead to the convoy effect, where short processes have to wait behind long processes, increasing the average waiting time.
Question 4 of 50
What is a major disadvantage of the Banker’s algorithm?
Correct answer: C) It requires knowing the maximum resource requirements in advance
Explanation: Explanation: The Banker’s algorithm requires each process to declare its maximum potential resource use in advance, which can be difficult to predict.
Question 5 of 50
What is the purpose of the short-term scheduler?
Correct answer: A) To select which process should be executed next
Explanation: Explanation: The short-term scheduler selects processes from the ready queue and allocates CPU time to them based on a scheduling algorithm.
Question 6 of 50
In Round-Robin scheduling, what happens when a process’s time quantum expires?
Correct answer: C) It is moved to the end of the ready queue
Explanation: Explanation: In Round-Robin scheduling, if a process’s time quantum expires, it is moved to the end of the ready queue, and the next process in line is given CPU time.
Question 7 of 50
Which of the following is an example of preemptive scheduling?
Correct answer: C) Round-Robin
Explanation: Explanation: Round-Robin scheduling is preemptive because a process can be interrupted and moved back to the ready queue when its time quantum expires.
Question 8 of 50
What is the key advantage of dynamic linking?
Correct answer: B) It reduces memory usage by sharing library code among processes
Explanation: Explanation: Dynamic linking allows processes to share a single copy of a library in memory, reducing overall memory usage and enabling more efficient use of system resources.
Question 9 of 50
What is the purpose of a page replacement algorithm?
Correct answer: B) To select which page to remove from memory when a new page must be loaded
Explanation: Explanation: A page replacement algorithm determines which page should be removed from memory to make space for a new page when there is no free space.
Question 10 of 50
Which of the following is true about the Least Recently Used (LRU) page replacement algorithm?
Correct answer: C) It removes the page that has not been used for the longest time
Explanation: Explanation: The LRU algorithm assumes that pages used recently are more likely to be used again and removes the page that has been unused for the longest time.
Question 11 of 50
Which of the following is NOT a deadlock prevention strategy?
Correct answer: D) Request and release
Explanation: Explanation: Circular wait is a condition that can lead to deadlock. Deadlock prevention strategies aim to eliminate such conditions.
Question 12 of 50
In segmentation, what is a segment?
Correct answer: A) A portion of the virtual address space that corresponds to a specific program module
Explanation: Explanation: In segmentation, a segment is a variable-sized portion of memory that corresponds to a logical unit of a program, such as a function or data structure.
Question 13 of 50
What is the primary drawback of the Best-Fit memory allocation strategy?
Correct answer: B) It creates many small holes in memory, leading to fragmentation
Explanation: Explanation: The Best-Fit strategy often leaves small, unusable memory fragments, increasing external fragmentation.
Question 14 of 50
What is a context switch?
Correct answer: B) Saving the state of one process and loading the state of another
Explanation: Explanation: A context switch occurs when the operating system switches from executing one process to another, requiring the state of the old process to be saved and the state of the new process to be loaded.
Question 15 of 50
In a paging system, what is the purpose of the Translation Lookaside Buffer (TLB)?
Correct answer: B) To map virtual addresses to physical addresses more quickly
Explanation: Explanation: The TLB is a cache that stores recent mappings of virtual addresses to physical addresses, speeding up address translation in a paging system.
Question 16 of 50
What is the main goal of the I/O scheduler?
Correct answer: C) To optimize the performance of input/output operations
Explanation: Explanation: The I/O scheduler determines the order in which I/O requests are processed, aiming to minimize wait times and improve overall system performance.
Question 17 of 50
What happens during a fork() system call in Unix-based systems?
Correct answer: A) A new process is created as an exact copy of the parent
Explanation: Explanation: The fork() system call creates a new process, called the child, which is an exact duplicate of the parent process, except for the returned value.
Question 18 of 50
What is a major disadvantage of contiguous memory allocation?
Correct answer: A) It increases external fragmentation
Explanation: Explanation: Contiguous memory allocation requires all of a process’s memory to be allocated in one continuous block, leading to external fragmentation as memory is allocated and freed.
Question 19 of 50
In a multi-threaded environment, what does thread synchronization ensure?
Correct answer: B) That threads do not interfere with each other while accessing shared resources
Explanation: Explanation: Thread synchronization mechanisms, like mutexes and semaphores, ensure that threads do not simultaneously modify shared data, preventing race conditions.
Question 20 of 50
What is the primary function of the dispatcher in an operating system?
Correct answer: C) To switch the CPU to the process selected by the short-term scheduler
Explanation: Explanation: The dispatcher is responsible for context switching, which involves switching the CPU from one process to another as determined by the short-term scheduler.
Question 21 of 50
What is the difference between a process and a thread?
Correct answer: A) A process has its own memory space, while threads share memory within a process
Explanation: Explanation: Processes run in separate memory spaces, whereas threads within the same process share the same memory space.
Question 22 of 50
Which of the following is an advantage of using threads?
Correct answer: B) Threads share the same address space, allowing for easier data sharing
Explanation: Explanation: Sharing the same address space makes communication and data sharing between threads more efficient compared to processes, which require inter-process communication (IPC).
Question 23 of 50
What occurs during the boot process of a computer?
Correct answer: B) The operating system is loaded into memory
Explanation: Explanation: During the boot process, the BIOS or UEFI firmware initializes the hardware and loads the operating system into memory so that it can begin operation.
Question 24 of 50
In which scheduling algorithm does the process with the shortest burst time get executed first?
Correct answer: B) Shortest Job First (SJF)
Explanation: Explanation: The Shortest Job First (SJF) scheduling algorithm prioritizes processes based on the length of their next CPU burst, executing the shortest first.
Question 25 of 50
What is the purpose of a mutex in multithreading?
Correct answer: B) To ensure that only one thread can access a resource at a time
Explanation: Explanation: A mutex (mutual exclusion) is used to protect shared resources in multithreaded applications, ensuring that only one thread can access the resource at any given time.
Question 26 of 50
What is thrashing in an operating system?
Correct answer: B) High disk activity due to page faults
Explanation: Explanation: Thrashing occurs when a system spends more time swapping pages in and out of memory than executing processes, leading to poor performance.
Question 27 of 50
Which of the following describes the "busy waiting" technique?
Correct answer: B) A process actively checking for a condition to be met
Explanation: Explanation: Busy waiting occurs when a process continuously checks for a condition to be true, wasting CPU cycles while waiting for a resource.
Question 28 of 50
What is the main function of the file system in an operating system?
Correct answer: C) To manage data storage and retrieval
Explanation: Explanation: The file system is responsible for organizing, storing, and retrieving data on storage devices, providing a way to access and manage files.
Question 29 of 50
In a distributed system, what is the purpose of remote procedure calls (RPCs)?
Correct answer: B) To execute processes on a remote server as if they were local
Explanation: Explanation: Remote Procedure Calls (RPCs) allow a program to execute code on a remote server, making the networked operation transparent to the user.
Question 30 of 50
Which of the following is a benefit of using virtual memory?
Correct answer: B) It allows the system to run more processes than can fit in physical memory
Explanation: Explanation: Virtual memory allows a system to use disk space to extend physical memory, enabling it to run more processes than the available physical RAM.
Question 31 of 50
What is the role of the kernel in an operating system?
Correct answer: A) To manage hardware and system resources
Explanation: Explanation: The kernel is the core component of an operating system, responsible for managing hardware, system resources, and facilitating communication between software and hardware.
Question 32 of 50
What does the term "context switching" refer to in operating systems?
Correct answer: C) Saving and restoring the state of a CPU so that multiple processes can share a single CPU
Explanation: Explanation: Context switching allows the operating system to switch from one process to another by saving the state of the current process and restoring the state of the next process.
Question 33 of 50
What does the term "blocking I/O" mean?
Correct answer: B) I/O operations that cause the process to be suspended until the operation is completed
Explanation: Explanation: Blocking I/O operations halt the execution of the process until the I/O operation is completed, preventing further processing.
Question 34 of 50
In operating systems, what is a "semaphore"?
Correct answer: A) A signaling mechanism that controls access to shared resources
Explanation: Explanation: A semaphore is a synchronization primitive that helps manage concurrent access to shared resources by signaling when a resource is available or in use.
Question 35 of 50
What is the purpose of a file control block (FCB)?
Correct answer: C) To maintain metadata about a file
Explanation: Explanation: The file control block (FCB) contains information about a file, including its location, size, and access permissions, enabling the operating system to manage file operations.
Question 36 of 50
Which scheduling algorithm minimizes the average waiting time for a set of processes?
Correct answer: B) Shortest Job First (SJF)
Explanation: Explanation: The Shortest Job First (SJF) scheduling algorithm minimizes average waiting time by executing the shortest processes first.
Question 37 of 50
In a deadlock situation, which condition ensures that the system remains in a safe state?
Correct answer: D) Wait for all resources
Explanation: Explanation: To prevent deadlocks, one way is to avoid the condition of holding resources while waiting for others by ensuring that processes wait until they can acquire all necessary resources simultaneously.
Question 38 of 50
What is a main benefit of using RAID (Redundant Array of Independent Disks)?
Correct answer: B) It provides data redundancy and improves fault tolerance
Explanation: Explanation: RAID configurations allow for data to be distributed across multiple disks, providing redundancy and improving data recovery in case of disk failures.
Question 39 of 50
Which of the following describes "swapping" in operating systems?
Correct answer: B) Transferring processes between main memory and disk storage
Explanation: Explanation: Swapping is the process of moving entire processes in and out of physical memory to and from secondary storage, allowing the system to manage limited memory resources.
Question 40 of 50
What is the purpose of a disk scheduler?
Correct answer: C) To optimize disk I/O operations
Explanation: Explanation: The disk scheduler determines the order in which disk I/O requests are processed, aiming to minimize seek time and improve overall disk performance.
Question 41 of 50
What is the main advantage of using dynamic memory allocation?
Correct answer: B) It allows for efficient use of memory
Explanation: Explanation: Dynamic memory allocation enables programs to request and release memory as needed, leading to more efficient use of available memory resources.
Question 42 of 50
In a microkernel architecture, which services are typically implemented in user space?
Correct answer: D) Most OS services
Explanation: Explanation: A microkernel architecture moves as many services as possible from the kernel to user space, improving modularity and allowing for easier maintenance and updates.
Question 43 of 50
Which scheduling algorithm uses priorities to determine the order of process execution?
Correct answer: C) Priority Scheduling
Explanation: Explanation: Priority scheduling assigns priorities to processes and executes the highest-priority processes first, allowing for responsive task management based on importance.
Question 44 of 50
What is the function of the page table in a paging system?
Correct answer: B) To map virtual addresses to physical addresses
Explanation: Explanation: The page table is used to translate virtual addresses generated by a program into physical addresses in memory, allowing the operating system to manage memory effectively.
Question 45 of 50
Which of the following best defines "starvation" in process scheduling?
Correct answer: D) A process is continuously preempted by higher-priority processes
Explanation: Explanation: Starvation occurs when a lower-priority process is perpetually denied CPU time because higher-priority processes keep executing.
Question 46 of 50
What is the purpose of a system call in an operating system?
Correct answer: B) To allow user programs to request services from the kernel
Explanation: Explanation: System calls are the primary means by which user applications interact with the operating system, requesting services such as file operations or process control.
Question 47 of 50
In what scenario would a process be placed in the "blocked" state?
Correct answer: A) When it is waiting for user input
Explanation: Explanation: A process enters the blocked state when it cannot proceed with execution because it is waiting for an external event, such as user input or an I/O operation.
Question 48 of 50
What is the significance of the kernel space and user space distinction?
Correct answer: B) It separates privileged code from unprivileged code for security
Explanation: Explanation: The distinction between kernel space and user space enhances security by preventing user processes from directly accessing kernel resources and memory, protecting the system from malicious actions.
Question 49 of 50
In which scenario would "inter-process communication" (IPC) be necessary?
Correct answer: B) When processes need to share data or synchronize actions
Explanation: Explanation: IPC mechanisms allow processes to communicate and synchronize their actions when they need to share information or resources.
Question 50 of 50
What is the role of the operating system's scheduler?
Correct answer: C) To decide the order of process execution
Explanation: Explanation: The operating system's scheduler is responsible for determining which processes run at any given time, managing CPU resources to optimize performance and responsiveness.
Set 2 complete
You scored 0%
0 correct out of 0 answered (50 questions in this set).