0% found this document useful (0 votes)
6 views

Operating_System_Notes

Scheduling in operating systems aims to maximize CPU utilization, minimize waiting and turnaround times, and ensure fair resource allocation while avoiding process starvation. The effectiveness of scheduling algorithms is evaluated based on criteria like CPU utilization, throughput, and response time. Common scheduling algorithms include First-Come, First-Served, Shortest Job Next, and Round Robin, each with distinct characteristics and implications for process execution.

Uploaded by

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

Operating_System_Notes

Scheduling in operating systems aims to maximize CPU utilization, minimize waiting and turnaround times, and ensure fair resource allocation while avoiding process starvation. The effectiveness of scheduling algorithms is evaluated based on criteria like CPU utilization, throughput, and response time. Common scheduling algorithms include First-Come, First-Served, Shortest Job Next, and Round Robin, each with distinct characteristics and implications for process execution.

Uploaded by

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

Unit 4

1. What are the objectives of Scheduling?

Scheduling in operating systems is crucial to managing process execution efficiently.

The main objectives include:

- Maximize CPU Utilization: Keep the CPU busy with tasks to make the best use of

processing power. This helps to avoid idle CPU time.

- Minimize Waiting Time: Ensure processes spend less time waiting in the queue,

leading to faster task handling and a responsive system.

- Minimize Turnaround Time: Reduce the total time taken from the submission of a

process to its completion. This is essential for maintaining quick execution.

- Minimize Response Time: Aim for a lower response time to improve the system's

interactivity, especially crucial for time-sensitive applications.

- Fair Allocation of Resources: Ensure all processes get a fair share of CPU time

without any one process monopolizing resources.

- Avoid Process Starvation: Ensure that all processes receive CPU attention to avoid

scenarios where low-priority processes are never executed.

2. Write the scheduling criteria.

The effectiveness of scheduling algorithms is evaluated based on certain criteria:

- CPU Utilization: Percentage of time the CPU is actively executing processes. A

higher utilization is better.

- Throughput: Number of processes that complete execution per unit time. A higher

throughput indicates better system efficiency.

- Turnaround Time: The total time taken from the arrival of a process to its

completion. It includes waiting, execution, and any other delays.

- Waiting Time: The amount of time a process remains in the ready queue before

getting CPU access.


- Response Time: The time it takes from process submission until the first response is

produced. This is crucial for interactive systems.

3. List the types of scheduling algorithms.

Common types of scheduling algorithms include:

- First-Come, First-Served (FCFS): The first process to arrive is the first to be

executed.

- Shortest Job Next (SJN): Selects the process with the shortest expected processing

time.

- Priority Scheduling: Processes are selected based on priority. Higher priority

processes are executed first.

- Round Robin (RR): Each process is assigned a fixed time slice in a cyclic order.

- Multilevel Queue Scheduling: Processes are grouped into queues based on priority

and handled accordingly.

- Multilevel Feedback Queue Scheduling: Similar to multilevel but allows processes to

move between queues based on execution behavior.

4. Explain any two scheduling algorithms.

- First-Come, First-Served (FCFS): This algorithm is straightforward where the first

process that enters the ready queue is the first to be executed. While simple, it can

lead to long waiting times if a lengthy process occupies the CPU early (known as the

'convoy effect'). Its non-preemptive nature makes it predictable but not necessarily

efficient.

- Round Robin (RR): In Round Robin, each process gets a small time slice, called a

quantum, before the next process is scheduled. This preemptive method is suitable

for time-sharing environments, ensuring that all processes get a fair share of CPU

time. The efficiency depends on the quantum size; too small a quantum can lead to

high overhead, while too large can mimic FCFS behavior.


5. Short note on deadlock prevention.

Deadlock is a situation where processes are stuck waiting for resources indefinitely.

Deadlock prevention strategies aim to eliminate at least one of the four necessary

conditions for a deadlock:

- Mutual Exclusion: Avoid holding resources that can be shared.

- Hold and Wait: Ensure processes don't hold onto resources while waiting for others.

- No Preemption: Design systems where resources can be preempted or reallocated if

needed.

- Circular Wait: Enforce a strict order for resource allocation to prevent circular

dependencies.

You might also like