Things to take care while designing a CPU Scheduling algorithm?
Different CPU Scheduling algorithms have different structures and the choice of a particular algorithm depends on a variety of factors. Many conditions have been raised to compare CPU scheduling algorithms.
The criteria include the following:
- CPU utilization: The main purpose of any CPU algorithm is to keep the CPU as busy as possible. Theoretically, CPU usage can range from 0 to 100 but in a real-time system, it varies from 40 to 90 percent depending on the system load.
- Throughput: The average CPU performance is the number of processes performed and completed during each unit. This is called throughput. The output may vary depending on the length or duration of the processes.
- Turn round Time: For a particular process, the important conditions are how long it takes to perform that process. The time elapsed from the time of process delivery to the time of completion is known as the conversion time. Conversion time is the amount of time spent waiting for memory access, waiting in line, using CPU, and waiting for I / O.
- Waiting Time: The Scheduling algorithm does not affect the time required to complete the process once it has started performing. It only affects the waiting time of the process i.e. the time spent in the waiting process in the ready queue.
- Response Time: In a collaborative system, turn around time is not the best option. The process may produce something early and continue to computing the new results while the previous results are released to the user. Therefore another method is the time taken in the submission of the application process until the first response is issued. This measure is called response time.
CPU Scheduling in Operating Systems
Scheduling of processes/work is done to finish the work on time. CPU Scheduling is a process that allows one process to use the CPU while another process is delayed (in standby) due to unavailability of any resources such as I / O etc, thus making full use of the CPU. The purpose of CPU Scheduling is to make the system more efficient, faster, and fairer.
Whenever the CPU becomes idle, the operating system must select one of the processes in the line ready for launch. The selection process is done by a temporary (CPU) scheduler. The Scheduler selects between memory processes ready to launch and assigns the CPU to one of them.
Table of Contents
- What is a Process?
- How is Process Memory used for efficient operation?
- What is Process Scheduling?
- Why do we need to schedule processes?
- What is the need for CPU Scheduling Algorithm?
- Objectives of Process Scheduling Algorithm
- What are the different terminologies?
- Things to take care while designing CPU Scheduling Algorithm
- What are different types of CPU Scheduling Algorithms?
- 1) First Come First Serve (FCFS)
- Characteristics of FCFS
- Advantages of FCFS
- Disadvantages of FCFS
- 2) Shortest Job First (SJF)
- Characteristics of SJF
- Advantages of SJF
- Disadvantages of SJF
- 3) Longest Job First (LJF)
- Characteristics of LJF
- Advantages of LJF
- Disadvantages of LJF
- 4) Priority Scheduling
- Characteristics of Priority Scheduling
- Advantages of Priority Scheduling
- Disadvantages of Priority Scheduling
- 5) Round Robin
- Characteristics of Round Robin
- Advantages of Round Robin
- 6) Shortest Remaining Time First (SRTF)
- Characteristics of SRTF
- Advantages of SRTF
- Disadvantages of SRTF
- 7) Longest Remaining Time First (LRTF)
- Characteristics of LRTF
- Advanatges of LRTF
- Disadvantages of LRTF
- 8) Highest Response Ratio Next (HRRN)
- Characteristics of HRRN
- Advantages of HRRN
- Disadvantages of HRRN
- 9) Multiple Queue Scheduling
- Advantages of multilevel queue scheduling
- Disadvantages of multilevel queue scheduling
- 10) Multilevel Feedback Queue Scheduling (MLFQ)
- Characteristics of MLFQ
- Advantages of MLFQ
- Disadvantages of MLFQ
- 1) First Come First Serve (FCFS)
- Comparison between various CPU Scheduling Algorithms
- Exercise