Revision 3 – Name:__________: Matric No:_________
1) Which mechanism ensures that only one thread at a time can access a shared resource?
A) Monitors
B) Mutexes
C) Semaphores
D) Condition Variables
2) What synchronization mechanism offers lower latency but wastes CPU cycles?
A) Blocking
B) Busy-waiting
C) Non-blocking
D) Multitasking
3) What criteria define priority levels in process scheduling?
A) Process importance and resource requirements
B) Thread count and CPU speed
C) Memory usage and cache hit ratio
D) File size and disk access time
4) Which statement best describes threads in an operating system?
A) Threads have independent memory spaces.
B) Threads are heavyweight execution units.
C) Threads share resources with other threads in the same process.
D) Threads do not impact process performance.
5) Internal fragmentation in memory management refers to:
A) Wasting memory within allocated blocks.
B) Scattering free memory, reducing efficiency.
C) Lack of memory space for new processes.
D) None of the above.
6) In multiprogramming, what is the average turnaround time for processes with burst
times 10 ms, 15 ms, and 20 ms respectively?
A) 10 ms
B) 15 ms
C) 20 ms
D) 15.0 ms
7) What is the primary objective of multitasking?
A) Maximizing CPU utilization
B) Prioritizing user responsiveness
C) Minimizing process overhead
D) Balancing memory allocation
1
8) Thread synchronization is crucial in concurrent programming to:
A) Maximize CPU utilization
B) Ensure coordinated access to shared resources
C) Minimize process overhead
D) Optimize memory allocation
9) Which factor does NOT contribute to deadlock in a system?
A) Mutual exclusion
B) Hold and wait
C) No preemption
D) Circular wait Correct
10) What is the average turnaround time for processes with burst times 10 ms, 15 ms, 20 ms, 3
ms, and 6 ms in multiprogramming?
A) 10.0 ms
B) 12.0 ms
C) 15.0 ms
D) 10.8 ms
11) Which memory hierarchy level typically has the fastest access speed?
A) Register
B) Cache
C) Main Memory
D) Secondary Storage
12) Non-blocking synchronization mechanisms are favoured in concurrent programming for:
A) Minimizing CPU utilization
B) Simplifying programming complexity
C) Maximizing performance and responsiveness
D) Avoiding resource sharing
13) What is the primary drawback of busy-waiting synchronization?
A) High memory usage
B) Increased system overhead
C) Wasting CPU cycles
D) Slower execution times
14) In a non-pre-emptive scheduling algorithm, a process:
A) Can have its CPU allocation revoked
B) Runs from start to finish without interruption
C) Is scheduled based on priority levels
D) Runs concurrently with other processes
15) External fragmentation can be minimized by:
A) Increasing the number of processes
B) Implementing dynamic partitioning
C) Reducing memory allocation
D) Using non-pre-emptive scheduling
16) The main objective of multiprogramming is to:
A) Prioritize user responsiveness
B) Maximize CPU utilization
C) Minimize memory usage
D) Optimize disk access
2
17) Which statement best describes the purpose of monitors in concurrent programming?
A) To maximize thread, count within a process
B) To synchronize access to shared data and resources
C) To prevent memory leaks in the system
D) To isolate processes from each other
18) What distinguishes threads from processes in an operating system?
A) Threads have independent memory spaces
B) Processes share resources with other processes
C) Threads have higher overhead than processes
D) Processes execute multiple tasks concurrently
19) Which scheduling algorithm is suitable for real-time systems due to its deterministic nature?
A) Round-robin scheduling
B) Shortest Job Next (SJN)
C) Priority scheduling
D) First-Come, First-Served (FCFS)
20) What is a critical condition for deadlock to occur in a system?
A) Excessive CPU utilization
B) Starvation of processes
C) Circular wait for resources
D) Low memory availability
21) Which mechanism ensures mutual exclusion in concurrent programming?
A) Semaphores
B) Monitors
C) Condition Variables
D) Non-blocking synchronization
22) The purpose of semaphores in operating systems is to:
A) Ensure only one thread accesses a resource
B) Coordinate threads based on conditions
C) Control access to shared resources by multiple threads
D) Prevent deadlock situations
23) What is the primary goal of implementing a deadlock avoidance strategy?
A) Eliminate all deadlock situations
B) Detect and recover from deadlocks
C) Prevent deadlocks by careful resource allocation
D) Minimize the impact of deadlocks on system performance
24) In memory management, dynamic partitioning:
A) Allocates fixed-size memory blocks to processes
B) Splits memory into variable-sized partitions for processes
C) Uses a single contiguous block of memory for all processes
D) Allocates memory based on process priority
25) Which scheduling algorithm gives each process an equal share of CPU time in a round-
robin fashion?
A) Priority scheduling
B) First-Come, First-Served (FCFS)
C) Shortest Job Next (SJN)
D) Round-robin scheduling
3
26) The primary disadvantage of non-pre-emptive scheduling algorithms is:
A) Higher overhead due to frequent context switching
B) Difficulty in managing multiple processes
C) Potential for starvation of low-priority processes
D) Inability to guarantee fairness in process execution
27) Which memory hierarchy level typically has the largest capacity?
A) Register
B) Cache
C) Main Memory
D) Secondary Storage
28) A benefit of using condition variables in thread synchronization is:
A) Reduced complexity in programming
B) Avoidance of busy-waiting
C) Improved CPU utilization
D) Higher priority allocation for threads
29) Which statement best describes the purpose of virtual memory in an operating system?
A) To increase the capacity of main memory
B) To provide a faster access time than cache memory
C) To isolate processes from each other
D) To extend the available address space beyond physical memory
30) What distinguishes multitasking from multiprogramming in operating systems?
A) Multiprogramming focuses on maximizing CPU utilization; multitasking prioritizes user
responsiveness
B) Multitasking allows processes to run concurrently; multiprogramming switches between processes
C) Multitasking prevents deadlock situations; multiprogramming manages memory allocation
D) Multiprogramming uses pre-emptive scheduling; multitasking uses non-pre-emptive scheduling
31) What is the primary objective of using mutexes in concurrent programming?
A) To maximize CPU utilization
B) To provide mutual exclusion to prevent concurrent access to a shared resource
C) To improve memory allocation efficiency
D) To simplify thread creation
32) In memory management, what does external fragmentation refer to?
A) Memory wasted within allocated blocks
B) Free memory being scattered throughout the system, making it unusable for new allocations
C) A situation where the system runs out of memory
D) Inefficient use of cache memory
33) Which mechanism can ensure that a thread waits for a condition to become true before
proceeding?
A) Mutexes
B) Semaphores
C) Condition Variables
D) Monitors
4
34) What is the primary purpose of using a semaphore in an operating system?
A) To allocate fixed-size memory blocks
B) To manage access to a shared resource by multiple threads or processes
C) To provide a priority scheduling mechanism
D) To avoid deadlock by pre-empting resources
35) In process scheduling, what is a time quantum in the context of round-robin scheduling?
A) The minimum time a process must run before being switched out
B) The maximum time a process can run before being pre-empted
C) The time required to switch between processes
D) The average time a process spends in the ready queue
36) What is the main goal of deadlock detection in operating systems?
A) To prevent deadlocks from occurring
B) To identify and resolve deadlocks once they occur
C) To minimize CPU utilization
D) To ensure fair resource allocation
37) Which factor is NOT a cause of starvation in process scheduling?
A) Low process priority
B) High CPU utilization
C) Lack of available memory
D) Long waiting times due to other processes
38) What best describes non-blocking synchronization in concurrent programming?
A) Threads wait until a resource is available
B) Threads can make progress without waiting for other threads to release resources
C) Threads are suspended when a resource is unavailable
D) Threads compete for CPU cycles without any synchronization
39) Which of the following is a disadvantage of round-robin scheduling?
A) Poor CPU utilization
B) High context-switching overhead
C) Increased memory usage
D) Inconsistent process execution times
40) The main purpose of implementing preemptive multitasking in an operating system is:
A) To allow a process to run without interruption
B) To enable the operating system to switch processes to ensure fair CPU allocation
C) To reduce memory usage
D) To prioritize I/O operations over CPU-bound tasks