Unit 1 - Practice Quiz

CSE316

1 What 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

2 Which 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

3 In 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)

4 What 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

5 Which 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

6 What 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

7 Which 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

8 A 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

9 What 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

10 Which 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

11 In 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

12 What 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

13 Which 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

14 A process is basically a program in:

A. Secondary storage
B. Execution
C. The compiler
D. The linker

15 What are the five standard states of a process life cycle?

A. Start, Run, Stop, Wait, End
B. New, Ready, Running, Waiting, Terminated
C. Input, Processing, Output, Storage, Control
D. New, Active, Passive, Blocked, Dead

16 When 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

17 When 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

18 What 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

19 Which 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

20 Which 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

21 The 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

22 If 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

23 The 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

24 What 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

25 What 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

26 Which of the following is NOT a benefit of cooperating processes?

A. Information Sharing
B. Computation Speedup
C. Modularity
D. Increased Complexity and Race Conditions

27 In 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

28 In 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

29 What 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

30 What 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

31 A 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

32 Which 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

33 What is Spooling?

A. Simultaneous Peripheral Operation On-Line
B. Serial Processing Of On-Line Operations
C. System Processing Of Off-Line Operations
D. Synchronous Peripheral Operation Of Line

34 Which system call is used by a parent process to suspend execution until a child terminates?

A. sleep()
B. wait()
C. suspend()
D. stop()

35 In a Monolithic Kernel, where are the OS services located?

A. In separate user-space processes
B. In a single large kernel address space
C. On a remote server
D. In the hardware firmware

36 What is the primary disadvantage of a Microkernel architecture?

A. Difficult to extend
B. Low reliability
C. Performance overhead due to increased system function communication
D. Lack of security

37 Which component of the OS provides the interface between the user and the kernel (e.g., bash, cmd)?

A. System Call Interface
B. Command Interpreter (Shell)
C. Compiler
D. Linker

38 What is the Heap section of a process memory used for?

A. Storing global variables
B. Storing function parameters and return addresses
C. Dynamic memory allocation during run time
D. Storing the executable code

39 In the process state transition diagram, a process moves from Waiting to Ready when:

A. The scheduler picks it
B. I/O or event completion occurs
C. The time quantum expires
D. The process terminates

40 Which type of Operating System is Android or iOS primarily classified as?

A. Batch Operating System
B. Mobile Operating System
C. Distributed Operating System
D. Mainframe Operating System

41 In a Dual-Mode operation, if the mode bit is 0, the system is in:

A. User Mode
B. Kernel (Supervisor) Mode
C. Safe Mode
D. Sleep Mode

42 What is Bootstrap Program?

A. The first program to run on computer power-on to load the OS
B. A program to install updates
C. A utility to strap memory blocks together
D. The scheduler algorithm

43 If process has a CPU burst of 10ms and has 5ms, and the OS is Multiprogrammed, how might they execute?

A. must finish completely before starts
B. The CPU will execute instructions from and interleaved if waits for I/O
C. and run on different CPUs simultaneously (assuming single core)
D. The OS rejects

44 Which of the following is a mechanism for Message Passing?

A. Writing to a global variable
B. Calls to send() and receive()
C. Direct memory access
D. Updating the Program Counter

45 In a Parallel System, what is Tightly Coupled?

A. Processors share a clock but have different memory
B. Processors share memory and a clock
C. Processors have their own memory and clock
D. Processors are connected via the Internet

46 What does the Program Counter in the PCB indicate?

A. The total number of processes running
B. The address of the next instruction to be executed by the process
C. The amount of memory used
D. The priority of the process

47 Which system call terminates a process?

A. halt()
B. exit()
C. close()
D. kill()

48 The time it takes for the dispatcher to stop one process and start another running is known as:

A. Turnaround Time
B. Dispatch Latency
C. Waiting Time
D. Execution Time

49 Which of the following operations is NOT allowed in User Mode?

A. Adding two numbers
B. Calling a function
C. Disabling Interrupts
D. Reading a variable from the stack

50 System calls are typically accessed by application programmers via:

A. Direct assembly code only
B. Application Programming Interface (API)
C. Hardware jumpers
D. The command line