OS Concepts Question Bank for C-CAT
Topic-wise OS Concepts MCQs for CDAC C-CAT preparation with answers and explanations.
Show Answer & Explanation
Correct Answer: B - Priority Scheduling
Priority Scheduling can cause starvation - solved using aging.
Show Answer & Explanation
Correct Answer: D - LRU
LRU (Least Recently Used) is a page replacement algorithm, not CPU scheduling.
Show Answer & Explanation
Correct Answer: B - All four conditions hold simultaneously
Deadlock needs: Mutual Exclusion, Hold & Wait, No Preemption, Circular Wait.
Show Answer & Explanation
Correct Answer: A - Deadlock avoidance
Banker's algorithm avoids deadlock by checking safe states.
Show Answer & Explanation
Correct Answer: B - Process synchronization
Semaphores synchronize concurrent processes to avoid race conditions.
Show Answer & Explanation
Correct Answer: D - Page is not in memory
Page fault occurs when a required page is not in main memory.
Show Answer & Explanation
Correct Answer: A - Excessive paging activity
Thrashing: system spends more time paging than executing.
Show Answer & Explanation
Correct Answer: D - Disk as extension of RAM
Virtual memory uses disk space to extend available memory.
Show Answer & Explanation
Correct Answer: D - Saving and loading process states
Context switch saves current process state and loads another.
Show Answer & Explanation
Correct Answer: A - I/O or event
Blocked process waits for I/O completion or an event.
Show Answer & Explanation
Correct Answer: D - Mutex is binary, Semaphore can have count
Mutex is binary (locked/unlocked), Semaphore can have count > 1 for multiple resources.
Show Answer & Explanation
Correct Answer: A - Replaces oldest page
FIFO replaces the oldest page in memory (first in, first out).
Show Answer & Explanation
Correct Answer: B - Least recently used page
LRU replaces the page that has not been used for the longest time.
Show Answer & Explanation
Correct Answer: C - Paging
Internal fragmentation occurs in paging when allocated memory is larger than needed.
Show Answer & Explanation
Correct Answer: D - Variable/dynamic partitioning
External fragmentation occurs in variable partitioning when free memory is scattered.
Show Answer & Explanation
Correct Answer: C - FIFO
Belady's anomaly: FIFO may have more page faults with more frames.
Show Answer & Explanation
Correct Answer: D - Kernel has full access, User restricted
Kernel mode has full hardware access; User mode is restricted for protection.
Show Answer & Explanation
Correct Answer: B - Request OS services
System calls are the interface between user programs and operating system services.
Show Answer & Explanation
Correct Answer: D - Semaphores for synchronization
Producer-Consumer uses semaphores (empty, full, mutex) for proper synchronization.
Show Answer & Explanation
Correct Answer: A - Response time and context switches
Smaller quantum = better response time but more context switches; larger = opposite.
Show Answer & Explanation
Correct Answer: C - Compiler design
Compiler design is not a function of an operating system. An OS is responsible for memory management, process management, file management, I/O management, and security.
Show Answer & Explanation
Correct Answer: C - Hard real-time OS
Hard real-time OS guarantees that critical tasks are completed within strict time deadlines, which is essential for missile guidance systems where any delay could be catastrophic.
Show Answer & Explanation
Correct Answer: B - To provide an interface between a process and the operating system
System calls provide a programmatic interface between a running process and the operating system. They allow user-level processes to request services from the kernel such as file operations, process control, and communication.
Show Answer & Explanation
Correct Answer: C - Priority Scheduling
In Priority Scheduling, a low-priority process may wait indefinitely if higher-priority processes keep arriving. This problem is known as starvation and can be solved using aging.
Show Answer & Explanation
Correct Answer: A - Time quantum / time slice
Time-sharing OS uses a time quantum (time slice) to allocate CPU time to each user process in a round-robin fashion, ensuring fair and interactive use of the system.
Show Answer & Explanation
Correct Answer: C - fork()
The fork() system call creates a new child process that is a duplicate of the calling (parent) process. exec() is used to replace the process image, wait() waits for child termination, and exit() terminates a process.
Show Answer & Explanation
Correct Answer: A - To give control of CPU to the process selected by the scheduler
The dispatcher is the module that gives control of the CPU to the process selected by the short-term scheduler. It involves context switching, switching to user mode, and jumping to the appropriate location in the program.
Show Answer & Explanation
Correct Answer: B - Short processes wait behind a long process in FCFS
The convoy effect occurs in First Come First Serve (FCFS) scheduling when a long CPU-burst process holds the CPU, causing shorter processes to wait for a long time, leading to lower CPU and device utilization.
Show Answer & Explanation
Correct Answer: B - Round Robin
Round Robin is a preemptive scheduling algorithm where each process is assigned a fixed time quantum. If a process doesn't complete within its quantum, it is preempted and placed at the end of the ready queue.
Show Answer & Explanation
Correct Answer: B - Increased CPU utilization
Multiprogramming increases CPU utilization by keeping multiple processes in memory. When one process waits for I/O, the CPU can switch to another process, reducing CPU idle time.
Show Answer & Explanation
Correct Answer: D - A process is an instance of a program in execution
A program is a passive entity (code stored on disk), while a process is an active entity — an instance of a program that is currently being executed, with its own program counter, stack, and data section.
Show Answer & Explanation
Correct Answer: D - 0
In most operating systems, a mode bit value of 0 indicates kernel mode (supervisor mode), while a value of 1 indicates user mode. This hardware-supported mechanism protects the OS from errant user programs.
Show Answer & Explanation
Correct Answer: D - Excessive paging activity causing system slowdown
Thrashing occurs when a system spends more time swapping pages in and out of memory than executing processes. It happens when the degree of multiprogramming is too high and processes don't have enough frames.
Show Answer & Explanation
Correct Answer: C - Compiler Operating System
There is no such thing as a 'Compiler Operating System.' A compiler is a translator program, not an OS type. Valid OS types include Batch, Time-sharing, Distributed, Real-Time, and Network OS.
Show Answer & Explanation
Correct Answer: B - To overlap I/O of one job with computation of another
Spooling (Simultaneous Peripheral Operations Online) uses a disk as a buffer to overlap I/O operations of one job with the computation of another, improving overall system throughput.
Show Answer & Explanation
Correct Answer: A - Expected CPU burst time
SJF scheduling selects the process with the shortest expected CPU burst time next. It is optimal in terms of average waiting time but requires knowing or estimating burst times in advance.
Show Answer & Explanation
Correct Answer: C - To signal the CPU that an event needs attention
An interrupt is a signal to the CPU indicating that an event requires immediate attention. When an interrupt occurs, the CPU saves its state and transfers control to an interrupt handler routine.
Show Answer & Explanation
Correct Answer: A - Only essential services run in kernel space
In a microkernel architecture, only the most essential services (like IPC, basic scheduling, and memory management) run in kernel space. Other services like file systems and device drivers run in user space.
Show Answer & Explanation
Correct Answer: C - Replaces the current process image with a new program
The exec() system call replaces the current process's memory image with a new program. The process ID remains the same, but the code, data, and stack are replaced with the new program.
Show Answer & Explanation
Correct Answer: A - Saving and restoring the state of a process so execution can be resumed later
Context switching involves saving the state (context) of the currently running process and restoring the state of the next process to be executed. This includes saving/restoring registers, program counter, and memory maps.
Show Answer & Explanation
Correct Answer: A - 7.0
SJF order is 3, 6, 7, 8. Waiting times are 0, 3, 9, and 16. Average waiting time = (0+3+9+16)/4 = 7.0.
Show Answer & Explanation
Correct Answer: C - The first program that runs when a computer is powered on
The bootstrap program (bootloader) is the first program that runs when a computer is powered on or restarted. It is stored in ROM/EEPROM and is responsible for loading the operating system kernel into memory.
Show Answer & Explanation
Correct Answer: C - To allow devices to transfer data to/from memory without CPU intervention
DMA allows hardware devices to transfer data directly to/from memory without involving the CPU for each byte. This frees the CPU to perform other tasks during bulk data transfers.
Show Answer & Explanation
Correct Answer: A - SJF
Shortest Job First (SJF) is provably optimal for minimizing the average waiting time among all non-preemptive scheduling algorithms. Its preemptive version (SRTF) is optimal among all algorithms.
Show Answer & Explanation
Correct Answer: B - 2
With burst time 10 and quantum 4: First run uses 4 (remaining 6, preempted), second run uses 4 (remaining 2, preempted), third run uses 2 (completes). So the process is preempted 2 times.
Show Answer & Explanation
Correct Answer: C - A kernel where all OS services run in kernel space as a single program
A monolithic kernel runs all OS services (file system, device drivers, memory management, etc.) in kernel space as a single large program. Examples include Linux and traditional Unix kernels.
Show Answer & Explanation
Correct Answer: A - Selects processes from job pool to ready queue
The long-term scheduler (job scheduler) selects processes from the job pool (secondary storage) and loads them into memory (ready queue). It controls the degree of multiprogramming.
Show Answer & Explanation
Correct Answer: B - VxWorks
VxWorks is a widely used real-time operating system (RTOS) designed for embedded systems that require deterministic response times. Windows, Ubuntu, and macOS are general-purpose operating systems.
Show Answer & Explanation
Correct Answer: A - Time from submission of a request to the first response
Response time is the time from when a request (process) is submitted until the first response is produced. It is an important metric in interactive systems and is different from turnaround time.
Show Answer & Explanation
Correct Answer: D - In preemptive, a running process can be interrupted; in non-preemptive, it runs to completion
In preemptive scheduling, the OS can interrupt a running process and allocate the CPU to another process. In non-preemptive scheduling, a process holds the CPU until it finishes or voluntarily yields.