Correction
Correction
Discussions:
Use ls to view the contents of a directory.
pwd shows your current location in the file system.
Use cd to navigate to different directories.
Practical – 2
Discussions:
Implementing the First Come First Served (FCFS) CPU scheduling algorithm is a fundamental concept in
operating systems. FCFS is simple, yet it can lead to significant waiting times, especially for processes that
arrive later. This algorithm serves as a basis for more complex scheduling algorithms, providing a foundational
understanding of how processes are scheduled and executed on a CPU
Practical -3
Discussions:
Implementing the Shortest Job First (SJF) CPU scheduling algorithm is crucial for optimizing the execution of
processes in an operating system. SJF minimizes the waiting time of processes by selecting the one with the
shortest burst time next. This method significantly improves system efficiency by executing smaller tasks first,
reducing overall response time and turnaround time.
Practical-4
Discussions:
Implementing Priority Scheduling in CPU scheduling algorithms is vital for ensuring that higher priority
processes are executed before lower priority ones. Priority scheduling helps in optimizing system performance
based on the importance of tasks. However, it can lead to starvation if lower priority processes never get a
chance to execute due to continuously arriving higher priority processes. Balancing priorities and preventing
starvation are crucial aspects of this algorithm.
Quantum Selection: Learning how to choose an appropriate time quantum is essential. It requires
understanding the nature of the processes being executed and the desired system responsiveness.
Practical – 6
Discussions:
Banker's algorithm is a fundamental technique used in operating systems for deadlock prevention. It operates
by determining whether granting a requested set of resources will leave the system in a safe state or not. In a
safe state, it is guaranteed that the system can allocate resources to processes in such a way that they
complete their execution and release resources, preventing deadlocks. The algorithm works based on the
principle of avoiding circular waits and ensures that resources are allocated in a way that satisfies both safety
and liveness properties.
Resource Management: Banker's algorithm teaches the importance of proper resource management. It
ensures that resources are allocated in a way that prevents deadlock without unnecessarily restricting
processes.