1What is the primary definition of an Operating System from the perspective of resource management?
A.A software that performs complex mathematical calculations
B.A control program that acts as a resource allocator
C.A hardware component that stores data
D.A user application for document editing
Correct Answer: A control program that acts as a resource allocator
Explanation:An Operating System acts as a resource allocator, managing and allocating resources like CPU time, memory space, and I/O devices to specific programs and users.
Incorrect! Try again.
2Which mechanism is used to distinguish between the execution of operating-system code and user-defined code?
A.Memory Segmentation
B.Mode Bit
C.Program Counter
D.Interrupt Vector
Correct Answer: Mode Bit
Explanation:The mode bit is added to the hardware of the computer to indicate the current mode: kernel (0) or user (1).
Incorrect! Try again.
3In which generation of operating systems were Simple Batch Systems primarily introduced?
A.First Generation (Vacuum Tubes)
B.Second Generation (Transistors)
C.Third Generation (Integrated Circuits)
D.Fourth Generation (VLSI)
Correct Answer: Second Generation (Transistors)
Explanation:Simple batch systems were introduced in the second generation to reduce setup time by batching jobs with similar needs.
Incorrect! Try again.
4What is the main objective of a Multiprogramming operating system?
A.To minimize the cost of hardware
B.To maximize CPU utilization
C.To allow multiple users to edit the same file simultaneously
D.To simplify the user interface
Correct Answer: To maximize CPU utilization
Explanation:Multiprogramming organizes jobs (code and data) so that the CPU always has one to execute. When one job waits for I/O, the CPU switches to another.
Incorrect! Try again.
5Which of the following describes a Time-Sharing (Multitasking) system?
A.The CPU executes multiple jobs by switching among them frequently
B.The CPU processes jobs sequentially without interruption
C.Multiple CPUs are tightly coupled to share memory
D.Jobs are processed in batches without user interaction
Correct Answer: The CPU executes multiple jobs by switching among them frequently
Explanation:In time-sharing systems, the CPU switches jobs so frequently that users can interact with each program while it is running.
Incorrect! Try again.
6What defines a Symmetric Multiprocessing (SMP) architecture?
A.One master processor controls all slave processors
B.Each processor has its own specific task and private memory
C.All processors are peers and perform all tasks within the OS
D.Processors are located in different geographical locations
Correct Answer: All processors are peers and perform all tasks within the OS
Explanation:In SMP, each processor performs all tasks, including operating system functions and user processes, sharing physical memory.
Incorrect! Try again.
7Which of the following is a characteristic of a Distributed Operating System?
A.Shared physical memory and clock
B.Tightly coupled hardware
C.Loosely coupled systems communicating via a network
D.Single processor managing all tasks
Correct Answer: Loosely coupled systems communicating via a network
Explanation:Distributed systems consist of separate processors with their own local memory and clocks, communicating over a network.
Incorrect! Try again.
8A Real-Time Operating System (RTOS) is defined by its ability to:
A.Process large batches of data overnight
B.Provide a graphical user interface
C.Process data within strict, fixed time constraints
D.Run on distributed networks only
Correct Answer: Process data within strict, fixed time constraints
Explanation:RTOS is used when rigid time requirements are placed on the operation of a processor or the flow of data.
Incorrect! Try again.
9What is the difference between Hard and Soft real-time systems?
A.Hard RTOS is for hardware, Soft RTOS is for software
B.Hard RTOS guarantees tasks complete on time; Soft RTOS prioritizes critical tasks but misses are tolerable
C.Hard RTOS uses more memory than Soft RTOS
D.Soft RTOS never allows multitasking
Correct Answer: Hard RTOS guarantees tasks complete on time; Soft RTOS prioritizes critical tasks but misses are tolerable
Explanation:Hard real-time systems have absolute deadlines that must be met (e.g., pacemaker). Soft real-time systems give preference to critical tasks but do not guarantee strict deadlines.
Incorrect! Try again.
10Which system call allows a user program to ask the OS to perform a privileged task?
A.Hardware Interrupt
B.Context Switch
C.Trap or Software Interrupt
D.Direct Memory Access
Correct Answer: Trap or Software Interrupt
Explanation:System calls provide the interface between a running program and the OS, often triggered by a trap or software interrupt instruction.
Incorrect! Try again.
11In the context of OS structure, what is the Layered Approach?
A.All functionality is packed into a single binary
B.The OS is divided into a number of layers, where layer 0 is hardware and layer is the user interface
C.Modules are loaded dynamically at runtime
D.A microkernel structure with minimal functionality
Correct Answer: The OS is divided into a number of layers, where layer 0 is hardware and layer is the user interface
Explanation:The layered approach modularizes the OS, where each layer uses the functions and services of only the lower-level layers.
Incorrect! Try again.
12What is the Process Control Block (PCB)?
A.A block of memory used for I/O buffers
B.A data structure in the kernel storing specific information about a specific process
C.The section of code where the process is defined
D.A hardware component controlling the CPU
Correct Answer: A data structure in the kernel storing specific information about a specific process
Explanation:The PCB (also called Task Control Block) contains process state, program counter, CPU registers, scheduling info, memory limits, etc.
Incorrect! Try again.
13Which of the following is NOT contained in a PCB?
A.Program Counter
B.CPU Registers
C.List of open files
D.The actual source code of the program
Correct Answer: The actual source code of the program
Explanation:The PCB stores metadata about the process (state, registers, priority, files), not the static source code itself.
Incorrect! Try again.
14A process is basically a program in:
A.Secondary storage
B.Execution
C.The compiler
D.The linker
Correct Answer: Execution
Explanation:A process is the unit of work in a system; it is defined as a program in execution.
Incorrect! Try again.
15What are the five standard states of a process life cycle?
Explanation:These are the standard states: New (being created), Ready (waiting for CPU), Running (executing), Waiting (waiting for I/O), Terminated (finished).
Incorrect! Try again.
16When a process transitions from Running to Ready, what is the likely cause?
A.The process finished execution
B.The process requested I/O
C.An interrupt occurred (e.g., time slice expired)
D.The process is waiting for a child process
Correct Answer: An interrupt occurred (e.g., time slice expired)
Explanation:A transition from Running to Ready happens when the process is interrupted (preempted) by the scheduler, usually because its time quantum expired.
Incorrect! Try again.
17When a process transitions from Running to Waiting (or Blocked), what is the cause?
A.The process executed a yield() system call
B.An interrupt occurred
C.The process requested an I/O operation or event wait
D.The scheduler decided to swap the process out
Correct Answer: The process requested an I/O operation or event wait
Explanation:A process moves to the Waiting state when it cannot proceed until an external event (like I/O completion) occurs.
Incorrect! Try again.
18What is a Context Switch?
A.Moving a process from memory to disk
B.Changing the mode from user to kernel
C.Saving the state of the current process and restoring the state of a different process
D.Compiling a program from source to object code
Correct Answer: Saving the state of the current process and restoring the state of a different process
Explanation:Context switching involves saving the PCB of the old process and loading the saved PCB of the new process so the CPU can switch tasks.
Incorrect! Try again.
19Which scheduler controls the degree of multiprogramming (the number of processes in memory)?
A.Short-term Scheduler
B.Medium-term Scheduler
C.Long-term Scheduler
D.Dispatcher
Correct Answer: Long-term Scheduler
Explanation:The Long-term scheduler (Job scheduler) selects processes from the job pool and loads them into memory for execution, determining the degree of multiprogramming.
Incorrect! Try again.
20Which scheduler selects a process from the Ready Queue to execute on the CPU?
A.Long-term Scheduler
B.Short-term Scheduler
C.I/O Scheduler
D.Job Scheduler
Correct Answer: Short-term Scheduler
Explanation:The Short-term scheduler (CPU scheduler) selects a process from those in memory that are ready to execute and allocates the CPU to it.
Incorrect! Try again.
21The system call fork() is used to:
A.Terminate a process
B.Create a new process
C.Wait for a process
D.Replace the process memory space
Correct Answer: Create a new process
Explanation:fork() is the standard Unix/Linux system call used to create a new process, which is a duplicate of the calling process.
Incorrect! Try again.
22If fork() returns a negative value, what does it indicate?
A.The child process was created successfully
B.The process is the child
C.The process is the parent
D.The creation of the child process failed
Correct Answer: The creation of the child process failed
Explanation:fork() returns a negative value if the process creation failed, 0 to the newly created child, and the child's PID to the parent.
Incorrect! Try again.
23The memory layout of a process typically includes which of the following sections?
A.Text, Data, Heap, Stack
B.Input, Output, Processing
C.Kernel, User, Shell
D.Register, Cache, RAM, Disk
Correct Answer: Text, Data, Heap, Stack
Explanation:A process in memory consists of Text (code), Data (global variables), Heap (dynamic memory), and Stack (function calls/local variables).
Incorrect! Try again.
24What are Independent Processes?
A.Processes that share memory
B.Processes that cannot affect or be affected by other processes executing in the system
C.Processes that communicate via message passing
D.Processes that are synchronized
Correct Answer: Processes that cannot affect or be affected by other processes executing in the system
Explanation:Independent processes do not share data with other processes and operate in isolation.
Incorrect! Try again.
25What are Cooperating Processes?
A.Processes that run on different computers
B.Processes that can affect or be affected by other executing processes
C.Processes that only run in kernel mode
D.Processes that utilize separate memory spaces strictly
Correct Answer: Processes that can affect or be affected by other executing processes
Explanation:Cooperating processes share data (via shared memory or message passing) and can influence each other's execution.
Incorrect! Try again.
26Which of the following is NOT a benefit of cooperating processes?
A.Information Sharing
B.Computation Speedup
C.Modularity
D.Increased Complexity and Race Conditions
Correct Answer: Increased Complexity and Race Conditions
Explanation:While complexity and race conditions are consequences, they are not benefits. The benefits are sharing, speedup, modularity, and convenience.
Incorrect! Try again.
27In Inter-Process Communication (IPC), what are the two fundamental models?
A.Shared Memory and Message Passing
B.Paging and Segmentation
C.Sockets and Pipes
D.Stack and Heap
Correct Answer: Shared Memory and Message Passing
Explanation:The two primary methods for IPC are Shared Memory (sharing a region of memory) and Message Passing (exchanging messages).
Incorrect! Try again.
28In the Producer-Consumer problem using shared memory, what is a Circular Buffer used for?
A.To store the PCB
B.To allow the producer to write and the consumer to read data simultaneously without unbounded growth
C.To rotate the CPU scheduling queue
D.To store infinite data
Correct Answer: To allow the producer to write and the consumer to read data simultaneously without unbounded growth
Explanation:A circular buffer of fixed size is used in the bounded-buffer producer-consumer problem to handle speed mismatches efficiently.
Incorrect! Try again.
29What is the function of the exec() family of system calls?
A.To create a new process
B.To replace the process's memory space with a new program
C.To duplicate the current process
D.To exit the current process
Correct Answer: To replace the process's memory space with a new program
Explanation:exec() loads a new program into the process's address space, effectively resetting the stack and heap and running new code.
Incorrect! Try again.
30What happens to a child process if its parent terminates without invoking wait()?
A.It becomes a Zombie process
B.It becomes an Orphan process
C.It is immediately terminated
D.It enters a deadlock state
Correct Answer: It becomes an Orphan process
Explanation:If a parent terminates, the child remains running as an Orphan process (usually adopted by init or systemd). If the child terminates and the parent hasn't waited, it becomes a Zombie.
Incorrect! Try again.
31A process that has finished execution but still has an entry in the process table because its parent hasn't called wait() is known as:
A.Orphan Process
B.Daemon Process
C.Zombie Process
D.Swapped Process
Correct Answer: Zombie Process
Explanation:A zombie process is a terminated process that is waiting for its parent to read its exit status via the wait() system call.
Incorrect! Try again.
32Which of the following is considered a Privileged Instruction?
A.Reading the clock
B.Switching from user to kernel mode
C.Calculating a floating-point number
D.Issuing an I/O instruction
Correct Answer: Issuing an I/O instruction
Explanation:I/O instructions are privileged to prevent user programs from interfering with system operations. Switching modes is a result of an instruction, not the instruction itself (though Trap is special).