{"id":372,"date":"2025-12-23T03:24:46","date_gmt":"2025-12-23T03:24:46","guid":{"rendered":"https:\/\/mitalgoswami.in\/?p=372"},"modified":"2026-01-28T04:37:24","modified_gmt":"2026-01-28T04:37:24","slug":"below-is-the-priority-scheduling-non-preemptive-solution-for-the-given-data","status":"publish","type":"post","link":"https:\/\/mitalgoswami.in\/?p=372","title":{"rendered":"the Priority Scheduling \u2013 Non-Preemptive solution for the given data."},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Given Process Table<\/h2>\n\n\n\n<p><em>(Assume: <strong>lower priority number = higher priority<\/strong>)<\/em><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Process<\/th><th>Arrival Time<\/th><th>Burst Time<\/th><th>Priority<\/th><\/tr><\/thead><tbody><tr><td>P1<\/td><td>0<\/td><td>5<\/td><td>3<\/td><\/tr><tr><td>P2<\/td><td>2<\/td><td>3<\/td><td>5<\/td><\/tr><tr><td>P3<\/td><td>3<\/td><td>2<\/td><td>1<\/td><\/tr><tr><td>P4<\/td><td>1<\/td><td>3<\/td><td>2<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Step-by-Step Scheduling (Non-Preemptive)<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Time = 0<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Available: <strong>P1<\/strong><\/li>\n\n\n\n<li>Execute <strong>P1<\/strong> (only process available)<\/li>\n<\/ul>\n\n\n\n<p><strong>P1 runs from 0 \u2192 5<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">Time = 5<\/h3>\n\n\n\n<p>Available processes:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>P2 (priority 5)<\/li>\n\n\n\n<li>P3 (priority 1)<\/li>\n\n\n\n<li>P4 (priority 2)<\/li>\n<\/ul>\n\n\n\n<p>&#x1f449; Highest priority = <strong>P3<\/strong><\/p>\n\n\n\n<p><strong>P3 runs from 5 \u2192 7<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">Time = 7<\/h3>\n\n\n\n<p>Remaining processes:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>P2 (priority 5)<\/li>\n\n\n\n<li>P4 (priority 2)<\/li>\n<\/ul>\n\n\n\n<p>&#x1f449; Highest priority = <strong>P4<\/strong><\/p>\n\n\n\n<p><strong>P4 runs from 7 \u2192 10<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">Time = 10<\/h3>\n\n\n\n<p>Remaining process:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>P2<\/strong><\/li>\n<\/ul>\n\n\n\n<p><strong>P2 runs from 10 \u2192 13<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Gantt Chart<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>| P1 |  P3 |  P4 |  P2 |\n0    5     7     10    13\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Completion Time (CT)<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Process<\/th><th>CT<\/th><\/tr><\/thead><tbody><tr><td>P1<\/td><td>5<\/td><\/tr><tr><td>P3<\/td><td>7<\/td><\/tr><tr><td>P4<\/td><td>10<\/td><\/tr><tr><td>P2<\/td><td>13<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Turnaround Time (TAT = CT \u2212 AT)<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Process<\/th><th>TAT<\/th><\/tr><\/thead><tbody><tr><td>P1<\/td><td>5 \u2212 0 = 5<\/td><\/tr><tr><td>P3<\/td><td>7 \u2212 3 = 4<\/td><\/tr><tr><td>P4<\/td><td>10 \u2212 1 = 9<\/td><\/tr><tr><td>P2<\/td><td>13 \u2212 2 = 11<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Waiting Time (WT = TAT \u2212 BT)<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Process<\/th><th>WT<\/th><\/tr><\/thead><tbody><tr><td>P1<\/td><td>5 \u2212 5 = 0<\/td><\/tr><tr><td>P3<\/td><td>4 \u2212 2 = 2<\/td><\/tr><tr><td>P4<\/td><td>9 \u2212 3 = 6<\/td><\/tr><tr><td>P2<\/td><td>11 \u2212 3 = 8<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Average Times<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Average Waiting Time<\/strong> <math xmlns=\"http:\/\/www.w3.org\/1998\/Math\/MathML\" display=\"block\"><semantics><mrow><mo stretchy=\"false\">(<\/mo><mn>0<\/mn><mo>+<\/mo><mn>2<\/mn><mo>+<\/mo><mn>6<\/mn><mo>+<\/mo><mn>8<\/mn><mo stretchy=\"false\">)<\/mo><mi mathvariant=\"normal\">\/<\/mi><mn>4<\/mn><mo>=<\/mo><mn mathvariant=\"bold\">4<\/mn><\/mrow><annotation encoding=\"application\/x-tex\">(0 + 2 + 6 + 8) \/ 4 = \\mathbf{4}<\/annotation><\/semantics><\/math>(0+2+6+8)\/4=4<\/li>\n\n\n\n<li><strong>Average Turnaround Time<\/strong> <math xmlns=\"http:\/\/www.w3.org\/1998\/Math\/MathML\" display=\"block\"><semantics><mrow><mo stretchy=\"false\">(<\/mo><mn>5<\/mn><mo>+<\/mo><mn>4<\/mn><mo>+<\/mo><mn>9<\/mn><mo>+<\/mo><mn>11<\/mn><mo stretchy=\"false\">)<\/mo><mi mathvariant=\"normal\">\/<\/mi><mn>4<\/mn><mo>=<\/mo><mn mathvariant=\"bold\">7.25<\/mn><\/mrow><annotation encoding=\"application\/x-tex\">(5 + 4 + 9 + 11) \/ 4 = \\mathbf{7.25}<\/annotation><\/semantics><\/math>(5+4+9+11)\/4=7.25<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>&#x2705; <strong>This is the complete solution using Priority Scheduling (Non-Preemptive method).<\/strong><br>If you want, I can also solve the <strong>preemptive version<\/strong> or convert this into <strong>exam-ready steps<\/strong>.<\/p>\n\n\n\n<p>PROCESS ID ARRIVAL TIME BURST TIME PRIORITY P1 0 5 3 P2 2 3 5 P3 3 2 1 P4 1 3 2 above algorithm solved non priority and 5 is a highest priority<\/p>\n\n\n\n<p>Below is the <strong>Priority Scheduling \u2013 Non-Preemptive<\/strong> solution <strong>when priority number 5 is the HIGHEST priority<\/strong>.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Given Process Table<\/h2>\n\n\n\n<p><em>(Higher number = Higher priority)<\/em><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Process<\/th><th>Arrival Time (AT)<\/th><th>Burst Time (BT)<\/th><th>Priority<\/th><\/tr><\/thead><tbody><tr><td>P1<\/td><td>0<\/td><td>5<\/td><td>3<\/td><\/tr><tr><td>P2<\/td><td>2<\/td><td>3<\/td><td><strong>5<\/strong><\/td><\/tr><tr><td>P3<\/td><td>3<\/td><td>2<\/td><td>1<\/td><\/tr><tr><td>P4<\/td><td>1<\/td><td>3<\/td><td>2<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Step-by-Step Scheduling (Non-Preemptive)<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Time = 0<\/h3>\n\n\n\n<p>Available process:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>P1<\/strong><\/li>\n<\/ul>\n\n\n\n<p>&#x1f449; Execute <strong>P1<\/strong> (non-preemptive)<\/p>\n\n\n\n<p><strong>P1 runs from 0 \u2192 5<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">Time = 5<\/h3>\n\n\n\n<p>Available processes:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>P2 (priority <strong>5<\/strong>) &#x2b50;<\/li>\n\n\n\n<li>P3 (priority 1)<\/li>\n\n\n\n<li>P4 (priority 2)<\/li>\n<\/ul>\n\n\n\n<p>&#x1f449; Highest priority = <strong>P2<\/strong><\/p>\n\n\n\n<p><strong>P2 runs from 5 \u2192 8<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">Time = 8<\/h3>\n\n\n\n<p>Remaining processes:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>P3 (priority 1)<\/li>\n\n\n\n<li>P4 (priority 2)<\/li>\n<\/ul>\n\n\n\n<p>&#x1f449; Highest priority = <strong>P4<\/strong><\/p>\n\n\n\n<p><strong>P4 runs from 8 \u2192 11<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">Time = 11<\/h3>\n\n\n\n<p>Remaining process:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>P3<\/strong><\/li>\n<\/ul>\n\n\n\n<p><strong>P3 runs from 11 \u2192 13<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Gantt Chart<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>| P1 |  P2 |  P4 |  P3 |\n0    5     8     11    13\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Completion Time (CT)<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Process<\/th><th>CT<\/th><\/tr><\/thead><tbody><tr><td>P1<\/td><td>5<\/td><\/tr><tr><td>P2<\/td><td>8<\/td><\/tr><tr><td>P4<\/td><td>11<\/td><\/tr><tr><td>P3<\/td><td>13<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Turnaround Time (TAT = CT \u2212 AT)<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Process<\/th><th>TAT<\/th><\/tr><\/thead><tbody><tr><td>P1<\/td><td>5 \u2212 0 = 5<\/td><\/tr><tr><td>P2<\/td><td>8 \u2212 2 = 6<\/td><\/tr><tr><td>P4<\/td><td>11 \u2212 1 = 10<\/td><\/tr><tr><td>P3<\/td><td>13 \u2212 3 = 10<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Waiting Time (WT = TAT \u2212 BT)<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Process<\/th><th>WT<\/th><\/tr><\/thead><tbody><tr><td>P1<\/td><td>5 \u2212 5 = 0<\/td><\/tr><tr><td>P2<\/td><td>6 \u2212 3 = 3<\/td><\/tr><tr><td>P4<\/td><td>10 \u2212 3 = 7<\/td><\/tr><tr><td>P3<\/td><td>10 \u2212 2 = 8<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Average Times<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Average Waiting Time<\/strong> <math xmlns=\"http:\/\/www.w3.org\/1998\/Math\/MathML\" display=\"block\"><semantics><mrow><mo stretchy=\"false\">(<\/mo><mn>0<\/mn><mo>+<\/mo><mn>3<\/mn><mo>+<\/mo><mn>7<\/mn><mo>+<\/mo><mn>8<\/mn><mo stretchy=\"false\">)<\/mo><mi mathvariant=\"normal\">\/<\/mi><mn>4<\/mn><mo>=<\/mo><mn mathvariant=\"bold\">4.5<\/mn><\/mrow><annotation encoding=\"application\/x-tex\">(0 + 3 + 7 + 8) \/ 4 = \\mathbf{4.5}<\/annotation><\/semantics><\/math>(0+3+7+8)\/4=4.5<\/li>\n\n\n\n<li><strong>Average Turnaround Time<\/strong> <math xmlns=\"http:\/\/www.w3.org\/1998\/Math\/MathML\" display=\"block\"><semantics><mrow><mo stretchy=\"false\">(<\/mo><mn>5<\/mn><mo>+<\/mo><mn>6<\/mn><mo>+<\/mo><mn>10<\/mn><mo>+<\/mo><mn>10<\/mn><mo stretchy=\"false\">)<\/mo><mi mathvariant=\"normal\">\/<\/mi><mn>4<\/mn><mo>=<\/mo><mn mathvariant=\"bold\">7.75<\/mn><\/mrow><annotation encoding=\"application\/x-tex\">(5 + 6 + 10 + 10) \/ 4 = \\mathbf{7.75}<\/annotation><\/semantics><\/math>(5+6+10+10)\/4=7.75<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>&#x2705; <strong>Solved using Priority Scheduling (Non-Preemptive) where 5 is the highest priority.<\/strong><\/p>\n\n\n\n<p>Below is the <strong>Priority Scheduling \u2013 Preemptive<\/strong> solution<br>&#x1f449; <strong>Higher number = higher priority (5 is highest)<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Given Process Table<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Process<\/th><th>Arrival Time (AT)<\/th><th>Burst Time (BT)<\/th><th>Priority<\/th><\/tr><\/thead><tbody><tr><td>P1<\/td><td>0<\/td><td>5<\/td><td>3<\/td><\/tr><tr><td>P2<\/td><td>2<\/td><td>3<\/td><td><strong>5<\/strong><\/td><\/tr><tr><td>P3<\/td><td>3<\/td><td>2<\/td><td>1<\/td><\/tr><tr><td>P4<\/td><td>1<\/td><td>3<\/td><td>2<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Step-by-Step Execution (Preemptive)<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Time 0<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Available: <strong>P1<\/strong><\/li>\n\n\n\n<li>Execute <strong>P1<\/strong><\/li>\n<\/ul>\n\n\n\n<p><strong>P1 runs from 0 \u2192 2<\/strong> (remaining BT = 3)<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Time 2<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>P2 arrives (priority 5 \u2013 highest)<\/strong><br>&#x1f449; Preempts P1<\/li>\n<\/ul>\n\n\n\n<p><strong>P2 runs from 2 \u2192 5<\/strong> (finishes)<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Time 5<\/strong><\/h3>\n\n\n\n<p>Available processes:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>P1 (remaining BT = 3, priority 3)<\/li>\n\n\n\n<li>P3 (BT = 2, priority 1)<\/li>\n\n\n\n<li>P4 (BT = 3, priority 2)<\/li>\n<\/ul>\n\n\n\n<p>&#x1f449; Highest priority = <strong>P1<\/strong><\/p>\n\n\n\n<p><strong>P1 runs from 5 \u2192 8<\/strong> (finishes)<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Time 8<\/strong><\/h3>\n\n\n\n<p>Remaining processes:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>P4 (priority 2)<\/li>\n\n\n\n<li>P3 (priority 1)<\/li>\n<\/ul>\n\n\n\n<p>&#x1f449; Highest priority = <strong>P4<\/strong><\/p>\n\n\n\n<p><strong>P4 runs from 8 \u2192 11<\/strong> (finishes)<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Time 11<\/strong><\/h3>\n\n\n\n<p>Remaining:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>P3<\/strong><\/li>\n<\/ul>\n\n\n\n<p><strong>P3 runs from 11 \u2192 13<\/strong> (finishes)<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Gantt Chart (Preemptive)<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>| P1 | P2 | P1 | P4 | P3 |\n0    2    5    8    11   13\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Completion Time (CT)<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Process<\/th><th>CT<\/th><\/tr><\/thead><tbody><tr><td>P1<\/td><td>8<\/td><\/tr><tr><td>P2<\/td><td>5<\/td><\/tr><tr><td>P4<\/td><td>11<\/td><\/tr><tr><td>P3<\/td><td>13<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Turnaround Time<\/h2>\n\n\n\n<p><strong>TAT = CT \u2212 AT<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Process<\/th><th>TAT<\/th><\/tr><\/thead><tbody><tr><td>P1<\/td><td>8 \u2212 0 = 8<\/td><\/tr><tr><td>P2<\/td><td>5 \u2212 2 = 3<\/td><\/tr><tr><td>P4<\/td><td>11 \u2212 1 = 10<\/td><\/tr><tr><td>P3<\/td><td>13 \u2212 3 = 10<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Waiting Time<\/h2>\n\n\n\n<p><strong>WT = TAT \u2212 BT<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Process<\/th><th>WT<\/th><\/tr><\/thead><tbody><tr><td>P1<\/td><td>8 \u2212 5 = 3<\/td><\/tr><tr><td>P2<\/td><td>3 \u2212 3 = 0<\/td><\/tr><tr><td>P4<\/td><td>10 \u2212 3 = 7<\/td><\/tr><tr><td>P3<\/td><td>10 \u2212 2 = 8<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Average Times<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Average Waiting Time<\/strong><\/li>\n<\/ul>\n\n\n\n<p><math xmlns=\"http:\/\/www.w3.org\/1998\/Math\/MathML\" display=\"block\"><semantics><mrow><mo stretchy=\"false\">(<\/mo><mn>3<\/mn><mo>+<\/mo><mn>0<\/mn><mo>+<\/mo><mn>7<\/mn><mo>+<\/mo><mn>8<\/mn><mo stretchy=\"false\">)<\/mo><mi mathvariant=\"normal\">\/<\/mi><mn>4<\/mn><mo>=<\/mo><mn mathvariant=\"bold\">4.5<\/mn><\/mrow><annotation encoding=\"application\/x-tex\">(3 + 0 + 7 + 8) \/ 4 = \\mathbf{4.5}<\/annotation><\/semantics><\/math>(3+0+7+8)\/4=4.5<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Average Turnaround Time<\/strong><\/li>\n<\/ul>\n\n\n\n<p><math xmlns=\"http:\/\/www.w3.org\/1998\/Math\/MathML\" display=\"block\"><semantics><mrow><mo stretchy=\"false\">(<\/mo><mn>8<\/mn><mo>+<\/mo><mn>3<\/mn><mo>+<\/mo><mn>10<\/mn><mo>+<\/mo><mn>10<\/mn><mo stretchy=\"false\">)<\/mo><mi mathvariant=\"normal\">\/<\/mi><mn>4<\/mn><mo>=<\/mo><mn mathvariant=\"bold\">7.75<\/mn><\/mrow><annotation encoding=\"application\/x-tex\">(8 + 3 + 10 + 10) \/ 4 = \\mathbf{7.75}<\/annotation><\/semantics><\/math>(8+3+10+10)\/4=7.75<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>&#x2705; <strong>This is the correct Priority-Based Preemptive Scheduling solution where 5 is the highest priority.<\/strong><\/p>\n\n\n\n<p>If you want, I can also:<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Given Process Table (Assume: lower priority number = higher priority) Process Arrival Time Burst Time Priority P1 0 5 3 P2 2 3 5 P3 3 2 1 P4 1 3 2 Step-by-Step Scheduling (Non-Preemptive) Time = 0 P1 runs from 0 \u2192 5 Time = 5 Available processes: &#x1f449; Highest priority = P3 P3 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-372","post","type-post","status-publish","format-standard","hentry","category-unix"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/mitalgoswami.in\/index.php?rest_route=\/wp\/v2\/posts\/372","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mitalgoswami.in\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mitalgoswami.in\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mitalgoswami.in\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mitalgoswami.in\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=372"}],"version-history":[{"count":3,"href":"https:\/\/mitalgoswami.in\/index.php?rest_route=\/wp\/v2\/posts\/372\/revisions"}],"predecessor-version":[{"id":375,"href":"https:\/\/mitalgoswami.in\/index.php?rest_route=\/wp\/v2\/posts\/372\/revisions\/375"}],"wp:attachment":[{"href":"https:\/\/mitalgoswami.in\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=372"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mitalgoswami.in\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=372"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mitalgoswami.in\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=372"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}