0% found this document useful (0 votes)
2 views2 pages

Correction

The document outlines various practical exercises related to operating system concepts, including directory navigation, CPU scheduling algorithms (FCFS, SJF, Priority, RR), and the Banker's algorithm for deadlock prevention. Each practical discusses key concepts, findings, and learnings, emphasizing the importance of understanding process management and resource allocation. The document serves as a comprehensive guide for foundational operating system principles and their implementation.

Uploaded by

Parth Sarthi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views2 pages

Correction

The document outlines various practical exercises related to operating system concepts, including directory navigation, CPU scheduling algorithms (FCFS, SJF, Priority, RR), and the Banker's algorithm for deadlock prevention. Each practical discusses key concepts, findings, and learnings, emphasizing the importance of understanding process management and resource allocation. The document serves as a comprehensive guide for foundational operating system principles and their implementation.

Uploaded by

Parth Sarthi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Practical-1

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.

Findings and Learnings:


You can see what files and subdirectories are in the current directory.
You learn how to navigate the file system and view directory contents.
You can determine your location in the directory structure.
Understand where you are in the directory tree.

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

Finding and Learning:


Simplicity: FCFS is easy to understand and implement. It follows the natural flow of processing tasks in the
order they arrive.

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.

Findings and Learnings:


Understanding Burst Time: Accurate prediction of process burst times is essential for effective SJF scheduling.
Algorithms or heuristics for burst time estimation can enhance the accuracy of SJF.

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.

Findings and Learnings:


Starvation Prevention: Implementing aging techniques or dynamic priority adjustments can prevent starvation.
Aging increases the priority of waiting processes over time, ensuring they eventually get CPU time.
Process Prioritization: Understanding the criteria for process prioritization is crucial. Processes can be
prioritized based on deadlines, importance, system resources needed, or other application-specific
requirement
Practical-5
Discussion
Implementing the Round Robin (RR) scheduling algorithm is crucial in modern operating systems for ensuring
fairness and preventing starvation among processes. RR is a preemptive scheduling algorithm where each
process is assigned a fixed time quantum and is executed in a cyclic manner. It's widely used due to its
simplicity and fairness in CPU allocation.

Findings and Learnings:


Understanding Preemption: RR is preemptive, meaning processes can be interrupted after their time quantum
expires. Implementing preemption mechanisms is fundamental to RR scheduling.

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.

Findings and Learnings:


Deadlock Prevention: Banker's algorithm effectively prevents deadlocks by analyzing the state of the system
before granting resource requests. It avoids granting resources that could lead to a circular wait condition,
which is a necessary condition for a deadlock.

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.

You might also like