Q#1: A thread is:
(A) A lightweight process within a process
(B) Only a file on disk
(C) Only a CPU register
(D) Only memory block
Answer: (A) A lightweight process within a process
Q#2: Multithreading allows:
(A) Concurrent execution of multiple threads within a process
(B) Only one thread at a time
(C) Only process execution
(D) Only CPU-bound tasks
Answer: (A) Concurrent execution of multiple threads within a process
Q#3: Advantages of threads include:
(A) Responsiveness, resource sharing, economy
(B) Only memory saving
(C) Only CPU speed
(D) Only disk access
Answer: (A) Responsiveness, resource sharing, economy
Q#4: Thread can share:
(A) Code and data of process but has its own program counter and stack
(B) Only CPU
(C) Only memory
(D) Only files
Answer: (A) Code and data of process but has its own program counter and stack
Q#5: Types of threads include:
(A) User-level threads and kernel-level threads
(B) Only CPU threads
(C) Only memory threads
(D) Only process threads
Answer: (A) User-level threads and kernel-level threads
Q#6: User-level threads are managed by:
(A) Thread library at user level
(B) Kernel scheduler
(C) Disk driver
(D) Memory manager
Answer: (A) Thread library at user level
Q#7: Kernel-level threads are managed by:
(A) Operating system kernel
(B) User programs
(C) File system
(D) Only CPU scheduler
Answer: (A) Operating system kernel
Q#8: Advantages of user-level threads include:
(A) Fast creation and switching
(B) Kernel overhead
(C) Only disk usage
(D) Only memory allocation
Answer: (A) Fast creation and switching
Q#9: Disadvantage of user-level threads:
(A) Kernel cannot manage threads individually, blocking system call blocks entire process
(B) Too slow
(C) Only memory inefficient
(D) Only CPU usage
Answer: (A) Kernel cannot manage threads individually, blocking system call blocks entire process
Q#10: Advantages of kernel-level threads include:
(A) True concurrent execution on multiprocessors, blocking system calls don’t block entire process
(B) Only memory sharing
(C) Only CPU usage
(D) Only file access
Answer: (A) True concurrent execution on multiprocessors, blocking system calls don’t block entire process
Q#11: Disadvantage of kernel-level threads:
(A) Slower creation and context switching due to kernel involvement
(B) Memory efficient
(C) Faster than user threads
(D) Only I/O bound
Answer: (A) Slower creation and context switching due to kernel involvement
Q#12: Multithreaded process benefits include:
(A) Improved CPU utilization and responsiveness
(B) Only disk storage
(C) Only memory allocation
(D) Only file sharing
Answer: (A) Improved CPU utilization and responsiveness
Q#13: Concurrency in operating systems refers to:
(A) Multiple threads/processes executing simultaneously or overlapping in time
(B) Only CPU-bound execution
(C) Only memory management
(D) Only disk access
Answer: (A) Multiple threads/processes executing simultaneously or overlapping in time
Q#14: Critical section problem arises when:
(A) Multiple threads access shared resources without proper synchronization
(B) Only CPU idle
(C) Only memory full
(D) Only disk error
Answer: (A) Multiple threads access shared resources without proper synchronization
Q#15: Mutual exclusion ensures:
(A) Only one thread accesses critical section at a time
(B) Multiple threads access simultaneously
(C) Only CPU usage
(D) Only memory allocation
Answer: (A) Only one thread accesses critical section at a time
Q#16: Semaphores are:
(A) Synchronization tools to solve critical section problem
(B) Only files
(C) Only memory blocks
(D) Only CPU registers
Answer: (A) Synchronization tools to solve critical section problem
Q#17: A binary semaphore is also called:
(A) Mutex
(B) Counting semaphore
(C) Thread
(D) CPU register
Answer: (A) Mutex
Q#18: Counting semaphore can:
(A) Allow multiple threads to access a resource concurrently
(B) Only single thread access
(C) Only files
(D) Only CPU-bound
Answer: (A) Allow multiple threads to access a resource concurrently
Q#19: Deadlock occurs when:
(A) Two or more threads wait indefinitely for resources held by each other
(B) CPU idle
(C) Memory full
(D) Disk error
Answer: (A) Two or more threads wait indefinitely for resources held by each other
Q#20: Necessary conditions for deadlock include:
(A) Mutual exclusion, hold and wait, no preemption, circular wait
(B) Only CPU idle
(C) Only memory full
(D) Only disk failure
Answer: (A) Mutual exclusion, hold and wait, no preemption, circular wait
Q#21: Thread synchronization methods include:
(A) Mutex, semaphores, monitors
(B) Only CPU scheduling
(C) Only memory allocation
(D) Only I/O
Answer: (A) Mutex, semaphores, monitors
Q#22: Busy waiting occurs when:
(A) A thread continuously checks for a condition instead of sleeping
(B) Only memory allocated
(C) CPU idle
(D) Disk access
Answer: (A) A thread continuously checks for a condition instead of sleeping
Q#23: Spinlocks are used:
(A) To avoid blocking while waiting for a lock in busy-waiting
(B) Only files
(C) Only memory
(D) Only CPU
Answer: (A) To avoid blocking while waiting for a lock in busy-waiting
Q#24: Monitors provide:
(A) High-level synchronization with mutual exclusion and condition variables
(B) Only file management
(C) Only memory allocation
(D) Only CPU scheduling
Answer: (A) High-level synchronization with mutual exclusion and condition variables
Q#25: Race condition occurs when:
(A) Multiple threads access shared data concurrently causing unexpected results
(B) CPU idle
(C) Memory full
(D) Disk error
Answer: (A) Multiple threads access shared data concurrently causing unexpected results
Q#26: Condition variables in monitors:
(A) Allow threads to wait for specific conditions before proceeding
(B) Only memory access
(C) Only CPU scheduling
(D) Only file management
Answer: (A) Allow threads to wait for specific conditions before proceeding
Q#27: Preemptive scheduling in multithreaded systems:
(A) Allows OS to forcibly switch threads
(B) Threads run until completion
(C) Only CPU-bound threads
(D) Only I/O threads
Answer: (A) Allows OS to forcibly switch threads
Q#28: Non-preemptive scheduling:
(A) Thread runs until it terminates or yields CPU voluntarily
(B) CPU forcibly switches thread
(C) Only I/O threads
(D) Only CPU threads
Answer: (A) Thread runs until it terminates or yields CPU voluntarily
Q#29: Thread pool is:
(A) Collection of pre-created threads ready to execute tasks
(B) Only single thread
(C) Only CPU scheduling
(D) Only file allocation
Answer: (A) Collection of pre-created threads ready to execute tasks
Q#30: Benefits of thread pool include:
(A) Reduced overhead of thread creation and destruction
(B) Only CPU usage
(C) Only memory allocation
(D) Only file management
Answer: (A) Reduced overhead of thread creation and destruction
Q#31: Preemptive vs non-preemptive threads:
(A) Preemptive can be interrupted by OS; non-preemptive runs until completion or yield
(B) Both identical
(C) Non-preemptive interrupted by OS
(D) Preemptive cannot be interrupted
Answer: (A) Preemptive can be interrupted by OS; non-preemptive runs until completion or yield
Q#32: Thread safety means:
(A) Functions behave correctly when accessed by multiple threads concurrently
(B) Only CPU safety
(C) Only memory safety
(D) Only file safety
Answer: (A) Functions behave correctly when accessed by multiple threads concurrently
Q#33: Reentrant functions:
(A) Can be safely called by multiple threads simultaneously
(B) Only CPU-bound
(C) Only I/O-bound
(D) Only memory-bound
Answer: (A) Can be safely called by multiple threads simultaneously
Q#34: Deadlock prevention techniques include:
(A) Eliminating one of the necessary conditions for deadlock
(B) Only CPU reset
(C) Only file deletion
(D) Only memory allocation
Answer: (A) Eliminating one of the necessary conditions for deadlock
Q#35: Deadlock avoidance uses:
(A) Resource allocation strategies like Banker’s Algorithm
(B) Only CPU scheduling
(C) Only file management
(D) Only memory allocation
Answer: (A) Resource allocation strategies like Banker’s Algorithm
Q#36: Deadlock detection:
(A) OS detects circular wait and recovers
(B) CPU halts
(C) Memory clears
(D) Disk resets
Answer: (A) OS detects circular wait and recovers
Q#37: Starvation occurs when:
(A) Low-priority threads never get CPU
(B) CPU idle
(C) Memory full
(D) Disk error
Answer: (A) Low-priority threads never get CPU
Q#38: Aging prevents starvation by:
(A) Gradually increasing priority of waiting threads
(B) Decreasing priority
(C) Halting CPU
(D) Only managing I/O
Answer: (A) Gradually increasing priority of waiting threads
Q#39: Thread scheduling can be:
(A) Preemptive or non-preemptive
(B) Only non-preemptive
(C) Only preemptive
(D) Only round-robin
Answer: (A) Preemptive or non-preemptive
Q#40: Multiprocessor systems allow:
(A) True concurrent execution of multiple threads
(B) Only one thread at a time
(C) Only CPU-bound threads
(D) Only I/O threads
Answer: (A) True concurrent execution of multiple threads
Q#41: Race conditions can be prevented using:
(A) Mutual exclusion mechanisms
(B) Only CPU scheduling
(C) Only memory allocation
(D) Only disk access
Answer: (A) Mutual exclusion mechanisms
Q#42: Critical section solution requires:
(A) Mutual exclusion, progress, bounded waiting
(B) Only CPU allocation
(C) Only memory allocation
(D) Only I/O management
Answer: (A) Mutual exclusion, progress, bounded waiting
Q#43: Starvation is more likely in:
(A) Priority-based scheduling
(B) Round-robin scheduling
(C) FCFS scheduling
(D) Shortest Job First
Answer: (A) Priority-based scheduling
Q#44: Threads improve:
(A) Responsiveness and resource utilization
(B) Only memory efficiency
(C) Only CPU speed
(D) Only disk access
Answer: (A) Responsiveness and resource utilization
Q#45: Concurrency control is necessary for:
(A) Correctness of shared resource access
(B) Only CPU scheduling
(C) Only memory management
(D) Only disk usage
Answer: (A) Correctness of shared resource access
Q#46: Context switching for threads is:
(A) Faster than process context switching
(B) Slower than process switching
(C) Same as process switching
(D) Only memory-bound
Answer: (A) Faster than process context switching
Q#47: Lightweight processes are:
(A) Threads
(B) Full processes
(C) Only CPU registers
(D) Only memory blocks
Answer: (A) Threads
Q#48: Parallelism vs concurrency:
(A) Parallelism is simultaneous execution; concurrency is overlapping execution
(B) Both identical
(C) Concurrency is simultaneous execution
(D) Parallelism is overlapping execution
Answer: (A) Parallelism is simultaneous execution; concurrency is overlapping execution
Q#49: Advantages of kernel threads include:
(A) True parallelism on multiprocessors
(B) Only memory efficiency
(C) Only CPU usage
(D) Only file access
Answer: (A) True parallelism on multiprocessors
Q#50: Overall purpose of threads and concurrency:
(A) Efficient utilization of CPU and resources with responsive and safe execution
(B) Only memory allocation
(C) Only CPU speed
(D) Only disk management
Answer: (A) Efficient utilization of CPU and resources with responsive and safe execution