Implementation and Visualization of CPU Scheduling Algorithms

Authors

  • Aadyot Nandan S
  • Kunda Sri Krishna Vamshi
  • Madhumathy P.
  • Surbhi Agrwal

Abstract

This study focuses on the implementation and evaluation of two important CPU scheduling algorithms, namely First Come First Serve (FCFS) and Shortest Job First (SJF). Both algorithms are implemented in the C programming language, and their execution behavior and outputs are analyzed in detail using Python. FCFS is one of the simplest scheduling techniques, where processes are executed in the order of their arrival. Although easy to implement, FCFS suffers from the convoy effect, in which shorter processes experience longer waiting times due to the execution of larger tasks first. On the other hand, SJF schedules processes based on the shortest burst time, which helps reduce average waiting time and improves overall system performance. However, SJF may lead to starvation of longer processes if shorter jobs continue to arrive. The generated results and visualizations demonstrate the working principles, advantages, and limitations of both scheduling algorithms under different process conditions. This study provides a clear understanding of how CPU scheduling techniques influence system efficiency and process execution performance.

References

X. Cao, C. Chen, S. Li, C. Lv, J. Li, and J. Wang, “Research on computing task scheduling method for distributed heterogeneous parallel systems,” Scientific Reports, vol. 15, Mar. 2025.

M. Doostmohammadian, Z. R. Gabidullina, and H. R. Rabiee, “Machine learning and CPU (central processing unit) scheduling co-optimization over a network of computing centres,” Engineering Applications of Artificial Intelligence, vol. 163, Jan. 2026.

A. Mohammadjafari and P. Khajouie, “Optimizing task scheduling in heterogeneous computing environments: A comparative analysis of CPU, GPU, and ASIC platforms using E2C simulator,” arXiv, May 2024.

I. Banerjee and P. Madhumathy, “IoT based agricultural business model for estimating crop health management to reduce farmer distress using SVM and machine learning,” in Internet of Things and Analytics for Agriculture, vol. 3, P. K. Pattnaik, R. Kumar, and S. Pal, Eds. Singapore: Springer, 2021, pp. 165–183.

S. B. Prasad and P. Madhumathy, “Long term evolution for secured smart railway communications using Internet of Things,” in Machine Learning Algorithms for Industrial Applications, S. K. Das, S. P. Das, N. Dey, and A.-E. Hassanien, Eds., Springer Nature, 2020, pp. 285–300.

P. Madhumathy, S. Singh, S. Shukla, and U. Krishnan, “Detection of humps and potholes on roads and notifying the same to the drivers,” International Journal of Management and Applied Science, vol. 3, no. 1, Special Issue 2, pp. 130–133, Mar. 2017.

N. Kavitha, P. Madhumathy, R. M. Prasad, and D. N. Chandrappa, “Machine learning technique for breast cancer detection and classification,” Machine Learning for Computational Science and Engineering, vol. 1, Apr. 2025.

M. R. Suma and P. Madhumathy, “An optimal swift key generation and distribution for QKD,” Journal Scientific and Technical of Information Technologies, Mechanics and Optics, vol. 22, no. 1, pp. 101–113, 2022.

P. Madhumathy and D. Sivakumar, “A comparative analysis of clustering based routing techniques for WSN,” International Journal of Scientifc & Engineering Research, vol. 3, no. 10, Oct. 2012.

I. Khan, M. Owais, S. Aleem, and T. Jama, “A review on new multilevel scheduling algorithm and SJF and priority scheduling algorithms,” International Journal of Scientific Research in Network Security and Communication, vol. 11, no. 6, pp. 1–8, Dec. 2023.

M. González-Rodríguez, L. Otero-Cerdeira, E. González-Rufino, and F. J. Rodríguez-Martínez, “Study and evaluation of CPU scheduling algorithms,” Heliyon, vol. 10, no. 9, May 2024.

L. Li, “Advances in CPU scheduling algorithms in operating systems,” in Highlights in Science, Engineering and Technology, vol. 120, Proceedings of the AMCCE 2024 Conference, pp. 8–13, 2024.

A. K. Gupta, P. Mathur, C. M. Travieso-Gonzalez, M. Garg, and D. Goyal, “ORR: optimized round Robin CPU scheduling algorithm,” in Proceedings of the International Conference on Data Science, Machine Learning and Artificial Intelligence, Jan. 2022, pp. 296–304.

M. Y. Shakor, “Scheduling and synchronization algorithms in operating system: A survey,” Journal of Studies in Science and Engineering, vol. 1, no. 2, pp. 1–6, Nov. 2021.

Published

2026-06-12