Contents

About scheduling algorithms and operating principles

   Mar 15, 2024     1 min read

This is an article about scheduling algorithms and operating principles.

In this article, we are preparing an information processing article and will look into major scheduling algorithms.

Scheduling algorithms play an important role in determining the execution order of processes in an operating system.

Various scheduling algorithms have been developed, and we will take a look at them together.

First-Come, First-Served (FCFS)

The FCFS algorithm is the simplest scheduling algorithm and executes the process that arrives first.

It is a non-preemptive scheduling algorithm because the execution order is determined by the arrival order of processes.

However, if a process with a long execution time arrives first, processes with a short execution time that arrive later have to wait a long time.

Shortest Job First (SJF)

The SJF algorithm prioritizes the process with the shortest execution time.

By predicting execution time, processes with the shortest execution time are executed first, allowing for minimal latency.

However, it is difficult to accurately predict execution time, and “starvation” may occur, where a process with a long execution time may wait indefinitely.

Priority-based scheduling

A priority-based scheduling algorithm assigns a priority to each process and executes the process with the highest priority first.

Priority is expressed as an integer, with smaller numbers having higher priorities.

These algorithms are divided into preemptive and non-preemptive types, and there is also a “dynamic priority” based algorithm where the priority can be changed.

Round Robin

The Round Robin algorithm is a representative scheduling algorithm used in time sharing systems.

Each process runs recursively with the same time allocation, or “time slice”.

After the time slice, the running process moves to the waiting state, and the next process in the order is executed.

This ensures fair execution times in multiprogramming environments.

Conclusion

Scheduling algorithms play an important role in determining the execution order of processes.

Each algorithm has its own pros and cons, and the appropriate algorithm must be selected depending on the goals of the operating system.

This helps you optimize your system’s performance and response time.

thank you