{"id":3295,"date":"2025-06-06T14:16:32","date_gmt":"2025-06-06T14:16:32","guid":{"rendered":"https:\/\/diznr.com\/?p=3295"},"modified":"2025-06-06T14:16:32","modified_gmt":"2025-06-06T14:16:32","slug":"day-01part-12-operating-system-for-computer-concept-of-priority-information-in-system-operating","status":"publish","type":"post","link":"https:\/\/www.reilsolar.com\/pdf\/day-01part-12-operating-system-for-computer-concept-of-priority-information-in-system-operating\/","title":{"rendered":"Day 01Part 12- Operating system for computer &#8211; Concept of Priority information in Operating system"},"content":{"rendered":"<p>Day 01Part 12- Operating system for computer &#8211; Concept of Priority information in Operating system<\/p>\n<p>[fvplayer id=&#8221;340&#8243;]<\/p>\n<h3 data-start=\"0\" data-end=\"53\"><strong data-start=\"4\" data-end=\"51\">\u00a0Concept of Priority in Operating Systems<\/strong><\/h3>\n<p data-start=\"55\" data-end=\"325\">In an <strong data-start=\"61\" data-end=\"96\">Operating System (OS), priority<\/strong> plays a crucial role in process scheduling, ensuring that important tasks get CPU time before less critical ones. Priority scheduling is widely used in <strong data-start=\"249\" data-end=\"322\">real-time systems, multitasking environments, and resource allocation<\/strong>.<\/p>\n<h3 data-start=\"332\" data-end=\"384\"><strong data-start=\"335\" data-end=\"382\">\u00a0What is Priority in an Operating System?<\/strong><\/h3>\n<p data-start=\"385\" data-end=\"575\">Priority refers to a <strong data-start=\"406\" data-end=\"447\">numerical value assigned to a process<\/strong> that determines its importance in execution. A <strong data-start=\"495\" data-end=\"522\">higher priority process<\/strong> gets executed before a <strong data-start=\"546\" data-end=\"572\">lower priority process<\/strong>.<\/p>\n<h3 data-start=\"582\" data-end=\"622\"><strong data-start=\"585\" data-end=\"620\">\u00a0Types of Priority Scheduling<\/strong><\/h3>\n<h3 data-start=\"624\" data-end=\"664\"><strong data-start=\"628\" data-end=\"662\">\u00a0Static Priority Scheduling<\/strong><\/h3>\n<p data-start=\"665\" data-end=\"874\">\u00a0Priority is assigned <strong data-start=\"688\" data-end=\"708\">before execution<\/strong> and remains unchanged.<br data-start=\"731\" data-end=\"734\" \/>\u00a0Example: <strong data-start=\"745\" data-end=\"779\">Kernel processes, system tasks<\/strong> (always have high priority).<br data-start=\"808\" data-end=\"811\" \/>\u00a0Used in <strong data-start=\"821\" data-end=\"842\">real-time systems<\/strong> where priority is predefined.<\/p>\n<h3 data-start=\"876\" data-end=\"917\"><strong data-start=\"880\" data-end=\"915\">\u00a0Dynamic Priority Scheduling<\/strong><\/h3>\n<p data-start=\"918\" data-end=\"1198\">\u00a0Priority <strong data-start=\"929\" data-end=\"957\">changes during execution<\/strong> based on factors like aging, CPU burst time, or I\/O requirements.<br data-start=\"1023\" data-end=\"1026\" \/>\u00a0Prevents <strong data-start=\"1037\" data-end=\"1051\">starvation<\/strong> (low-priority processes getting delayed indefinitely).<br data-start=\"1106\" data-end=\"1109\" \/>\u00a0Example: <strong data-start=\"1120\" data-end=\"1139\">Aging Technique<\/strong> (low-priority processes gradually gain higher priority).<\/p>\n<h3 data-start=\"1205\" data-end=\"1256\"><strong data-start=\"1208\" data-end=\"1254\">\u00a0Types of Priority Scheduling Algorithms<\/strong><\/h3>\n<div class=\"overflow-x-auto contain-inline-size\">\n<table data-start=\"1258\" data-end=\"1808\">\n<thead data-start=\"1258\" data-end=\"1330\">\n<tr data-start=\"1258\" data-end=\"1330\">\n<th data-start=\"1258\" data-end=\"1274\"><strong data-start=\"1260\" data-end=\"1273\">Algorithm<\/strong><\/th>\n<th data-start=\"1274\" data-end=\"1292\"><strong data-start=\"1276\" data-end=\"1291\">Description<\/strong><\/th>\n<th data-start=\"1292\" data-end=\"1309\"><strong data-start=\"1294\" data-end=\"1308\">Advantages<\/strong><\/th>\n<th data-start=\"1309\" data-end=\"1330\"><strong data-start=\"1311\" data-end=\"1328\">Disadvantages<\/strong><\/th>\n<\/tr>\n<\/thead>\n<tbody data-start=\"1398\" data-end=\"1808\">\n<tr data-start=\"1398\" data-end=\"1594\">\n<td><strong data-start=\"1400\" data-end=\"1434\">Preemptive Priority Scheduling<\/strong><\/td>\n<td>Higher priority process preempts (interrupts) a lower one.<\/td>\n<td>Ensures important tasks execute quickly.<\/td>\n<td>Can cause <strong data-start=\"1551\" data-end=\"1565\">starvation<\/strong> of low-priority processes.<\/td>\n<\/tr>\n<tr data-start=\"1595\" data-end=\"1808\">\n<td><strong data-start=\"1597\" data-end=\"1635\">Non-Preemptive Priority Scheduling<\/strong><\/td>\n<td>Higher priority process waits until the current process finishes.<\/td>\n<td>Simple and avoids frequent context switching.<\/td>\n<td><strong data-start=\"1754\" data-end=\"1776\">Long waiting times<\/strong> for lower-priority processes.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<h3 data-start=\"1815\" data-end=\"1857\"><strong data-start=\"1818\" data-end=\"1855\">\u00a0Example of Priority Scheduling<\/strong><\/h3>\n<p data-start=\"1858\" data-end=\"1901\"><strong data-start=\"1858\" data-end=\"1899\">Given processes and their priorities:<\/strong><\/p>\n<div class=\"overflow-x-auto contain-inline-size\">\n<table data-start=\"1903\" data-end=\"2041\">\n<thead data-start=\"1903\" data-end=\"1943\">\n<tr data-start=\"1903\" data-end=\"1943\">\n<th data-start=\"1903\" data-end=\"1913\">Process<\/th>\n<th data-start=\"1913\" data-end=\"1924\">Priority<\/th>\n<th data-start=\"1924\" data-end=\"1943\">Burst Time (ms)<\/th>\n<\/tr>\n<\/thead>\n<tbody data-start=\"1981\" data-end=\"2041\">\n<tr data-start=\"1981\" data-end=\"1996\">\n<td>P1<\/td>\n<td>3<\/td>\n<td>10<\/td>\n<\/tr>\n<tr data-start=\"1997\" data-end=\"2011\">\n<td>P2<\/td>\n<td>1<\/td>\n<td>5<\/td>\n<\/tr>\n<tr data-start=\"2012\" data-end=\"2026\">\n<td>P3<\/td>\n<td>4<\/td>\n<td>2<\/td>\n<\/tr>\n<tr data-start=\"2027\" data-end=\"2041\">\n<td>P4<\/td>\n<td>2<\/td>\n<td>8<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p data-start=\"2043\" data-end=\"2172\"><strong data-start=\"2045\" data-end=\"2099\">Execution Order (Higher number = Higher priority):<\/strong><br data-start=\"2099\" data-end=\"2102\" \/>\ud83d\udfe2 <strong data-start=\"2105\" data-end=\"2126\">P3 \u2192 P1 \u2192 P4 \u2192 P2<\/strong> (Executed in descending order of priority).<\/p>\n<h3 data-start=\"2179\" data-end=\"2240\"><strong data-start=\"2182\" data-end=\"2238\">\u00a0Advantages &amp; Disadvantages of Priority Scheduling<\/strong><\/h3>\n<p data-start=\"2241\" data-end=\"2559\"><strong data-start=\"2243\" data-end=\"2284\">Efficient execution of critical tasks<\/strong> (useful in real-time systems).<br data-start=\"2315\" data-end=\"2318\" \/><strong data-start=\"2320\" data-end=\"2342\">Allows flexibility<\/strong> (different priority levels for different tasks).<br data-start=\"2391\" data-end=\"2394\" \/><strong data-start=\"2396\" data-end=\"2418\">Starvation problem<\/strong> (low-priority tasks may get delayed indefinitely).<br data-start=\"2469\" data-end=\"2472\" \/><strong data-start=\"2474\" data-end=\"2519\">Requires additional scheduling mechanisms<\/strong> like <strong data-start=\"2525\" data-end=\"2534\">aging<\/strong> to prevent starvation.<\/p>\n<h3 data-start=\"2566\" data-end=\"2593\"><strong data-start=\"2570\" data-end=\"2591\">\u00a0Final Thoughts<\/strong><\/h3>\n<p data-start=\"2594\" data-end=\"2882\">Priority scheduling is widely used in <strong data-start=\"2632\" data-end=\"2694\">real-time OS, process management, and multitasking systems<\/strong>. It ensures that high-priority tasks are executed <strong data-start=\"2745\" data-end=\"2760\">efficiently<\/strong>, but proper techniques (like <strong data-start=\"2790\" data-end=\"2799\">aging<\/strong>) must be used to prevent lower-priority processes from <strong data-start=\"2855\" data-end=\"2879\">waiting indefinitely<\/strong>.<\/p>\n<p data-start=\"2884\" data-end=\"2988\" data-is-last-node=\"\" data-is-only-node=\"\">Would you like <strong data-start=\"2899\" data-end=\"2982\">detailed examples, Gantt charts, or comparison with other scheduling algorithms<\/strong>?<\/p>\n<h3 data-start=\"2884\" data-end=\"2988\"><a href=\"https:\/\/www.vssut.ac.in\/lecture_notes\/lecture1423726024.pdf\" target=\"_blank\" rel=\"noopener\">Day 01Part 12- Operating system for computer &#8211; Concept of Priority information in Operating system<\/a><\/h3>\n<h3 class=\"LC20lb MBeuO DKV0Md\"><a href=\"https:\/\/sriindu.ac.in\/wp-content\/uploads\/2023\/10\/R20CSE2202-OPERATING-SYSTEMS.pdf\" target=\"_blank\" rel=\"noopener\">OPERATING SYSTEM Lecture Notes On<\/a><\/h3>\n<h3 class=\"LC20lb MBeuO DKV0Md\">Operating System Concepts, 8th Edition<\/h3>\n<h3 class=\"LC20lb MBeuO DKV0Md\"><a href=\"https:\/\/drive.uqu.edu.sa\/_\/mskhayat\/files\/MySubjects\/2017SS%20Operating%20Systems\/Abraham%20Silberschatz-Operating%20System%20Concepts%20(9th,2012_12).pdf\" target=\"_blank\" rel=\"noopener\">Operating System Concepts<\/a><\/h3>\n<p>Here\u2019s a clear explanation of the <strong>Concept of Priority in Operating Systems<\/strong>, ideal for <strong>Day 01 \u2013 Part 12<\/strong> of your study plan.<\/p>\n<hr \/>\n<h2>\ud83d\udda5\ufe0f <strong>Operating System \u2013 Concept of Priority (Day 01 \u2013 Part 12)<\/strong><\/h2>\n<h3>\ud83d\udccc <strong>What is Priority in Operating Systems?<\/strong><\/h3>\n<p>In an Operating System (OS), <strong>priority<\/strong> is a value assigned to a <strong>process<\/strong> that helps the CPU decide <strong>which process to run first<\/strong> when multiple processes are ready to execute.<\/p>\n<p>It is a fundamental concept in <strong>process scheduling<\/strong> to ensure that <strong>important or urgent tasks<\/strong> are given <strong>preferential access to CPU time<\/strong>.<\/p>\n<hr \/>\n<h2>\ud83e\udde0 <strong>Why Priority Is Used<\/strong><\/h2>\n<ul>\n<li>To <strong>manage multitasking<\/strong><\/li>\n<li>To <strong>ensure faster response<\/strong> for critical processes (like system tasks or real-time apps)<\/li>\n<li>To <strong>prevent starvation<\/strong> or ensure fairness (when used with aging)<\/li>\n<\/ul>\n<hr \/>\n<h2>\ud83e\uddfe <strong>Types of Priority:<\/strong><\/h2>\n<table>\n<thead>\n<tr>\n<th><strong>Type<\/strong><\/th>\n<th><strong>Description<\/strong><\/th>\n<th><strong>Example<\/strong><\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><strong>Static Priority<\/strong><\/td>\n<td>Fixed at the time of process creation<\/td>\n<td>Real-time system may assign fixed priorities<\/td>\n<\/tr>\n<tr>\n<td><strong>Dynamic Priority<\/strong><\/td>\n<td>Can change during execution<\/td>\n<td>Based on aging or process behavior<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr \/>\n<h2>\ud83e\uddee <strong>How Priority Scheduling Works:<\/strong><\/h2>\n<ol>\n<li>The <strong>CPU scheduler<\/strong> selects the process with the <strong>highest priority<\/strong>.<\/li>\n<li>If two processes have the same priority, it may use <strong>FCFS (First Come First Serve)<\/strong>.<\/li>\n<li>Can be <strong>preemptive<\/strong> or <strong>non-preemptive<\/strong>:\n<ul>\n<li><strong>Preemptive<\/strong>: A higher-priority process can <strong>interrupt<\/strong> a lower-priority one.<\/li>\n<li><strong>Non-preemptive<\/strong>: The current process runs to completion even if a higher-priority one arrives.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<hr \/>\n<h3>\ud83e\uddfe <strong>Example:<\/strong><\/h3>\n<p>Assume three processes with the following priorities (lower number = higher priority):<\/p>\n<table>\n<thead>\n<tr>\n<th>Process<\/th>\n<th>Burst Time<\/th>\n<th>Priority<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>P1<\/td>\n<td>5 ms<\/td>\n<td>2<\/td>\n<\/tr>\n<tr>\n<td>P2<\/td>\n<td>3 ms<\/td>\n<td>1<\/td>\n<\/tr>\n<tr>\n<td>P3<\/td>\n<td>4 ms<\/td>\n<td>3<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\ud83d\udc49 <strong>CPU Order (Preemptive)<\/strong>: P2 \u2192 P1 \u2192 P3<br \/>\n\ud83d\udc49 <strong>CPU Order (Non-Preemptive)<\/strong>: Based on arrival time and priority<\/p>\n<hr \/>\n<h2>\ud83d\udeab <strong>Drawbacks of Priority Scheduling<\/strong><\/h2>\n<ul>\n<li><strong>Starvation<\/strong>: Low-priority processes may never get CPU time.<\/li>\n<li><strong>Solution<\/strong>: Use <strong>Aging<\/strong> \u2013 gradually increase the priority of waiting processes.<\/li>\n<\/ul>\n<hr \/>\n<h2>\u2705 <strong>Summary Table<\/strong><\/h2>\n<table>\n<thead>\n<tr>\n<th><strong>Term<\/strong><\/th>\n<th><strong>Meaning<\/strong><\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><strong>Priority<\/strong><\/td>\n<td>Rank of process importance<\/td>\n<\/tr>\n<tr>\n<td><strong>Preemptive<\/strong><\/td>\n<td>High-priority interrupts low-priority<\/td>\n<\/tr>\n<tr>\n<td><strong>Non-preemptive<\/strong><\/td>\n<td>Current process completes before switching<\/td>\n<\/tr>\n<tr>\n<td><strong>Starvation<\/strong><\/td>\n<td>Low-priority process gets ignored<\/td>\n<\/tr>\n<tr>\n<td><strong>Aging<\/strong><\/td>\n<td>Priority increases the longer a process waits<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr \/>\n<p>Let me know if you\u2019d like:<\/p>\n<ul>\n<li>Practice problems<\/li>\n<li>GATE-style MCQs<\/li>\n<li>Real-world OS examples (like Linux or Windows)<\/li>\n<\/ul>\n<p>I&#8217;m happy to assist further!<\/p>\n<h3><a href=\"https:\/\/mu.ac.in\/wp-content\/uploads\/2020\/12\/Operating-System.pdf\" target=\"_blank\" rel=\"noopener\">Day 01Part 12- Operating system for computer &#8211; Concept of Priority information in Operating system<\/a><\/h3>\n","protected":false},"excerpt":{"rendered":"<p>Day 01Part 12- Operating system for computer &#8211; Concept of Priority information in Operating system [fvplayer id=&#8221;340&#8243;] \u00a0Concept of Priority in Operating Systems In an Operating System (OS), priority plays a crucial role in process scheduling, ensuring that important tasks get CPU time before less critical ones. Priority scheduling is widely used in real-time systems, [&hellip;]<\/p>\n","protected":false},"author":66,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[78],"tags":[],"class_list":["post-3295","post","type-post","status-publish","format-standard","hentry","category-operating-system"],"_links":{"self":[{"href":"https:\/\/www.reilsolar.com\/pdf\/wp-json\/wp\/v2\/posts\/3295","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.reilsolar.com\/pdf\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.reilsolar.com\/pdf\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.reilsolar.com\/pdf\/wp-json\/wp\/v2\/users\/66"}],"replies":[{"embeddable":true,"href":"https:\/\/www.reilsolar.com\/pdf\/wp-json\/wp\/v2\/comments?post=3295"}],"version-history":[{"count":0,"href":"https:\/\/www.reilsolar.com\/pdf\/wp-json\/wp\/v2\/posts\/3295\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.reilsolar.com\/pdf\/wp-json\/wp\/v2\/media?parent=3295"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.reilsolar.com\/pdf\/wp-json\/wp\/v2\/categories?post=3295"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.reilsolar.com\/pdf\/wp-json\/wp\/v2\/tags?post=3295"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}