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 a process control block (PCB)?
Correct answer: B) To manage system I/O operations
Explanation: A PCB contains process-specific information like process state, process ID, program counter, registers, and memory limits, allowing the operating system to manage processes efficiently.
Question 2 of 50
What is the primary function of the short-term scheduler?
Correct answer: B) To select which process will be executed next by the CPU
Explanation: The short-term scheduler (CPU scheduler) selects processes from the ready queue to execute on the CPU, ensuring efficient CPU utilization.
Question 3 of 50
In which state does a process wait for an event to occur?
Correct answer: C) Blocked
Explanation: A process is in the blocked (or waiting) state when it is waiting for some event, such as I/O completion, to continue its execution.
Question 4 of 50
What occurs when a process transitions from the ready state to the running state?
Correct answer: C) The CPU scheduler selects the process to run
Explanation: A process transitions from ready to running when it is selected by the CPU scheduler for execution on the CPU.
Question 5 of 50
What is context switching?
Correct answer: C) The process of switching the CPU from one process to another
Explanation: Context switching occurs when the CPU is switched from executing one process to another. The CPU's state (including registers and program counter) is saved and restored.
Question 6 of 50
Which scheduling algorithm is most suitable for time-sharing systems?
Correct answer: C) Round Robin
Explanation: Round Robin scheduling is designed for time-sharing systems, where each process is given a fixed time slice and the CPU switches between processes in a circular queue.
Question 7 of 50
In priority scheduling, which process is selected to run next?
Correct answer: C) The process with the highest priority
Explanation: In priority scheduling, processes are assigned priorities, and the one with the highest priority is selected to run next.
Question 8 of 50
What is a deadlock?
Correct answer: B) When multiple processes are stuck waiting on each other’s resources
Explanation: Deadlock occurs when processes are in a circular waiting state, with each process holding resources that the other processes need to proceed.
Question 9 of 50
What is the purpose of mutual exclusion in concurrent systems?
Correct answer: B) To ensure that only one process accesses a shared resource at a time
Explanation: Mutual exclusion ensures that when one process is using a shared resource, no other process can access it simultaneously, preventing race conditions.
Question 10 of 50
What does the Banker's Algorithm help prevent?
Correct answer: B) Deadlock
Explanation: The Banker's Algorithm is used to avoid deadlock by ensuring that resource allocation does not lead to unsafe states where deadlock could occur.
Question 11 of 50
What is the function of the long-term scheduler?
Correct answer: B) To load processes into the ready queue
Explanation: The long-term scheduler selects which processes should be brought into the ready queue, regulating the degree of multiprogramming in the system.
Question 12 of 50
Which of the following is true about preemptive scheduling?
Correct answer: B) The scheduler can forcibly remove a process from the CPU
Explanation: Preemptive scheduling allows the operating system to interrupt the currently running process and allocate the CPU to a higher-priority process.
Question 13 of 50
What is the main goal of a time-sharing system?
Correct answer: B) To minimize response time
Explanation: Time-sharing systems aim to provide quick responses to user inputs by sharing CPU time between processes, minimizing the waiting time for each process.
Question 14 of 50
Which type of memory allocation leads to external fragmentation?
Correct answer: B) Segmentation
Explanation: Segmentation can lead to external fragmentation as memory is allocated in variable-sized segments, which can leave gaps between allocated blocks over time.
Question 15 of 50
What is the purpose of a page table?
Correct answer: A) To map logical addresses to physical addresses
Explanation: A page table translates a process's logical (virtual) addresses into physical addresses in memory, facilitating efficient memory management.
Question 16 of 50
What is a page fault?
Correct answer: B) When a process tries to access memory that is not in RAM
Explanation: A page fault occurs when a process tries to access a page that is not currently in main memory (RAM), prompting the OS to load it from secondary storage.
Question 17 of 50
What is demand paging?
Correct answer: B) Loading pages into memory only when they are needed
Explanation: Demand paging loads pages into memory only when they are required by the process, which helps reduce memory usage and improves performance.
Question 18 of 50
In which memory management scheme are fixed-size blocks used?
Correct answer: B) Paging
Explanation: Paging divides memory into fixed-size blocks (pages) and maps them to physical frames, helping to prevent external fragmentation.
Question 19 of 50
What is the main advantage of virtual memory?
Correct answer: B) It allows processes to run even if they exceed physical memory limits
Explanation: Virtual memory enables processes to use more memory than is physically available by paging memory in and out of secondary storage as needed.
Question 20 of 50
What is thrashing in memory management?
Correct answer: B) When the CPU spends most of its time swapping pages in and out of memory
Explanation: Thrashing occurs when there is excessive paging, causing the CPU to spend more time on page faults than executing processes, significantly degrading performance.
Question 21 of 50
What is the role of the TLB (Translation Lookaside Buffer)?
Correct answer: B) To cache recently used page table entries
Explanation: The TLB is a high-speed cache used to store recent translations of logical to physical addresses, speeding up memory access for frequently accessed pages.
Question 22 of 50
What does FIFO page replacement stand for?
Correct answer: B) First In First Out
Explanation: FIFO page replacement works by removing the oldest page from memory when a new page needs to be loaded, regardless of the page's usage frequency.
Question 23 of 50
In a multi-level paging system, why is the page table divided into levels?
Correct answer: B) To reduce memory usage for large address spaces
Explanation: Multi-level paging divides the page table into smaller levels to reduce the amount of memory needed to store large page tables for processes with large address spaces.
Question 24 of 50
Which scheduling algorithm may cause starvation?
Correct answer: C) Shortest Job Next
Explanation: In the Shortest Job Next (SJN) scheduling algorithm, longer processes may be starved if shorter processes continuously arrive and are prioritized over them.
Question 25 of 50
What is a critical section in concurrency?
Correct answer: B) A part of a program that accesses shared resources and must be executed atomically
Explanation: A critical section is a part of a program that accesses shared resources and must be executed without interference from other processes to avoid race conditions.
Question 26 of 50
Which of the following can prevent deadlock?
Correct answer: D) Resource allocation graph
Explanation: A resource allocation graph helps detect and prevent deadlock by visually representing the allocation of resources and the requests made by processes.
Question 27 of 50
What is starvation in process scheduling?
Correct answer: B) When a process waits indefinitely for CPU time
Explanation: Starvation occurs when a process is continually overlooked by the CPU scheduler, often because higher-priority processes are consistently given preference.
Question 28 of 50
In a paging system, what is the purpose of a frame?
Correct answer: C) To hold a fixed-size block of physical memory
Explanation: A frame is a fixed-size block of physical memory used to store a page of a process's virtual memory, enabling the efficient mapping of virtual to physical addresses.
Question 29 of 50
What is the difference between preemptive and non-preemptive scheduling?
Correct answer: B) Preemptive scheduling can interrupt processes, while non-preemptive cannot
Explanation: In preemptive scheduling, the operating system can interrupt a process to allocate the CPU to another process, whereas non-preemptive scheduling allows processes to run to completion before switching.
Question 30 of 50
What is an I/O-bound process?
Correct answer: B) A process that spends more time waiting for I/O than CPU execution
Explanation: I/O-bound processes spend most of their time waiting for input/output operations to complete, using little CPU time compared to CPU-bound processes.
Question 31 of 50
What is a thread?
Correct answer: A) A unit of CPU execution within a process
Explanation: A thread is the smallest unit of execution within a process, allowing multiple threads to run concurrently within the same process and share resources.
Question 32 of 50
What is the main advantage of multithreading in a process?
Correct answer: C) It allows concurrent execution of tasks within the same process
Explanation: Multithreading allows different parts of a program to run concurrently, improving the overall efficiency of tasks that can be performed in parallel.
Question 33 of 50
Which type of memory allocation allows processes to grow dynamically?
Correct answer: B) Segmentation
Explanation: In segmentation, memory is allocated in segments, which can grow or shrink dynamically as the process requires, without the need for contiguous memory space.
Question 34 of 50
In demand paging, what occurs when a page is not in memory?
Correct answer: A) The operating system swaps the page into memory
Explanation: In demand paging, when a page is not present in memory and a process tries to access it, a page fault occurs, and the operating system brings the required page into memory from secondary storage.
Question 35 of 50
What is a bounded buffer problem?
Correct answer: B) A synchronization problem where a buffer has limited capacity
Explanation: The bounded buffer problem is a synchronization issue where producers and consumers must share a fixed-size buffer, requiring coordination to avoid buffer overflows or underflows.
Question 36 of 50
What is the purpose of the 'ready queue' in CPU scheduling?
Correct answer: C) To store processes that are ready to run but waiting for CPU time
Explanation: The ready queue holds processes that are ready for execution but are waiting for the CPU to become available, ensuring efficient scheduling.
Question 37 of 50
What is the function of a semaphore in concurrency control?
Correct answer: C) To signal and synchronize access to shared resources
Explanation: Semaphores are synchronization primitives used to control access to shared resources by multiple processes, ensuring that resources are not accessed simultaneously by competing processes.
Question 38 of 50
What is the purpose of the 'wait()' operation in semaphore handling?
Correct answer: B) To decrease the semaphore value and possibly block the process
Explanation: The 'wait()' operation decreases the value of a semaphore. If the semaphore’s value becomes negative, the process is blocked until the resource becomes available.
Question 39 of 50
What is the dining philosophers problem?
Correct answer: A) A deadlock problem involving multiple philosophers
Explanation: The dining philosophers problem is a classic example of a synchronization issue involving shared resources, where deadlock or starvation can occur if philosophers (processes) compete for limited forks (resources).
Question 40 of 50
What is the primary function of a semaphore in operating systems?
Correct answer: B) To synchronize access to shared resources between multiple processes or threads
Explanation: A semaphore is a synchronization tool used to manage concurrent access to shared resources by multiple processes or threads, ensuring that critical sections of code are accessed safely and without conflicts.
Question 41 of 50
What is the main disadvantage of the First-Come, First-Served (FCFS) scheduling algorithm?
Correct answer: C) It can cause the convoy effect, where shorter processes are delayed by longer ones
Explanation: FCFS scheduling can result in the convoy effect, where longer processes hold up shorter ones, leading to inefficient CPU utilization and longer waiting times for shorter jobs.
Question 42 of 50
In the context of process synchronization, what does "race condition" mean?
Correct answer: B) A condition where multiple processes read and write shared data simultaneously, leading to inconsistent results
Explanation: A race condition occurs when the outcome of processes depends on the order in which instructions are executed, leading to incorrect or unpredictable results when processes access shared data concurrently.
Question 43 of 50
What is the purpose of a monitor in process synchronization?
Correct answer: A) To control access to shared resources
Explanation: A monitor is a high-level synchronization construct that provides mutual exclusion and condition synchronization, ensuring that only one process accesses shared resources at a time.
Question 44 of 50
What is the main characteristic of a "real-time system"?
Correct answer: B) It must process tasks within a strict deadline
Explanation: A real-time system is designed to respond to inputs or events within a guaranteed time frame, ensuring that tasks are completed within specific deadlines.
Question 45 of 50
What does "fork()" do in Unix-based systems?
Correct answer: B) It creates a new process by duplicating the calling process
Explanation: The fork() system call creates a new process by duplicating the calling process. The new process (child) gets a copy of the parent process's memory space, but it is an independent process.
Question 46 of 50
What is a system call?
Correct answer: B) A method for user-level processes to request services from the operating system
Explanation: A system call is a mechanism that allows a user-level process to request services or resources (such as I/O operations or memory management) from the operating system.
Question 47 of 50
Which of the following is true about non-blocking I/O?
Correct answer: B) The process continues executing other tasks while the I/O operation is still in progress
Explanation: In non-blocking I/O, the process can continue executing without waiting for the I/O operation to complete. It is useful for scenarios where the process needs to remain responsive while waiting for data.
Question 48 of 50
What is meant by "starvation" in the context of resource allocation?
Correct answer: B) When a process is indefinitely denied access to required resources
Explanation: Starvation occurs when a process is continuously overlooked by the resource allocator, and as a result, it is never able to gain access to the resources it needs to proceed.
Question 49 of 50
What is the function of the exec() system call in Unix-based systems?
Correct answer: C) To replace the current process image with a new program
Explanation: The exec() system call replaces the current process image with a new program, allowing a process to run a different program within the same process space.
Question 50 of 50
What occurs during context switching?
Correct answer: B) The CPU switches from one process to another by saving the state of the current process and loading the state of the next process
Explanation: Context switching involves the CPU saving the current state (registers, program counter) of a process and restoring the state of the next process, allowing multiple processes to share CPU time.
Set 1 complete
You scored 0%
0 correct out of 0 answered (50 questions in this set).