Difference between FCFS and Priority CPU scheduling Last Updated : 08 Aug, 2022 Summarize Comments Improve Suggest changes Share Like Article Like Report 1. First Come First Served (FCFS) : First Come First Served (FCFS) is the simplest type of algorithm. It is a non-preemptive algorithm i.e. the process cannot be interrupted once it starts executing. The FCFS is implemented with the help of a FIFO queue. The processes are put into the ready queue in the order of their arrival time. The process that arrives first becomes the head of the queue while the others that arrive after are added to the rear of the queue. In First Come First Served (FCFS) algorithm, the process that arrives first, is sent first for execution by the CPU when CPU is free. The main disadvantage of this algorithm is that the average waiting time is often quite long. It also leads to the convoy effect. This results in lower device or CPU utilisation and lower efficiency. 2. Priority Scheduling Algorithm: Priority scheduling algorithm executes the processes depending upon their priority. Each process is allocated a priority and the process with the highest priority is executed first. Priorities can be defined internally as well as externally. Internal priorities are decided by the system depending upon the number of resources required, time needed etc. whereas external priorities are based upon the time in which the work is needed or the amount being paid for the work done or the importance of process. Priority scheduling can be preemptive or non- preemptive. Note: If two processes have the same priority then tie is broken using FCFS.The waiting time for the highest priority process is always zero in preemptive mode while it may not be zero in case of non preemptive mode.Disadvantages: The major problem is the starvation or indefinite blocking. It may so happen that in stream of processes, the system keeps executing the high priority processes and the low priority processes never get executed. Solution: A solution to the problem is aging. Aging refers to gradually increasing the priority of processes waiting in the system by a fixed number after a fixed interval, say by 1 in every 10 minutes. This will ensure that a low priority process also gets executed by slowly increasing its priority with the time. Differences between FCFS and Priority scheduling algorithm are as follows: First Come First Served (FCFS)Priority schedulingIt executes the processes in the order in which they arrive i.e., the process that arrives first is executed first.It executes the processes based upon their prioritied i.e., in descending order of their priorities. A process with higher priority is executed first.It is non preemptive in nature.It is both non-preemptive and preemptive in nature.It results in quite long waiting time for the processes and thus increases average waiting time.There is no idea of response time and waiting time.It leads to the convoy effect.It may happen that a low priority process keeps waiting for an indefinite time and never gets executed.It is the easiest to implement in any system.It is best suited for real time operating systems.It does not suffers from starvation.It suffers from starvation. Comment More infoAdvertise with us Next Article Difference between FCFS and Priority CPU scheduling M mohitg593 Follow Improve Article Tags : Operating Systems Difference Between GATE CS Operating Systems-CPU Scheduling Similar Reads DBMS Tutorial â Learn Database Management System Database Management System (DBMS) is a software used to manage data from a database. A database is a structured collection of data that is stored in an electronic device. The data can be text, video, image or any other format.A relational database stores data in the form of tables and a NoSQL databa 7 min read Introduction of ER Model The Entity-Relationship Model (ER Model) is a conceptual model for designing a databases. This model represents the logical structure of a database, including entities, their attributes and relationships between them. Entity: An objects that is stored as data such as Student, Course or Company.Attri 10 min read TCP/IP Model The TCP/IP model is a framework that is used to model the communication in a network. It is mainly a collection of network protocols and organization of these protocols in different layers for modeling the network.It has four layers, Application, Transport, Network/Internet and Network Access.While 7 min read Operating System Tutorial An Operating System(OS) is a software that manages and handles hardware and software resources of a computing device. Responsible for managing and controlling all the activities and sharing of computer resources among different running applications.A low-level Software that includes all the basic fu 4 min read Computer Network Tutorial A Computer Network is a system where two or more devices are linked together to share data, resources and information. These networks can range from simple setups, like connecting two devices in your home, to massive global systems, like the Internet. Below are the main components of a computer netw 7 min read Normal Forms in DBMS In the world of database management, Normal Forms are important for ensuring that data is structured logically, reducing redundancy, and maintaining data integrity. When working with databases, especially relational databases, it is critical to follow normalization techniques that help to eliminate 7 min read Types of Operating Systems Operating Systems can be categorized according to different criteria like whether an operating system is for mobile devices (examples Android and iOS) or desktop (examples Windows and Linux). Here, we are going to classify based on functionalities an operating system provides.8 Main Operating System 11 min read What is an Operating System? An Operating System is a System software that manages all the resources of the computing device. Acts as an interface between the software and different parts of the computer or the computer hardware. Manages the overall resources and operations of the computer. Controls and monitors the execution o 9 min read Difference Between IPv4 and IPv6 IPv4 and IPv6 are two versions of the system that gives devices a unique address on the internet, known as the Internet Protocol (IP). IP is like a set of rules that helps devices send and receive data online. Since the internet is made up of billions of connected devices, each one needs its own spe 7 min read CPU Scheduling in Operating Systems CPU scheduling is a process used by the operating system to decide which task or process gets to use the CPU at a particular time. This is important because a CPU can only handle one task at a time, but there are usually many tasks that need to be processed. The following are different purposes of a 8 min read Like