Threads, CPU scheduling algorithms, deadlock characterization and handling, memory management (paging, segmentation, demand paging) and storage management (RAID, disk scheduling). - Question Bank

1. Which of the following RAID levels provides the best read performance?
A) RAID 0
B) RAID 1
C) RAID 5
D) RAID 6
2. Which of the following memory management techniques can lead to external fragmentation?
A) Paging
B) Segmentation
C) Demand Paging
D) None of the above
3. A 'deadlock' is a situation where:
A) A process is waiting for I/O to complete.
B) Two or more processes are unable to proceed because each is waiting for the other to release a resource.
C) A process has run out of memory.
D) The CPU is overloaded with tasks.
4. In the context of threads, a 'mutex' is primarily used for:
A) Creating new threads.
B) Synchronizing access to shared resources to prevent race conditions.
C) Managing thread priorities.
D) Allowing threads to communicate with each other.
5. Which of the following is a mechanism used to implement virtual memory?
A) Memory Segmentation
B) Demand Paging
C) Direct Memory Access (DMA)
D) Caching
6. Virtual memory is a memory management technique that:
A) Uses only RAM to store active processes.
B) Allows programs to use more memory than physically available by using disk space.
C) Requires all program code to be loaded into memory at once.
D) Restricts processes to contiguous memory blocks.
7. Which RAID level offers good performance and fault tolerance using parity, but requires at least three disks?
A) RAID 0
B) RAID 1
C) RAID 5
D) RAID 6
8. The C-SCAN (Circular-SCAN) disk scheduling algorithm differs from SCAN by:
A) It services requests only in one direction.
B) It reverses direction immediately after reaching the last track.
C) It moves the head from one end to the other, servicing requests, and then jumps back to the beginning without servicing requests on the return trip.
D) It prioritizes requests based on their size.
9. What is a potential disadvantage of the SSTF algorithm?
A) It can lead to starvation of requests far from the current head position.
B) It has high overhead due to complex calculations.
C) It always results in the maximum seek time.
D) It does not consider the current head position.
10. In the SCAN disk scheduling algorithm, the disk head:
A) Moves from the current position to the nearest request.
B) Moves in one direction, servicing all requests, then reverses direction.
C) Moves to the last track and then back to the first, servicing requests along the way.
D) Jumps to the closest request regardless of direction.
11. The SSTF disk scheduling algorithm selects the request with the:
A) Smallest track number.
B) Largest track number.
C) Smallest seek time from the current head position.
D) Largest seek time from the current head position.
12. Which disk scheduling algorithm services requests in the order they arrive?
A) SSTF (Shortest Seek Time First)
B) FCFS (First-Come, First-Served)
C) SCAN
D) C-SCAN
13. What is the primary goal of disk scheduling?
A) To increase disk I/O speed by reducing seek time and rotational latency.
B) To ensure fair access to the disk for all processes.
C) To prevent disk fragmentation.
D) To encrypt data stored on the disk.
14. Which RAID level combines striping and mirroring?
A) RAID 0
B) RAID 1
C) RAID 5
D) RAID 10
15. RAID 0 is known for:
A) High fault tolerance and redundancy.
B) Striping with parity for data protection.
C) Performance improvement through striping, but no redundancy.
D) Mirroring of data.
16. In RAID levels, which level provides mirroring for fault tolerance?
A) RAID 0
B) RAID 1
C) RAID 5
D) RAID 10
17. RAID stands for:
A) Redundant Array of Independent Disks
B) Reliable Array of Integrated Drives
C) Random Access Information Device
D) Redundant Access Interconnect Device
18. Which of the following is a characteristic of storage management?
A) Managing CPU registers.
B) Allocating and deallocating memory for processes.
C) Organizing and accessing data on secondary storage devices.
D) Handling inter-process communication.
19. What is 'internal fragmentation'?
A) Wasted space in a memory block allocated to a process, but not fully used.
B) Wasted space between memory blocks allocated to different processes.
C) The phenomenon where processes are too large to fit in memory.
D) The time taken to access memory.
20. Which memory management scheme allows a process to be non-contiguous in memory?
A) Simple Paging
B) Segmentation
C) Paging and Segmentation
D) Contiguous Allocation
21. In demand paging, when a page fault occurs, the operating system needs to:
A) Terminate the process immediately.
B) Find the page in secondary storage, load it into a free frame, and update the page table.
C) Ask the user to load the page manually.
D) Allocate more physical memory to the process.
22. What is the main disadvantage of segmentation?
A) It leads to internal fragmentation.
B) It creates external fragmentation.
C) It requires fixed-size memory blocks.
D) It does not support sharing of code segments.
23. Which memory management technique divides a program into logical units of varying sizes?
A) Paging
B) Segmentation
C) Swapping
D) Contiguous allocation
24. What is the primary advantage of paging?
A) Eliminates external fragmentation.
B) Allows processes to be larger than physical memory.
C) Simplifies memory allocation for variable-sized blocks.
D) Reduces the need for swapping.
25. The FIFO page replacement algorithm:
A) Is optimal and guarantees the fewest page faults.
B) Replaces the page that has been in memory the longest.
C) Is complex to implement and has high overhead.
D) Considers the usage of pages.
26. Which page replacement algorithm aims to minimize the number of page faults by replacing the page that has not been used for the longest period?
A) First-In, First-Out (FIFO)
B) Least Recently Used (LRU)
C) Optimal (MIN)
D) Second Chance
27. A 'page fault' occurs when:
A) A process completes its execution.
B) A needed page is not found in main memory.
C) The CPU encounters an error.
D) A process requests more memory than available.
28. What is 'demand paging'?
A) Loading an entire program into memory before execution.
B) Loading pages into memory only when they are needed.
C) Swapping pages between RAM and secondary storage continuously.
D) Allocating fixed-size memory blocks to processes.
29. Which of the following is a strategy for deadlock handling?
A) Disallowing circular wait.
B) Requiring processes to request all resources at once.
C) Terminating the process causing the deadlock.
D) The Banker's Algorithm.
30. What is the main goal of deadlock avoidance?
A) To detect deadlocks after they occur and recover.
B) To prevent deadlocks by ensuring the system never enters an unsafe state.
C) To break the deadlock cycle by preempting resources.
D) To ignore deadlocks and let them resolve naturally.
31. The Banker's algorithm is primarily used for:
A) Deadlock detection
B) Deadlock prevention
C) Deadlock avoidance
D) Deadlock recovery
32. Which of the following is a method for deadlock prevention?
A) Deadlock detection
B) Deadlock avoidance
C) Disallowing the 'Hold and Wait' condition
D) Resource preemption
33. What does the 'Circular Wait' condition imply?
A) Processes are waiting in a FIFO queue.
B) A set of processes are waiting for each other in a cyclic manner.
C) Resources are allocated in a circular fashion.
D) Processes are executing in a loop.
34. The 'Hold and Wait' condition for deadlock means:
A) A process releases all its resources before requesting new ones.
B) A process holds at least one resource and requests additional resources that are held by other processes.
C) A process waits indefinitely for a resource.
D) A process waits only for resources it currently holds.
35. Which of the following is NOT a necessary condition for a deadlock to occur?
A) Mutual Exclusion
B) Hold and Wait
C) Preemption
D) Circular Wait
36. What is 'starvation' in the context of CPU scheduling?
A) A process is never selected to run.
B) A process is executed too frequently.
C) A process is stuck in an I/O wait state.
D) A process completes its execution prematurely.
37. In Priority Scheduling, a process with a higher priority number typically means:
A) It will be executed last.
B) It has less importance.
C) It will be executed first.
D) It requires more CPU time.
38. What is the 'time quantum' in the Round Robin scheduling algorithm?
A) The total time a process is allowed to run before being preempted.
B) The time a process spends waiting in the ready queue.
C) The minimum time a process must execute.
D) The interval between process arrivals.
39. Which scheduling algorithm is known for its fairness and is often used in time-sharing systems?
A) FCFS
B) SJF
C) Round Robin
D) Priority Scheduling
40. In Shortest Remaining Time First (SRTF), if a new process arrives with a CPU burst length shorter than the remaining time of the currently executing process, what happens?
A) The new process is added to the ready queue.
B) The currently executing process is preempted, and the new process starts execution.
C) The new process waits until the current process finishes.
D) The new process is immediately terminated.
41. What is the main drawback of the First-Come, First-Served (FCFS) scheduling algorithm?
A) It can lead to starvation.
B) It suffers from the convoy effect.
C) It is complex to implement.
D) It favors short processes excessively.
42. Which CPU scheduling algorithm aims to minimize the average waiting time?
A) First-Come, First-Served (FCFS)
B) Shortest Job Next (SJN)
C) Priority Scheduling
D) Round Robin (RR)
43. In the context of CPU scheduling, what is 'preemption'?
A) A process voluntarily relinquishes the CPU.
B) The operating system interrupts a running process to allocate the CPU to another process.
C) A process completes its execution and exits.
D) A process waits for an I/O operation to complete.
44. What is the main disadvantage of the many-to-one threading model?
A) Blocking system calls can block the entire process.
B) Higher overhead for thread creation.
C) Requires significant kernel support.
D) Difficult to implement synchronization.
45. Which threading model maps multiple user threads to a single kernel thread?
A) One-to-one model
B) Many-to-one model
C) Many-to-many model
D) Two-level model
46. What is a major advantage of using kernel-level threads (KLT) over user-level threads?
A) Faster thread creation and switching.
B) No need for kernel support.
C) Can utilize multiple processors simultaneously.
D) Simpler implementation for developers.
47. In a user-level threads (ULT) model, thread management is handled by:
A) The operating system kernel.
B) A user-space library.
C) Hardware interrupts.
D) The CPU scheduler.
48. Which of the following is NOT a typical state of a thread?
A) Running
B) Ready
C) Waiting
D) Terminated
49. What is the primary purpose of a thread in an operating system?
A) To manage hardware resources efficiently.
B) To allow a process to perform multiple tasks concurrently.
C) To provide a secure execution environment for applications.
D) To handle inter-process communication.