Operating Systems Question Bank BCS303
Operating Systems Question Bank BCS303
Multilevel queue scheduling allocates processes to queues based on priority or type (e.g., system, interactive) and assigns a specific scheduling algorithm to each queue. It offers advantages in managing diverse workloads with different performance needs but can cause starvation for lower-priority processes and complexity in managing inter-queue scheduling .
Demand paging loads pages into memory only when required, reducing unnecessary memory use and swapping. This approach decreases load times and maximizes available memory for other processes, enhancing system performance during multitasking. However, frequent page faults and potential thrashing need efficient handling mechanisms, such as page replacement algorithms, to maintain efficiency .
The Banker's Algorithm dynamically examines resource allocation requests to ensure safe state transitions, preventing deadlocks by simulating future allocations. It assesses the availability of resources and impending requests, enabling safe sequence determination. While effective in theory, its complexity and computational overhead limit practical applicability in fast-paced environments .
Multi-programming allows multiple jobs to reside in memory at once, improving CPU utilization by reducing idle time. Multi-tasking extends this by allowing multiple tasks to appear to run simultaneously via context switching, enhancing responsiveness (Time Sharing). Multi-processing involves using multiple CPUs to execute processes, improving throughput and computational power but requiring sophisticated scheduling and synchronization .
Virtual machines abstract hardware resources, allowing multiple OS instances to run concurrently on a single physical machine. They improve resource utilization by isolating applications and providing flexibility in resource management. However, they introduce overhead and require efficient hypervisors to manage resource allocation and virtualization environments .
Thrashing mitigation involves techniques like ensuring sufficient working set size through load control, implementing page replacement algorithms (e.g., Least Recently Used) effectively, and utilizing system and access pattern-based tuning. These strategies aim to balance memory allocations and optimize page loading to prevent excessive paging-induced performance degradation .
Dual-mode operating systems enhance security and stability by allowing user mode and kernel mode operation. Benefits include protection from user program abuse and misbehavior, as system resources are accessed by switching to kernel mode. Challenges include complex context switching between modes, which can incur performance overhead and increase design complexity .
Client-server computing centralizes resources on servers, facilitating management and security with a specific architecture. In contrast, peer-to-peer computing distributes resources across all systems, promoting scalability and robustness but posing challenges in security and resource management. Communication in client-server is directed through servers, while peer-to-peer involves direct system interactions .
FIFO Page Replacement replaces pages in chronological order, making it straightforward but potentially inefficient by replacing frequently used pages. The Optimal Page Replacement algorithm, though theoretical, replaces the page that won't be used for the longest period, minimizing faults. Compared, Optimal offers lower fault rates but is unfeasible as it requires future knowledge, unlike FIFO's practicality .
File allocation methods like contiguous and indexed allocation determine data organization on storage. Contiguous allocation offers fast access due to sequential storage but limits flexibility and can cause fragmentation. Indexed allocation allows random access and flexible growth via pointers in index blocks but introduces overhead and slower access due to indirect block referencing. Trade-offs involve balancing access speed, flexibility, and overhead management .