

{"id":100388,"date":"2021-09-08T09:00:17","date_gmt":"2021-09-08T03:30:17","guid":{"rendered":"https:\/\/data-flair.training\/blogs\/?p=100388"},"modified":"2021-09-08T10:25:58","modified_gmt":"2021-09-08T04:55:58","slug":"priority-scheduling-algorithm-in-operating-system","status":"publish","type":"post","link":"https:\/\/data-flair.training\/blogs\/priority-scheduling-algorithm-in-operating-system\/","title":{"rendered":"Priority Scheduling Algorithm in Operating System"},"content":{"rendered":"<p>Priority Scheduling is a process scheduling algorithm based on priority where the scheduler selects tasks according to priority. Thus, processes with higher priority execute first followed by processes with lower priorities.<\/p>\n<p>If two jobs have the same priorities then the process that should execute first is chosen on the basis of round-robin or FCFS. Which process should have what priority depends on a process\u2019 memory requirements, time requirements, the ratio of I\/O burst to CPU burst, etc.<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/09\/Introduction-OS-Priority-Scheduling-algorithm.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-100534\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/09\/Introduction-OS-Priority-Scheduling-algorithm.jpg\" alt=\" OS Priority Scheduling algorithm\" width=\"1134\" height=\"452\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/09\/Introduction-OS-Priority-Scheduling-algorithm.jpg 1134w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/09\/Introduction-OS-Priority-Scheduling-algorithm-768x306.jpg 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/09\/Introduction-OS-Priority-Scheduling-algorithm-720x287.jpg 720w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/09\/Introduction-OS-Priority-Scheduling-algorithm-520x207.jpg 520w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/09\/Introduction-OS-Priority-Scheduling-algorithm-320x128.jpg 320w\" sizes=\"auto, (max-width: 1134px) 100vw, 1134px\" \/><\/a><\/p>\n<h3>Types of Priority Scheduling<\/h3>\n<p>Following are the two main types of priority scheduling:<\/p>\n<p><strong>1. Preemptive Scheduling:<\/strong> Tasks execute according to their priorities. In case a lower priority task is running and a higher priority task arrives in the waiting state then the lower priority task is put on hold. The higher priority task replaces it and once done executing the lower priority task resumes execution from when it was paused. This process requires special hardware like a timer.<\/p>\n<p><strong>2. Non-Preemptive Scheduling:<\/strong> The OS allocates the CPU to a specific process that releases the CPU either through context switching or after termination. We can use this method on various hardware platforms because unlike preemptive scheduling it doesn\u2019t require any special hardware.<\/p>\n<h3>Characteristics of Priority Scheduling<\/h3>\n<ul>\n<li>Schedules processes on the basis of priority.<\/li>\n<li>Used to perform batch processes.<\/li>\n<li>In the case of two processes with similar priorities, we use FCFS and Round-Robin to choose between them.<\/li>\n<li>A number is given to each process to indicate its priority level.<\/li>\n<li>Lower is the number assigned, higher is the priority level of a process.<\/li>\n<li>If a higher priority task arrives when a lower priority task is executing, the higher priority task replaces the one with lower priority and the<\/li>\n<li>latter is put on hold until it completes execution.<\/li>\n<\/ul>\n<h3>Example of Priority Scheduling<\/h3>\n<p>Following five processes have a unique priority, burst time, and arrival time.<\/p>\n<table style=\"height: 364px;\" width=\"633\">\n<tbody>\n<tr>\n<td><b>Process<\/b><\/td>\n<td><b>Priority<\/b><\/td>\n<td><b>Burst Time<\/b><\/td>\n<td><b>Arrival Time<\/b><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">P1<\/span><\/td>\n<td><span style=\"font-weight: 400;\">1<\/span><\/td>\n<td><span style=\"font-weight: 400;\">4<\/span><\/td>\n<td><span style=\"font-weight: 400;\">0<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">P2<\/span><\/td>\n<td><span style=\"font-weight: 400;\">2<\/span><\/td>\n<td><span style=\"font-weight: 400;\">3<\/span><\/td>\n<td><span style=\"font-weight: 400;\">0<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">P3<\/span><\/td>\n<td><span style=\"font-weight: 400;\">1<\/span><\/td>\n<td><span style=\"font-weight: 400;\">7<\/span><\/td>\n<td><span style=\"font-weight: 400;\">6<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">P4<\/span><\/td>\n<td><span style=\"font-weight: 400;\">3<\/span><\/td>\n<td><span style=\"font-weight: 400;\">4<\/span><\/td>\n<td><span style=\"font-weight: 400;\">11<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">P5<\/span><\/td>\n<td><span style=\"font-weight: 400;\">2<\/span><\/td>\n<td><span style=\"font-weight: 400;\">2<\/span><\/td>\n<td><span style=\"font-weight: 400;\">12<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>Step 0:<\/strong> At time = 0, two processes P1 and P2 arrive. Since P1(with a burst time 4) has higher priority it executes before P2.<\/p>\n<p><strong>Step 1:<\/strong> At time = 1, no new process arrives and execution of P1 continues.<\/p>\n<p><strong>Step 2:<\/strong> At time = 2, no new process arrives, P2 is in the waiting queue, and execution of P1 continues.<\/p>\n<p><strong>Step 3:<\/strong> At time = 3, no new process arrives, P2 is in the waiting queue, and execution of P1 continues.<\/p>\n<p><strong>Step 4:<\/strong> At time = 4, P1 finishes execution, and P2 starts execution.<\/p>\n<p><strong>Step 5:<\/strong> At time = 5, P2 continues execution as no new process arrives.<\/p>\n<p><strong>Step 6:<\/strong> At time = 6, P3 arrives and since it has a higher priority of 1 the OS preempts P2. P3 starts executing.<\/p>\n<table style=\"height: 367px;\" width=\"673\">\n<tbody>\n<tr>\n<td><b>Process<\/b><\/td>\n<td><b>Priority<\/b><\/td>\n<td><b>Burst Time<\/b><\/td>\n<td><b>Arrival Time<\/b><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">P1<\/span><\/td>\n<td><span style=\"font-weight: 400;\">1<\/span><\/td>\n<td><span style=\"font-weight: 400;\">4<\/span><\/td>\n<td><span style=\"font-weight: 400;\">0<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">P2<\/span><\/td>\n<td><span style=\"font-weight: 400;\">2<\/span><\/td>\n<td><span style=\"font-weight: 400;\">1 of 3 pending<\/span><\/td>\n<td><span style=\"font-weight: 400;\">0<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">P3<\/span><\/td>\n<td><span style=\"font-weight: 400;\">1<\/span><\/td>\n<td><span style=\"font-weight: 400;\">7<\/span><\/td>\n<td><span style=\"font-weight: 400;\">6<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">P4<\/span><\/td>\n<td><span style=\"font-weight: 400;\">3<\/span><\/td>\n<td><span style=\"font-weight: 400;\">4<\/span><\/td>\n<td><span style=\"font-weight: 400;\">11<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">P5<\/span><\/td>\n<td><span style=\"font-weight: 400;\">2<\/span><\/td>\n<td><span style=\"font-weight: 400;\">2<\/span><\/td>\n<td><span style=\"font-weight: 400;\">12<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>Step 7:<\/strong> At time = 7, P3 continues executing as no new process arrives and P2 is on hold in the waiting queue.<\/p>\n<p><strong>Step 8:<\/strong> At time = 8, we continue with P3 as no new process arrives.<\/p>\n<p><strong>Step 9:<\/strong> At time = 9, we continue with P3 as no new process arrives.<\/p>\n<p><strong>Step 10:<\/strong> At time = 10, we continue with P3 as no new process arrives.<\/p>\n<p><strong>Step 11:<\/strong> At time = 11, P4 arrives but P3 continues executing as it has a higher priority than P4.<\/p>\n<table style=\"height: 348px;\" width=\"701\">\n<tbody>\n<tr>\n<td><b>Process<\/b><\/td>\n<td><b>Priority<\/b><\/td>\n<td><b>Burst Time<\/b><\/td>\n<td><b>Arrival Time<\/b><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">P1<\/span><\/td>\n<td><span style=\"font-weight: 400;\">1<\/span><\/td>\n<td><span style=\"font-weight: 400;\">4<\/span><\/td>\n<td><span style=\"font-weight: 400;\">0<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">P2<\/span><\/td>\n<td><span style=\"font-weight: 400;\">2<\/span><\/td>\n<td><span style=\"font-weight: 400;\">1 of 3 pending<\/span><\/td>\n<td><span style=\"font-weight: 400;\">0<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">P3<\/span><\/td>\n<td><span style=\"font-weight: 400;\">1<\/span><\/td>\n<td><span style=\"font-weight: 400;\">7<\/span><\/td>\n<td><span style=\"font-weight: 400;\">6<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">P4<\/span><\/td>\n<td><span style=\"font-weight: 400;\">3<\/span><\/td>\n<td><span style=\"font-weight: 400;\">4<\/span><\/td>\n<td><span style=\"font-weight: 400;\">11<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">P5<\/span><\/td>\n<td><span style=\"font-weight: 400;\">2<\/span><\/td>\n<td><span style=\"font-weight: 400;\">2<\/span><\/td>\n<td><span style=\"font-weight: 400;\">12<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>Step 12:<\/strong> At time = 12, P5 arrives but P3 continues executing as it has a higher priority.<\/p>\n<p><strong>Step 13:<\/strong> At time = 13, P3 is done executing. Now there are three processes P2, P4, and P5 in the ready queue. Among these two processes have higher and similar priorities. These are P2 and P5. Since the arrival time of P2 is less than that of P5, P2 starts execution.<\/p>\n<table style=\"height: 364px;\" width=\"755\">\n<tbody>\n<tr>\n<td><b>Process<\/b><\/td>\n<td><b>Priority<\/b><\/td>\n<td><b>Burst Time<\/b><\/td>\n<td><b>Arrival Time<\/b><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">P1<\/span><\/td>\n<td><span style=\"font-weight: 400;\">1<\/span><\/td>\n<td><span style=\"font-weight: 400;\">4<\/span><\/td>\n<td><span style=\"font-weight: 400;\">0<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">P2<\/span><\/td>\n<td><span style=\"font-weight: 400;\">2<\/span><\/td>\n<td><span style=\"font-weight: 400;\">1 of 3 pending<\/span><\/td>\n<td><span style=\"font-weight: 400;\">0<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">P3<\/span><\/td>\n<td><span style=\"font-weight: 400;\">1<\/span><\/td>\n<td><span style=\"font-weight: 400;\">7<\/span><\/td>\n<td><span style=\"font-weight: 400;\">6<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">P4<\/span><\/td>\n<td><span style=\"font-weight: 400;\">3<\/span><\/td>\n<td><span style=\"font-weight: 400;\">4<\/span><\/td>\n<td><span style=\"font-weight: 400;\">11<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">P5<\/span><\/td>\n<td><span style=\"font-weight: 400;\">2<\/span><\/td>\n<td><span style=\"font-weight: 400;\">2<\/span><\/td>\n<td><span style=\"font-weight: 400;\">12<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>Step 14:<\/strong> At time = 14, P2 completes execution. In the waiting state between P4 and P5, P5 has a higher priority so it starts executing.<\/p>\n<p><strong>Step 15:<\/strong> At time = 15, P5 continues executing.<\/p>\n<p><strong>Step 16:<\/strong> At time = 16, P5 completes execution and since P4 is the only process present in the waiting state it starts executing.<\/p>\n<p><strong>Step 17:<\/strong> At time = 20, no process is left for execution as P5 completes execution.<\/p>\n<p>Step 18: Following is the average waiting time: Waiting Time (Wt) = Start Time (St) &#8211; Arrival Time (At) + Waiting Time for next burst<\/p>\n<p>P1 = 0 &#8211; 0 = 0<\/p>\n<p>P2 = 4 &#8211; 0 + 7 = 11<\/p>\n<p>P3 = 6 &#8211; 6 = 0<\/p>\n<p>P4 = 16 &#8211; 11 = 5<\/p>\n<p>Thus, the average waiting time is: (0+11+0+5+2)\/5 = 18\/5 = 3.6<\/p>\n<h3>Advantages of priority scheduling in OS<\/h3>\n<p>Following are the benefits of priority scheduling method:<\/p>\n<ul>\n<li>Easy to use.<\/li>\n<li>Processes with higher priority execute first which saves time.<\/li>\n<li>The importance of each process is precisely defined.<\/li>\n<li>A good algorithm for applications with fluctuating time and resource requirements.<\/li>\n<\/ul>\n<h3>Disadvantages of priority scheduling in OS<\/h3>\n<p>Following are the disadvantages of priority scheduling:<\/p>\n<ul>\n<li>We can lose all the low-priority processes if the system crashes.<\/li>\n<li>This process can cause starvation if high-priority processes take too much CPU time. The lower priority process can also be postponed for an indefinite time.<\/li>\n<li>There is a chance that a process can\u2019t run even when it is ready as some other process is running currently.<\/li>\n<\/ul>\n<h3>Aging Technique<\/h3>\n<p>Aging technique can help prevent starvation of a process. In this, we can increase the priority of the low-priority processes based on their waiting time. This ensures that no process waits for an indefinite time to get CPU time.<\/p>\n<h3>Implementing priority scheduling algorithm in C++<\/h3>\n<p>Following is the code to implement priority scheduling algorithm in C++:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">#include&lt;bits\/stdc++.h&gt; \r\nusing namespace std; \r\n  \r\nstruct Process \r\n{ \r\n    int pid;  \/\/process ID\r\n    int bt;   \/\/CPU burst time \r\n    int priority; \/\/priority of the process\r\n}; \r\n  \r\nbool sortProcesses(Process a, Process b) \r\n{ \r\n    return (a.priority &gt; b.priority); \r\n} \r\n\r\nvoid findWaitingTime(Process proc[], int n, \r\n                     int wt[]) \r\n{ \r\n    wt[0] = 0; \r\n  \r\n    for (int  i = 1; i &lt; n ; i++ ) \r\n        wt[i] =  proc[i-1].bt + wt[i-1] ; \r\n} \r\n  \r\nvoid findTurnAroundTime( Process proc[], int n, \r\n                         int wt[], int tat[]) \r\n{\r\n    for (int  i = 0; i &lt; n ; i++) \r\n        tat[i] = proc[i].bt + wt[i]; \r\n} \r\n \r\nvoid findavgTime(Process proc[], int n) \r\n{ \r\n    int wt[n], tat[n], total_wt = 0, total_tat = 0; \r\n    findWaitingTime(proc, n, wt); \r\n  \r\n    findTurnAroundTime(proc, n, wt, tat); \r\n  \r\n    cout &lt;&lt; \"\\nProcesses  \"&lt;&lt; \" Burst time  \"\r\n         &lt;&lt; \" Waiting time  \" &lt;&lt; \" Turnaround time\\n\"; \/\/process details\r\n  \r\n    for (int  i=0; i&lt;n; i++) \r\n    { \r\n        total_wt = total_wt + wt[i]; \r\n        total_tat = total_tat + tat[i]; \r\n        cout &lt;&lt; \"   \" &lt;&lt; proc[i].pid &lt;&lt; \"\\t\\t\"\r\n             &lt;&lt; proc[i].bt &lt;&lt; \"\\t    \" &lt;&lt; wt[i] \r\n             &lt;&lt; \"\\t\\t  \" &lt;&lt; tat[i] &lt;&lt;endl; \r\n    } \r\n  \r\n    cout &lt;&lt; \"\\nAverage waiting time = \"\r\n         &lt;&lt; (float)total_wt \/ (float)n; \r\n    cout &lt;&lt; \"\\nAverage turnaround time = \"\r\n         &lt;&lt; (float)total_tat \/ (float)n; \r\n} \r\n  \r\nvoid priorityScheduling(Process proc[], int n) \r\n{ \r\n    sort(proc, proc + n, sortProcesses); \r\n  \r\n    cout&lt;&lt; \"Order in which processes gets executed \\n\"; \r\n    for (int  i = 0 ; i &lt;  n; i++) \r\n        cout &lt;&lt; proc[i].pid &lt;&lt;\" \" ; \r\n  \r\n    findavgTime(proc, n); \r\n} \r\n  \r\n\/\/ Driver code \r\nint main() \r\n{ \r\n    Process proc[] = {{1, 10, 2}, {2, 5, 0}, {3, 8, 1}}; \r\n    int n = sizeof proc \/ sizeof proc[0]; \r\n    priorityScheduling(proc, n); \r\n    return 0; \r\n}\r\n<\/pre>\n<h3>Summary<\/h3>\n<p>Priority Scheduling is a process scheduling algorithm based on priority where the scheduler selects tasks according to priority. Processes with higher priority execute first followed by the ones with lower priority. There are two types of priority scheduling: preemptive and non-preemptive. Aging techniques can help prevent starvation.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Priority Scheduling is a process scheduling algorithm based on priority where the scheduler selects tasks according to priority. Thus, processes with higher priority execute first followed by processes with lower priorities. If two jobs&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":100532,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[24565],"tags":[25048,25050,25049,25046,25047,25051],"class_list":["post-100388","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-operating-system-tutorials","tag-advantages-of-priority-scheduling","tag-aging-technique-in-os","tag-disadvantages-of-priority-scheduling","tag-priority-scheduling-algorithm-in-os","tag-priority-scheduling-in-os","tag-types-of-priority-scheduling"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Priority Scheduling Algorithm in Operating System - DataFlair<\/title>\n<meta name=\"description\" content=\"Learn priority scheduling algorithm in operating system, its types, characteristics, example, advantages, disadvantages &amp; implementation.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/data-flair.training\/blogs\/priority-scheduling-algorithm-in-operating-system\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Priority Scheduling Algorithm in Operating System - DataFlair\" \/>\n<meta property=\"og:description\" content=\"Learn priority scheduling algorithm in operating system, its types, characteristics, example, advantages, disadvantages &amp; implementation.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/data-flair.training\/blogs\/priority-scheduling-algorithm-in-operating-system\/\" \/>\n<meta property=\"og:site_name\" content=\"DataFlair\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/DataFlairWS\/\" \/>\n<meta property=\"article:published_time\" content=\"2021-09-08T03:30:17+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-09-08T04:55:58+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/09\/OS-Priority-Scheduling-algorithm.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"DataFlair Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:site\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"DataFlair Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Priority Scheduling Algorithm in Operating System - DataFlair","description":"Learn priority scheduling algorithm in operating system, its types, characteristics, example, advantages, disadvantages & implementation.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/data-flair.training\/blogs\/priority-scheduling-algorithm-in-operating-system\/","og_locale":"en_US","og_type":"article","og_title":"Priority Scheduling Algorithm in Operating System - DataFlair","og_description":"Learn priority scheduling algorithm in operating system, its types, characteristics, example, advantages, disadvantages & implementation.","og_url":"https:\/\/data-flair.training\/blogs\/priority-scheduling-algorithm-in-operating-system\/","og_site_name":"DataFlair","article_publisher":"https:\/\/www.facebook.com\/DataFlairWS\/","article_published_time":"2021-09-08T03:30:17+00:00","article_modified_time":"2021-09-08T04:55:58+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/09\/OS-Priority-Scheduling-algorithm.jpg","type":"image\/jpeg"}],"author":"DataFlair Team","twitter_card":"summary_large_image","twitter_creator":"@DataFlairWS","twitter_site":"@DataFlairWS","twitter_misc":{"Written by":"DataFlair Team","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/data-flair.training\/blogs\/priority-scheduling-algorithm-in-operating-system\/#article","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/priority-scheduling-algorithm-in-operating-system\/"},"author":{"name":"DataFlair Team","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/b49855299264df5e27e3ec6c2cd9fde9"},"headline":"Priority Scheduling Algorithm in Operating System","datePublished":"2021-09-08T03:30:17+00:00","dateModified":"2021-09-08T04:55:58+00:00","mainEntityOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/priority-scheduling-algorithm-in-operating-system\/"},"wordCount":931,"commentCount":3,"publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/priority-scheduling-algorithm-in-operating-system\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/09\/OS-Priority-Scheduling-algorithm.jpg","keywords":["advantages of priority scheduling","Aging technique in OS","Disadvantages of priority scheduling","Priority Scheduling Algorithm in OS","Priority Scheduling in OS","Types of priority scheduling"],"articleSection":["Operating System Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/data-flair.training\/blogs\/priority-scheduling-algorithm-in-operating-system\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/data-flair.training\/blogs\/priority-scheduling-algorithm-in-operating-system\/","url":"https:\/\/data-flair.training\/blogs\/priority-scheduling-algorithm-in-operating-system\/","name":"Priority Scheduling Algorithm in Operating System - DataFlair","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/priority-scheduling-algorithm-in-operating-system\/#primaryimage"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/priority-scheduling-algorithm-in-operating-system\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/09\/OS-Priority-Scheduling-algorithm.jpg","datePublished":"2021-09-08T03:30:17+00:00","dateModified":"2021-09-08T04:55:58+00:00","description":"Learn priority scheduling algorithm in operating system, its types, characteristics, example, advantages, disadvantages & implementation.","breadcrumb":{"@id":"https:\/\/data-flair.training\/blogs\/priority-scheduling-algorithm-in-operating-system\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/data-flair.training\/blogs\/priority-scheduling-algorithm-in-operating-system\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/priority-scheduling-algorithm-in-operating-system\/#primaryimage","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/09\/OS-Priority-Scheduling-algorithm.jpg","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/09\/OS-Priority-Scheduling-algorithm.jpg","width":1200,"height":628,"caption":"OS Priority Scheduling algorithm"},{"@type":"BreadcrumbList","@id":"https:\/\/data-flair.training\/blogs\/priority-scheduling-algorithm-in-operating-system\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog Home","item":"https:\/\/data-flair.training\/blogs\/"},{"@type":"ListItem","position":2,"name":"Operating System Tutorials","item":"https:\/\/data-flair.training\/blogs\/category\/operating-system-tutorials\/"},{"@type":"ListItem","position":3,"name":"Priority Scheduling Algorithm in Operating System"}]},{"@type":"WebSite","@id":"https:\/\/data-flair.training\/blogs\/#website","url":"https:\/\/data-flair.training\/blogs\/","name":"DataFlair","description":"Learn Today. Lead Tomorrow.","publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/data-flair.training\/blogs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/data-flair.training\/blogs\/#organization","name":"DataFlair","url":"https:\/\/data-flair.training\/blogs\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","width":106,"height":48,"caption":"DataFlair"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/DataFlairWS\/","https:\/\/x.com\/DataFlairWS","https:\/\/www.linkedin.com\/company\/dataflair-web-services-pvt-ltd\/","https:\/\/www.youtube.com\/user\/DataFlairWS"]},{"@type":"Person","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/b49855299264df5e27e3ec6c2cd9fde9","name":"DataFlair Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/ef46b745ddad2fad690af626c6ef29b91809ad0a9f5ef398d07817d8cad042f5?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/ef46b745ddad2fad690af626c6ef29b91809ad0a9f5ef398d07817d8cad042f5?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ef46b745ddad2fad690af626c6ef29b91809ad0a9f5ef398d07817d8cad042f5?s=96&d=mm&r=g","caption":"DataFlair Team"},"description":"DataFlair Team is a group of passionate educators and industry experts dedicated to providing high-quality online learning resources on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. With years of experience in the field, the team aims to simplify complex topics and help learners advance their careers. At DataFlair, we believe in empowering students and professionals with the knowledge and skills needed to thrive in today\u2019s fast-paced tech industry. Follow us for Free courses, expert insights, tutorials, and practical tips to boost your learning journey.","url":"https:\/\/data-flair.training\/blogs\/author\/datafbdad\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/100388","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/comments?post=100388"}],"version-history":[{"count":3,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/100388\/revisions"}],"predecessor-version":[{"id":100535,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/100388\/revisions\/100535"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media\/100532"}],"wp:attachment":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media?parent=100388"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/categories?post=100388"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/tags?post=100388"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}