(6055) - 301 T.Y. B.Sc. (Computer Science) Cs - 351: Operating Systems - I (2019 Pattern) (Semester - V) (Paper - I) (CBCS)
(6055) - 301 T.Y. B.Sc. (Computer Science) Cs - 351: Operating Systems - I (2019 Pattern) (Semester - V) (Paper - I) (CBCS)
Segmentation addresses limitations of paging by allowing a program to be divided into variable-sized segments, reflecting the logical divisions such as functions or objects. Unlike paging, which divides memory into fixed-size pages, segmentation aligns more closely with the program's structure and logical usage, which can result in more efficient use of memory and less internal fragmentation. However, segmentation can still suffer from external fragmentation, unlike paging systems which are immune to it .
The medium-term scheduler plays a vital role in managing system processes by temporarily removing processes from main memory to reduce the degree of multiprogramming and later reintroducing them. This process is known as swapping. The medium-term scheduler helps improve system responsiveness and efficient utilization of CPU by managing the swapping process and maintaining an optimal number of processes in memory, which enhances performance and resource allocation .
FCFS is a non-preemptive scheduling algorithm that processes requests sequentially based on arrival time, which can result in long waiting times if a short job is queued behind a long one, known as the 'convoy effect.' Conversely, preemptive SJF selects processes with the shortest burst time, potentially reducing average waiting and turnaround times. However, this requires knowing or predicting the burst time accurately, which can be challenging. Preemptive SJF generally reduces these times compared to FCFS but may increase CPU scheduling complexity .
Distributed operating systems offer several advantages, such as resource sharing, improved performance through load balancing, and increased reliability and availability, as failure in one system in a distributed network does not impact other systems. On the downside, they present challenges such as increased complexity in design and management, potential issues with consistency and data corruption across distributed nodes, and added security concerns because multiple systems are involved .
Fragmentation in memory management occurs when storage space is used inefficiently, reducing capacity or performance. There are two main types: External Fragmentation, which happens when free memory is split into small blocks and scattered throughout the system, preventing allocation for larger blocks; and Internal Fragmentation, which occurs when memory blocks are larger than necessary, leading to wasted space within the allocated block. Both types degrade system performance by reducing efficient memory usage .
The critical section problem in operating systems revolves around ensuring that multiple processes do not have concurrent access to shared resources to prevent data corruption. The challenges include avoiding race conditions and ensuring process synchronization. The solution must satisfy three requirements: Mutual Exclusion, which ensures that only one process enters the critical section at a time; Progress, which guarantees that processes will eventually be able to enter the critical section if it is free; and Bounded Waiting, which ensures that no process waits indefinitely to enter its critical section .
LFU and MFU differ primarily in the way they manage page replacement. LFU replaces the page with the lowest access frequency, meaning pages used less often are swapped out. Conversely, MFU replaces the page with the highest access frequency, under the assumption that pages frequently accessed in the past are less likely to be needed again. The impact on memory management is significant: LFU may lead to high page turnovers in systems with varied access patterns, while MFU may protect pages that are in frequent use from premature replacement .
A race condition occurs when multiple system processes or threads attempt to modify shared data concurrently, leading to unpredictable and erroneous outcomes. Resolving race conditions is critical in operating systems to ensure data integrity and consistent system behavior, as they can cause applications to exhibit erratic behavior or crash. Effective synchronization mechanisms, such as semaphores and locks, are employed to coordinate access to shared resources and prevent such conditions .
The CPU-I/O burst cycle concept refers to the alternating sequences of CPU execution and I/O operations a process experiences during its execution. Processes typically require CPU bursts for computation interspersed with I/O bursts for data input or output operations. This cycle is significant in process scheduling because it helps determine which processes should be given priority, as CPU-bound processes benefit from different scheduling policies compared to I/O-bound processes. Understanding this cycle allows optimized scheduling decisions, balancing system throughput and responsiveness .
A semaphore is a synchronization primitive used in operating systems to control access to a common resource by multiple processes. It enables process synchronization by implementing two atomic operations, wait and signal, to manage the resource access count. Semaphores can be used to solve critical section problems by ensuring that a limited number of processes can access a resource simultaneously, thus preventing race conditions and enhancing process coordination .