{"id":9977,"date":"2023-10-25T18:47:59","date_gmt":"2023-10-25T18:47:59","guid":{"rendered":"https:\/\/content.one.lumenlearning.com\/quantitativereasoning\/?post_type=chapter&#038;p=9977"},"modified":"2025-08-29T20:55:52","modified_gmt":"2025-08-29T20:55:52","slug":"operations-and-supply-chain-learn-it-4","status":"web-only","type":"chapter","link":"https:\/\/content.one.lumenlearning.com\/quantitativereasoning\/chapter\/operations-and-supply-chain-learn-it-4\/","title":{"raw":"Operations and Supply Chain: Learn It 4","rendered":"Operations and Supply Chain: Learn It 4"},"content":{"raw":"<h2>Scheduling Cont.<\/h2>\r\n<h3>Adding an algorithm<\/h3>\r\n<p>Up until now, we have been creating schedules by guess-and-check, which works well enough for small schedules, but would not work well with dozens or hundreds of tasks. To create a more procedural approach, we might begin by somehow creating a\u00a0<b>priority list<\/b>. Once we have a priority list, we can begin scheduling using that list and the\u00a0<b>list processing algorithm<\/b>.<\/p>\r\n<section class=\"textbox keyTakeaway\">\r\n<h3>priority list<\/h3>\r\n<p class=\"lt-math-34213\">A <strong>priority list<\/strong> is a list of tasks given in the order in which we desire them to be completed.<\/p>\r\n<p>&nbsp;<\/p>\r\n<p class=\"lt-math-34213\">The <strong>List Processing Algorithm<\/strong> turns a priority list into a schedule.<\/p>\r\n<\/section>\r\n<section class=\"textbox questionHelp\">\r\n<p><strong>How To: List Processing Algorithm<\/strong><\/p>\r\n<ol>\r\n\t<li class=\"lt-math-34213\">On the digraph or priority list, circle all tasks that are ready, meaning that all prerequisite tasks have been completed.<\/li>\r\n\t<li class=\"lt-math-34213\">Assign to each available processor, in order, the first ready task. Mark the task as in progress, perhaps by putting a single line through the task.<\/li>\r\n\t<li class=\"lt-math-34213\">Move forward in time until a task is completed. Mark the task as completed, perhaps by crossing out the task. If any new tasks become ready, mark them as such.<\/li>\r\n\t<li class=\"lt-math-34213\">Repeat until all tasks have been scheduled.<\/li>\r\n<\/ol>\r\n<\/section>\r\n<center>\r\n[caption id=\"\" align=\"aligncenter\" width=\"324\"]<img class=\"internal\" src=\"https:\/\/math.libretexts.org\/@api\/deki\/files\/39315\/sc2.svg?revision=1&amp;size=bestfit&amp;width=437&amp;height=239\" alt=\"A complete digraph for our car conversion depicts nine tasks labeled T1 through T9. Tasks T1, T3, T4, and T5 are starting points with arrows leading out, T6, T7, and T8 are intermediate points, and T9 is an endpoint with arrows only leading into it. Each task has a duration or weight indicated in parentheses, and arrows represent the flow or sequence between these tasks.\" width=\"324\" height=\"178\" \/> Figure 1. The complete digraph for car conversion[\/caption]\r\n<\/center>\r\n<p>&nbsp;<\/p>\r\n<p>Using our complete digraph for the car conversion we found earlier, let's schedule the tasks using the priority list below:<\/p>\r\n<p style=\"text-align: center;\">[latex]\\mathrm{T}_{1}, \\mathrm{T}_{3}, \\mathrm{T}_{4}, \\mathrm{T}_{5}, \\mathrm{T}_{6}, \\mathrm{T}_{7}, \\mathrm{T}_{8}, \\mathrm{T}_{2}, \\mathrm{T}_{9}[\/latex]<\/p>\r\n<p class=\"lt-math-34213\"><b>Time 0<\/b>: Mark ready tasks.<\/p>\r\n<p class=\"lt-math-34213\">Priority list: [latex]({\\mathrm{T}_{1}}), (\\mathrm{T}_{3}), (\\mathrm{T}_{4}), (\\mathrm{T}_{5}), \\mathrm{T}_{6}, \\mathrm{T}_{7}, \\mathrm{T}_{8}, \\mathrm{T}_{2}, \\mathrm{T}_{9}[\/latex]<\/p>\r\n<p class=\"lt-math-34213\">We assign the first task, [latex]\\mathrm{T}_{1}[\/latex] to the first processor, [latex]\\mathrm{P}_{1}[\/latex], and the second ready task, [latex]\\mathrm{T}_{3}[\/latex], to the second processor. Making those assignments, we mark those tasks as in progress:<\/p>\r\n<p class=\"lt-math-34213\">Priority list: [latex]\\cancel{(\\mathrm{T}_{1})}, \\cancel{(\\mathrm{T}_{3})}, (\\mathrm{T}_{4}), (\\mathrm{T}_{5}), \\mathrm{T}_{6}, \\mathrm{T}_{7}, \\mathrm{T}_{8}, \\mathrm{T}_{2}, \\mathrm{T}_{9}[\/latex]<\/p>\r\n<p class=\"lt-math-34213\">Schedule up to here:<\/p>\r\n<center>\r\n[caption id=\"\" align=\"aligncenter\" width=\"584\"]<img class=\"internal\" src=\"https:\/\/math.libretexts.org\/@api\/deki\/files\/39324\/clipboard_e77fb190a3f596755cb0ed99767471a80.png?revision=1\" alt=\"A time-based diagram with two processes, P1 and P2, represented vertically. The time is marked from 0 to 10 on the horizontal axis. P1 has only task T1 (from time 0-2). P2 has task T3 (from time 0-2).\" width=\"584\" height=\"84\" \/> Figure 2. Mark ready tasks in the schedules for the two processors[\/caption]\r\n<\/center>\r\n<p>&nbsp;<\/p>\r\n<p class=\"lt-math-34213\">We jump to the time when the next task completes, which is at time [latex]2[\/latex].<\/p>\r\n<p class=\"lt-math-34213\"><b>Time 2<\/b>: Both processors complete their tasks. We mark those tasks as complete. With Task [latex]1[\/latex] complete, Task [latex]2[\/latex] becomes ready:<\/p>\r\n<p class=\"lt-math-34213\">Priority list: [latex]\\xcancel{(\\mathrm{T}_{1})}, \\xcancel{(\\mathrm{T}_{3})}, (\\mathrm{T}_{4}), (\\mathrm{T}_{5}), \\mathrm{T}_{6}, \\mathrm{T}_{7}, \\mathrm{T}_{8}, (\\mathrm{T}_{2}), \\mathrm{T}_{9}[\/latex]<\/p>\r\n<p class=\"lt-math-34213\">We assign the next ready task on the list, [latex]\\mathrm{T}_{4}[\/latex] to [latex]\\mathrm{P}_{1}[\/latex], and [latex]\\mathrm{T}_{5}[\/latex] to [latex]\\mathrm{P}_{2}[\/latex].<\/p>\r\n<p class=\"lt-math-34213\">Priority list: [latex]\\xcancel{(\\mathrm{T}_{1})}, \\xcancel{(\\mathrm{T}_{3})}, \\cancel{(\\mathrm{T}_{4})}, \\cancel{(\\mathrm{T}_{5})}, \\mathrm{T}_{6}, \\mathrm{T}_{7}, \\mathrm{T}_{8}, (\\mathrm{T}_{2}), \\mathrm{T}_{9}[\/latex]<\/p>\r\n<center>\r\n[caption id=\"\" align=\"aligncenter\" width=\"591\"]<img class=\"internal\" src=\"https:\/\/math.libretexts.org\/@api\/deki\/files\/39325\/clipboard_ed931c39742cb3d6bfcc67592f093b557.png?revision=1\" alt=\"Timeline chart from 0 to 10 showing task executions for processes P1 and P2. P1 executes tasks T1 from 0-2, T4 from 2-3, and T2 from 3-5. P2 executes task T3 from 0-2 and T5 from 2-4.\" width=\"591\" height=\"87\" \/> Figure 3. Put in new tasks into the schedules of the two processors[\/caption]\r\n<\/center>\r\n<p>&nbsp;<\/p>\r\n<p class=\"lt-math-34213\"><b>Time 3<\/b>: Processor 1 has completed [latex]\\mathrm{T}_{4}[\/latex]. Completing [latex]\\mathrm{T}_{4}[\/latex] does not make any other tasks ready (note that all the rest require that [latex]\\mathrm{T}_{2}[\/latex]\u00a0be completed first).<\/p>\r\n<p class=\"lt-math-34213\">Priority list: [latex]\\xcancel{(\\mathrm{T}_{1})}, \\xcancel{(\\mathrm{T}_{3})}, \\xcancel{(\\mathrm{T}_{4})}, \\cancel{(\\mathrm{T}_{5})}, \\mathrm{T}_{6}, \\mathrm{T}_{7}, \\mathrm{T}_{8}, (\\mathrm{T}_{2}), \\mathrm{T}_{9}[\/latex]<\/p>\r\n<p class=\"lt-math-34213\">Since the next three tasks are not yet ready, we assign the next ready task, [latex]\\mathrm{T}_{2}[\/latex] to [latex]\\mathrm{P}_{1}[\/latex].<\/p>\r\n<p class=\"lt-math-34213\">Priority list: [latex]\\xcancel{(\\mathrm{T}_{1})}, \\xcancel{(\\mathrm{T}_{3})}, \\xcancel{(\\mathrm{T}_{4})}, \\xcancel{(\\mathrm{T}_{5})}, \\mathrm{T}_{6}, \\mathrm{T}_{7}, \\mathrm{T}_{8}, \\cancel{(\\mathrm{T}_{2})}, \\mathrm{T}_{9}[\/latex]<\/p>\r\n<center>\r\n[caption id=\"\" align=\"aligncenter\" width=\"582\"]<img class=\"internal\" src=\"https:\/\/math.libretexts.org\/@api\/deki\/files\/39326\/clipboard_e5f8d7915ae037b71ff7e5fa3c51f66de.png?revision=1\" alt=\"Timeline chart from 0 to 10 with task executions for processes P1 and P2. P1 executes tasks T1 at time 0-2, T4 at 2-3, T2 at 3-3.5. P2 runs task T3 at time 0-22 and T5 at 2-4.\" width=\"582\" height=\"93\" \/> Figure 4. Assign the next ready task, since the three tasks are not yet ready[\/caption]\r\n<\/center>\r\n<p>&nbsp;<\/p>\r\n<p class=\"lt-math-34213\"><b>Time 3.5<\/b>: Processor [latex]1[\/latex] has completed [latex]\\mathrm{T}_{2}[\/latex]. Completing [latex]\\mathrm{T}_{2}[\/latex] causes [latex]\\mathrm{T}_{6}[\/latex] and [latex]\\mathrm{T}_{7}[\/latex] to become ready. We assign [latex]\\mathrm{T}_{6}[\/latex] to [latex]\\mathrm{P}_{1}[\/latex].<\/p>\r\n<p class=\"lt-math-34213\">Priority list: [latex]\\xcancel{(\\mathrm{T}_{1})}, \\xcancel{(\\mathrm{T}_{3})}, \\xcancel{(\\mathrm{T}_{4})}, \\xcancel{(\\mathrm{T}_{5})}, \\cancel{(\\mathrm{T}_{6})}, (\\mathrm{T}_{7}), \\mathrm{T}_{8}, \\xcancel{(\\mathrm{T}_{2})}, \\mathrm{T}_{9}[\/latex]<\/p>\r\n<center>\r\n[caption id=\"\" align=\"aligncenter\" width=\"577\"]<img class=\"internal\" src=\"https:\/\/math.libretexts.org\/@api\/deki\/files\/39327\/clipboard_e5d65817f8fa5dc929322c44dbfb1f85a.png?revision=1\" alt=\"Timeline chart from 0 to 10 with task executions for processes P1 and P2. P1 executes tasks T1 at time 0-2, T4 at 2-3, T2 at 3-3.5, T6 at 3.5-4. P2 runs task T3 at time 0-2, T5 at 2-4\" width=\"577\" height=\"92\" \/> Figure 5. Assign the next task in the first processor schedule[\/caption]\r\n<\/center>\r\n<p>&nbsp;<\/p>\r\n<p class=\"lt-math-34213\"><b>Time 4<\/b>: Both processors complete their tasks. The completion of [latex]\\mathrm{T}_{5}[\/latex] allows [latex]\\mathrm{T}_{8}[\/latex] to become ready. We assign [latex]\\mathrm{T}_{7}[\/latex] to [latex]\\mathrm{P}_{1}[\/latex] and [latex]\\mathrm{T}_{8}[\/latex]\u00a0to [latex]\\mathrm{P}_{2}[\/latex].<\/p>\r\n<p class=\"lt-math-34213\">Priority list: [latex]\\xcancel{(\\mathrm{T}_{1})}, \\xcancel{(\\mathrm{T}_{3})}, \\xcancel{(\\mathrm{T}_{4})}, \\xcancel{(\\mathrm{T}_{5})}, \\xcancel{(\\mathrm{T}_{6})}, \\cancel{(\\mathrm{T}_{7})}, \\cancel{(\\mathrm{T}_{8})}, \\xcancel{(\\mathrm{T}_{2})}, \\mathrm{T}_{9}[\/latex]<\/p>\r\n<center>\r\n[caption id=\"\" align=\"aligncenter\" width=\"580\"]<img class=\"internal\" src=\"https:\/\/math.libretexts.org\/@api\/deki\/files\/39328\/clipboard_e00d40539291882f1466b3b9ba4fc17fc.png?revision=1\" alt=\"Timeline chart from 0 to 10 with task executions for processes P1 and P2. P1 executes tasks T1 at time 0-2, T4 at 2-3, T2 at 3-3.5, T6 at 3.5-4, and T7 at 4-4.5. P2 runs task T3 at time 0-2, T5 at 2-4, and T8 at 4-4.5..\" width=\"580\" height=\"98\" \/> Figure 6. After both processors complete their tasks, add new tasks in the schedules[\/caption]\r\n<\/center>\r\n<p>&nbsp;<\/p>\r\n<p class=\"lt-math-34213\"><b>Time 4.5<\/b>: Both processors complete their tasks. [latex]\\mathrm{T}_{9}[\/latex] becomes ready, and is assigned to [latex]\\mathrm{P}_{1}[\/latex]. There is no ready task for [latex]\\mathrm{P}_{2}[\/latex] to work on, so [latex]\\mathrm{P}_{2}[\/latex]\u00a0idles.<\/p>\r\n<p class=\"lt-math-34213\">Priority list: [latex]\\xcancel{(\\mathrm{T}_{1})}, \\xcancel{(\\mathrm{T}_{3})}, \\xcancel{(\\mathrm{T}_{4})}, \\xcancel{(\\mathrm{T}_{5})}, \\xcancel{(\\mathrm{T}_{6})}, \\xcancel{(\\mathrm{T}_{7})}, \\xcancel{(\\mathrm{T}_{8})}, \\xcancel{(\\mathrm{T}_{2})}, \\cancel{(\\mathrm{T}_{9})}[\/latex]<\/p>\r\n<center>\r\n[caption id=\"\" align=\"aligncenter\" width=\"583\"]<img class=\"internal\" src=\"https:\/\/math.libretexts.org\/@api\/deki\/files\/39330\/clipboard_e7bc0f4b15e2eb217727706f983d188af.png?revision=1\" alt=\"Timeline chart from 0 to 10 with task executions for processes P1 and P2. P1 executes tasks T1 at time 0-2, T4 at 2-3, T2 at 3-3.5, T6 at 3.5-4, T7 at 4-4.5, and T9 at 4-5. P2 runs task T3 at time 0-2, T5 at 2-4, and T8 at 4-4.5..\" width=\"583\" height=\"93\" \/> Figure 7. After both processors complete their tasks again, add in new tasks[\/caption]\r\n<\/center>\r\n<p>&nbsp;<\/p>\r\n<p class=\"lt-math-34213\">With the last task completed, we have a completed schedule, with finishing time [latex]5.5[\/latex] days.<\/p>\r\n<section class=\"textbox example\">\r\n<p class=\"lt-math-34213\">Using the digraph below, create a schedule using the priority list with two processors:<\/p>\r\n<p class=\"lt-math-34213\">[latex]\\mathrm{T}_{1}, \\mathrm{T}_{2}, \\mathrm{T}_{3}, \\mathrm{T}_{4}, \\mathrm{T}_{5}, \\mathrm{T}_{6}, \\mathrm{T}_{7}, \\mathrm{T}_{8}, \\mathrm{T}_{9}[\/latex]<\/p>\r\n<center><img class=\"internal alignnone\" src=\"https:\/\/math.libretexts.org\/@api\/deki\/files\/39321\/sc3.svg?revision=1&amp;size=bestfit&amp;width=366&amp;height=180\" alt=\"Diagram showing nine tasks with their durations. T1(10) starts from a circle and points to T2(7). T2(7) then points to T3(4) and T6(4). T4(9) points to T5(5) and T8(4). T5(5) points to T6(4) and T3(4). T8(4) points to T9(6). T7(13)  points to T5(5) and T8(4).\" width=\"271\" height=\"134\" \/><\/center>[reveal-answer q=\"4331\"]Show Solution[\/reveal-answer] [hidden-answer a=\"4331\"]\r\n\r\n<p class=\"lt-math-34213\">Time [latex]0[\/latex]: Tasks [latex]1, 4,[\/latex] and [latex]7[\/latex] are ready. Assign Tasks [latex]1[\/latex] and [latex]4[\/latex].<\/p>\r\n<p class=\"lt-math-34213\">Time [latex]9[\/latex]: Task [latex]4[\/latex] completes. Only task [latex]7[\/latex] is ready; assign task [latex]7[\/latex].<\/p>\r\n<p class=\"lt-math-34213\">Time [latex]10[\/latex]: Task [latex]1[\/latex] completes. Task [latex]2[\/latex] now ready. Assign task [latex]2[\/latex].<\/p>\r\n<p class=\"lt-math-34213\">Time [latex]17[\/latex]: Task [latex]2[\/latex] completes. Nothing is ready. Processor [latex]1[\/latex] idles.<\/p>\r\n<p class=\"lt-math-34213\">Time [latex]22[\/latex]: Task [latex]7[\/latex] completes. Tasks [latex]5[\/latex] and [latex]8[\/latex] are ready. Assign tasks [latex]5[\/latex] and [latex]8[\/latex].<\/p>\r\n<p class=\"lt-math-34213\">Time [latex]26[\/latex]: Task [latex]8[\/latex] completes. Task [latex]9[\/latex] is ready. Assign task [latex]9[\/latex].<\/p>\r\n<p class=\"lt-math-34213\">Time [latex]27[\/latex]: Task [latex]5[\/latex] completes. Tasks [latex]3[\/latex] and [latex]6[\/latex] are ready. Assign task [latex]3[\/latex].<\/p>\r\n<p class=\"lt-math-34213\">Time [latex]31[\/latex]: Task [latex]3[\/latex] completes. Assign task [latex]6[\/latex].<\/p>\r\n<p class=\"lt-math-34213\">Time [latex]35[\/latex]: Everything is done. Finishing time is [latex]35[\/latex] for this schedule.<\/p>\r\n<center><img class=\"internal alignnone\" src=\"https:\/\/math.libretexts.org\/@api\/deki\/files\/39329\/clipboard_eeee2de77e15748630b6197c99fed34fc.png?revision=1\" alt=\"Timeline chart with two parallel rows, P1 and P2. P1 row has tasks T1 in pink from 0-10, T2 in red from 10-17, T5 in beige from 17-27, T6 in green from 27-31, and T9 in yellow from 31-35. P2 row has T4 in turquoise from 0-6, T7 in purple from 6-22, T8 in violet from 22-26, and T10 in pink from 26-32. The timeline is marked at intervals 6, 9, 10, 17, 22, 26, 27, 31, 32, and 35.\" width=\"713\" height=\"123\" \/><\/center>[\/hidden-answer]<\/section>\r\n<p>There are other algorithms that can be used to create the priority list including, the decreasing time algorithm, the critical path algorithm, and the backflow algorithm. We will explore these algorithms in the Apply It section.\u00a0<\/p>","rendered":"<h2>Scheduling Cont.<\/h2>\n<h3>Adding an algorithm<\/h3>\n<p>Up until now, we have been creating schedules by guess-and-check, which works well enough for small schedules, but would not work well with dozens or hundreds of tasks. To create a more procedural approach, we might begin by somehow creating a\u00a0<b>priority list<\/b>. Once we have a priority list, we can begin scheduling using that list and the\u00a0<b>list processing algorithm<\/b>.<\/p>\n<section class=\"textbox keyTakeaway\">\n<h3>priority list<\/h3>\n<p class=\"lt-math-34213\">A <strong>priority list<\/strong> is a list of tasks given in the order in which we desire them to be completed.<\/p>\n<p>&nbsp;<\/p>\n<p class=\"lt-math-34213\">The <strong>List Processing Algorithm<\/strong> turns a priority list into a schedule.<\/p>\n<\/section>\n<section class=\"textbox questionHelp\">\n<p><strong>How To: List Processing Algorithm<\/strong><\/p>\n<ol>\n<li class=\"lt-math-34213\">On the digraph or priority list, circle all tasks that are ready, meaning that all prerequisite tasks have been completed.<\/li>\n<li class=\"lt-math-34213\">Assign to each available processor, in order, the first ready task. Mark the task as in progress, perhaps by putting a single line through the task.<\/li>\n<li class=\"lt-math-34213\">Move forward in time until a task is completed. Mark the task as completed, perhaps by crossing out the task. If any new tasks become ready, mark them as such.<\/li>\n<li class=\"lt-math-34213\">Repeat until all tasks have been scheduled.<\/li>\n<\/ol>\n<\/section>\n<div style=\"text-align: center;\">\n<figure style=\"width: 324px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"internal\" src=\"https:\/\/math.libretexts.org\/@api\/deki\/files\/39315\/sc2.svg?revision=1&amp;size=bestfit&amp;width=437&amp;height=239\" alt=\"A complete digraph for our car conversion depicts nine tasks labeled T1 through T9. Tasks T1, T3, T4, and T5 are starting points with arrows leading out, T6, T7, and T8 are intermediate points, and T9 is an endpoint with arrows only leading into it. Each task has a duration or weight indicated in parentheses, and arrows represent the flow or sequence between these tasks.\" width=\"324\" height=\"178\" \/><figcaption class=\"wp-caption-text\">Figure 1. The complete digraph for car conversion<\/figcaption><\/figure>\n<\/div>\n<p>&nbsp;<\/p>\n<p>Using our complete digraph for the car conversion we found earlier, let&#8217;s schedule the tasks using the priority list below:<\/p>\n<p style=\"text-align: center;\">[latex]\\mathrm{T}_{1}, \\mathrm{T}_{3}, \\mathrm{T}_{4}, \\mathrm{T}_{5}, \\mathrm{T}_{6}, \\mathrm{T}_{7}, \\mathrm{T}_{8}, \\mathrm{T}_{2}, \\mathrm{T}_{9}[\/latex]<\/p>\n<p class=\"lt-math-34213\"><b>Time 0<\/b>: Mark ready tasks.<\/p>\n<p class=\"lt-math-34213\">Priority list: [latex]({\\mathrm{T}_{1}}), (\\mathrm{T}_{3}), (\\mathrm{T}_{4}), (\\mathrm{T}_{5}), \\mathrm{T}_{6}, \\mathrm{T}_{7}, \\mathrm{T}_{8}, \\mathrm{T}_{2}, \\mathrm{T}_{9}[\/latex]<\/p>\n<p class=\"lt-math-34213\">We assign the first task, [latex]\\mathrm{T}_{1}[\/latex] to the first processor, [latex]\\mathrm{P}_{1}[\/latex], and the second ready task, [latex]\\mathrm{T}_{3}[\/latex], to the second processor. Making those assignments, we mark those tasks as in progress:<\/p>\n<p class=\"lt-math-34213\">Priority list: [latex]\\cancel{(\\mathrm{T}_{1})}, \\cancel{(\\mathrm{T}_{3})}, (\\mathrm{T}_{4}), (\\mathrm{T}_{5}), \\mathrm{T}_{6}, \\mathrm{T}_{7}, \\mathrm{T}_{8}, \\mathrm{T}_{2}, \\mathrm{T}_{9}[\/latex]<\/p>\n<p class=\"lt-math-34213\">Schedule up to here:<\/p>\n<div style=\"text-align: center;\">\n<figure style=\"width: 584px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"internal\" src=\"https:\/\/math.libretexts.org\/@api\/deki\/files\/39324\/clipboard_e77fb190a3f596755cb0ed99767471a80.png?revision=1\" alt=\"A time-based diagram with two processes, P1 and P2, represented vertically. The time is marked from 0 to 10 on the horizontal axis. P1 has only task T1 (from time 0-2). P2 has task T3 (from time 0-2).\" width=\"584\" height=\"84\" \/><figcaption class=\"wp-caption-text\">Figure 2. Mark ready tasks in the schedules for the two processors<\/figcaption><\/figure>\n<\/div>\n<p>&nbsp;<\/p>\n<p class=\"lt-math-34213\">We jump to the time when the next task completes, which is at time [latex]2[\/latex].<\/p>\n<p class=\"lt-math-34213\"><b>Time 2<\/b>: Both processors complete their tasks. We mark those tasks as complete. With Task [latex]1[\/latex] complete, Task [latex]2[\/latex] becomes ready:<\/p>\n<p class=\"lt-math-34213\">Priority list: [latex]\\xcancel{(\\mathrm{T}_{1})}, \\xcancel{(\\mathrm{T}_{3})}, (\\mathrm{T}_{4}), (\\mathrm{T}_{5}), \\mathrm{T}_{6}, \\mathrm{T}_{7}, \\mathrm{T}_{8}, (\\mathrm{T}_{2}), \\mathrm{T}_{9}[\/latex]<\/p>\n<p class=\"lt-math-34213\">We assign the next ready task on the list, [latex]\\mathrm{T}_{4}[\/latex] to [latex]\\mathrm{P}_{1}[\/latex], and [latex]\\mathrm{T}_{5}[\/latex] to [latex]\\mathrm{P}_{2}[\/latex].<\/p>\n<p class=\"lt-math-34213\">Priority list: [latex]\\xcancel{(\\mathrm{T}_{1})}, \\xcancel{(\\mathrm{T}_{3})}, \\cancel{(\\mathrm{T}_{4})}, \\cancel{(\\mathrm{T}_{5})}, \\mathrm{T}_{6}, \\mathrm{T}_{7}, \\mathrm{T}_{8}, (\\mathrm{T}_{2}), \\mathrm{T}_{9}[\/latex]<\/p>\n<div style=\"text-align: center;\">\n<figure style=\"width: 591px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"internal\" src=\"https:\/\/math.libretexts.org\/@api\/deki\/files\/39325\/clipboard_ed931c39742cb3d6bfcc67592f093b557.png?revision=1\" alt=\"Timeline chart from 0 to 10 showing task executions for processes P1 and P2. P1 executes tasks T1 from 0-2, T4 from 2-3, and T2 from 3-5. P2 executes task T3 from 0-2 and T5 from 2-4.\" width=\"591\" height=\"87\" \/><figcaption class=\"wp-caption-text\">Figure 3. Put in new tasks into the schedules of the two processors<\/figcaption><\/figure>\n<\/div>\n<p>&nbsp;<\/p>\n<p class=\"lt-math-34213\"><b>Time 3<\/b>: Processor 1 has completed [latex]\\mathrm{T}_{4}[\/latex]. Completing [latex]\\mathrm{T}_{4}[\/latex] does not make any other tasks ready (note that all the rest require that [latex]\\mathrm{T}_{2}[\/latex]\u00a0be completed first).<\/p>\n<p class=\"lt-math-34213\">Priority list: [latex]\\xcancel{(\\mathrm{T}_{1})}, \\xcancel{(\\mathrm{T}_{3})}, \\xcancel{(\\mathrm{T}_{4})}, \\cancel{(\\mathrm{T}_{5})}, \\mathrm{T}_{6}, \\mathrm{T}_{7}, \\mathrm{T}_{8}, (\\mathrm{T}_{2}), \\mathrm{T}_{9}[\/latex]<\/p>\n<p class=\"lt-math-34213\">Since the next three tasks are not yet ready, we assign the next ready task, [latex]\\mathrm{T}_{2}[\/latex] to [latex]\\mathrm{P}_{1}[\/latex].<\/p>\n<p class=\"lt-math-34213\">Priority list: [latex]\\xcancel{(\\mathrm{T}_{1})}, \\xcancel{(\\mathrm{T}_{3})}, \\xcancel{(\\mathrm{T}_{4})}, \\xcancel{(\\mathrm{T}_{5})}, \\mathrm{T}_{6}, \\mathrm{T}_{7}, \\mathrm{T}_{8}, \\cancel{(\\mathrm{T}_{2})}, \\mathrm{T}_{9}[\/latex]<\/p>\n<div style=\"text-align: center;\">\n<figure style=\"width: 582px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"internal\" src=\"https:\/\/math.libretexts.org\/@api\/deki\/files\/39326\/clipboard_e5f8d7915ae037b71ff7e5fa3c51f66de.png?revision=1\" alt=\"Timeline chart from 0 to 10 with task executions for processes P1 and P2. P1 executes tasks T1 at time 0-2, T4 at 2-3, T2 at 3-3.5. P2 runs task T3 at time 0-22 and T5 at 2-4.\" width=\"582\" height=\"93\" \/><figcaption class=\"wp-caption-text\">Figure 4. Assign the next ready task, since the three tasks are not yet ready<\/figcaption><\/figure>\n<\/div>\n<p>&nbsp;<\/p>\n<p class=\"lt-math-34213\"><b>Time 3.5<\/b>: Processor [latex]1[\/latex] has completed [latex]\\mathrm{T}_{2}[\/latex]. Completing [latex]\\mathrm{T}_{2}[\/latex] causes [latex]\\mathrm{T}_{6}[\/latex] and [latex]\\mathrm{T}_{7}[\/latex] to become ready. We assign [latex]\\mathrm{T}_{6}[\/latex] to [latex]\\mathrm{P}_{1}[\/latex].<\/p>\n<p class=\"lt-math-34213\">Priority list: [latex]\\xcancel{(\\mathrm{T}_{1})}, \\xcancel{(\\mathrm{T}_{3})}, \\xcancel{(\\mathrm{T}_{4})}, \\xcancel{(\\mathrm{T}_{5})}, \\cancel{(\\mathrm{T}_{6})}, (\\mathrm{T}_{7}), \\mathrm{T}_{8}, \\xcancel{(\\mathrm{T}_{2})}, \\mathrm{T}_{9}[\/latex]<\/p>\n<div style=\"text-align: center;\">\n<figure style=\"width: 577px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"internal\" src=\"https:\/\/math.libretexts.org\/@api\/deki\/files\/39327\/clipboard_e5d65817f8fa5dc929322c44dbfb1f85a.png?revision=1\" alt=\"Timeline chart from 0 to 10 with task executions for processes P1 and P2. P1 executes tasks T1 at time 0-2, T4 at 2-3, T2 at 3-3.5, T6 at 3.5-4. P2 runs task T3 at time 0-2, T5 at 2-4\" width=\"577\" height=\"92\" \/><figcaption class=\"wp-caption-text\">Figure 5. Assign the next task in the first processor schedule<\/figcaption><\/figure>\n<\/div>\n<p>&nbsp;<\/p>\n<p class=\"lt-math-34213\"><b>Time 4<\/b>: Both processors complete their tasks. The completion of [latex]\\mathrm{T}_{5}[\/latex] allows [latex]\\mathrm{T}_{8}[\/latex] to become ready. We assign [latex]\\mathrm{T}_{7}[\/latex] to [latex]\\mathrm{P}_{1}[\/latex] and [latex]\\mathrm{T}_{8}[\/latex]\u00a0to [latex]\\mathrm{P}_{2}[\/latex].<\/p>\n<p class=\"lt-math-34213\">Priority list: [latex]\\xcancel{(\\mathrm{T}_{1})}, \\xcancel{(\\mathrm{T}_{3})}, \\xcancel{(\\mathrm{T}_{4})}, \\xcancel{(\\mathrm{T}_{5})}, \\xcancel{(\\mathrm{T}_{6})}, \\cancel{(\\mathrm{T}_{7})}, \\cancel{(\\mathrm{T}_{8})}, \\xcancel{(\\mathrm{T}_{2})}, \\mathrm{T}_{9}[\/latex]<\/p>\n<div style=\"text-align: center;\">\n<figure style=\"width: 580px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"internal\" src=\"https:\/\/math.libretexts.org\/@api\/deki\/files\/39328\/clipboard_e00d40539291882f1466b3b9ba4fc17fc.png?revision=1\" alt=\"Timeline chart from 0 to 10 with task executions for processes P1 and P2. P1 executes tasks T1 at time 0-2, T4 at 2-3, T2 at 3-3.5, T6 at 3.5-4, and T7 at 4-4.5. P2 runs task T3 at time 0-2, T5 at 2-4, and T8 at 4-4.5..\" width=\"580\" height=\"98\" \/><figcaption class=\"wp-caption-text\">Figure 6. After both processors complete their tasks, add new tasks in the schedules<\/figcaption><\/figure>\n<\/div>\n<p>&nbsp;<\/p>\n<p class=\"lt-math-34213\"><b>Time 4.5<\/b>: Both processors complete their tasks. [latex]\\mathrm{T}_{9}[\/latex] becomes ready, and is assigned to [latex]\\mathrm{P}_{1}[\/latex]. There is no ready task for [latex]\\mathrm{P}_{2}[\/latex] to work on, so [latex]\\mathrm{P}_{2}[\/latex]\u00a0idles.<\/p>\n<p class=\"lt-math-34213\">Priority list: [latex]\\xcancel{(\\mathrm{T}_{1})}, \\xcancel{(\\mathrm{T}_{3})}, \\xcancel{(\\mathrm{T}_{4})}, \\xcancel{(\\mathrm{T}_{5})}, \\xcancel{(\\mathrm{T}_{6})}, \\xcancel{(\\mathrm{T}_{7})}, \\xcancel{(\\mathrm{T}_{8})}, \\xcancel{(\\mathrm{T}_{2})}, \\cancel{(\\mathrm{T}_{9})}[\/latex]<\/p>\n<div style=\"text-align: center;\">\n<figure style=\"width: 583px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"internal\" src=\"https:\/\/math.libretexts.org\/@api\/deki\/files\/39330\/clipboard_e7bc0f4b15e2eb217727706f983d188af.png?revision=1\" alt=\"Timeline chart from 0 to 10 with task executions for processes P1 and P2. P1 executes tasks T1 at time 0-2, T4 at 2-3, T2 at 3-3.5, T6 at 3.5-4, T7 at 4-4.5, and T9 at 4-5. P2 runs task T3 at time 0-2, T5 at 2-4, and T8 at 4-4.5..\" width=\"583\" height=\"93\" \/><figcaption class=\"wp-caption-text\">Figure 7. After both processors complete their tasks again, add in new tasks<\/figcaption><\/figure>\n<\/div>\n<p>&nbsp;<\/p>\n<p class=\"lt-math-34213\">With the last task completed, we have a completed schedule, with finishing time [latex]5.5[\/latex] days.<\/p>\n<section class=\"textbox example\">\n<p class=\"lt-math-34213\">Using the digraph below, create a schedule using the priority list with two processors:<\/p>\n<p class=\"lt-math-34213\">[latex]\\mathrm{T}_{1}, \\mathrm{T}_{2}, \\mathrm{T}_{3}, \\mathrm{T}_{4}, \\mathrm{T}_{5}, \\mathrm{T}_{6}, \\mathrm{T}_{7}, \\mathrm{T}_{8}, \\mathrm{T}_{9}[\/latex]<\/p>\n<div style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" class=\"internal alignnone\" src=\"https:\/\/math.libretexts.org\/@api\/deki\/files\/39321\/sc3.svg?revision=1&amp;size=bestfit&amp;width=366&amp;height=180\" alt=\"Diagram showing nine tasks with their durations. T1(10) starts from a circle and points to T2(7). T2(7) then points to T3(4) and T6(4). T4(9) points to T5(5) and T8(4). T5(5) points to T6(4) and T3(4). T8(4) points to T9(6). T7(13)  points to T5(5) and T8(4).\" width=\"271\" height=\"134\" \/><\/div>\n<div class=\"qa-wrapper\" style=\"display: block\"><button class=\"show-answer show-answer-button collapsed\" data-target=\"q4331\">Show Solution<\/button> <\/p>\n<div id=\"q4331\" class=\"hidden-answer\" style=\"display: none\">\n<p class=\"lt-math-34213\">Time [latex]0[\/latex]: Tasks [latex]1, 4,[\/latex] and [latex]7[\/latex] are ready. Assign Tasks [latex]1[\/latex] and [latex]4[\/latex].<\/p>\n<p class=\"lt-math-34213\">Time [latex]9[\/latex]: Task [latex]4[\/latex] completes. Only task [latex]7[\/latex] is ready; assign task [latex]7[\/latex].<\/p>\n<p class=\"lt-math-34213\">Time [latex]10[\/latex]: Task [latex]1[\/latex] completes. Task [latex]2[\/latex] now ready. Assign task [latex]2[\/latex].<\/p>\n<p class=\"lt-math-34213\">Time [latex]17[\/latex]: Task [latex]2[\/latex] completes. Nothing is ready. Processor [latex]1[\/latex] idles.<\/p>\n<p class=\"lt-math-34213\">Time [latex]22[\/latex]: Task [latex]7[\/latex] completes. Tasks [latex]5[\/latex] and [latex]8[\/latex] are ready. Assign tasks [latex]5[\/latex] and [latex]8[\/latex].<\/p>\n<p class=\"lt-math-34213\">Time [latex]26[\/latex]: Task [latex]8[\/latex] completes. Task [latex]9[\/latex] is ready. Assign task [latex]9[\/latex].<\/p>\n<p class=\"lt-math-34213\">Time [latex]27[\/latex]: Task [latex]5[\/latex] completes. Tasks [latex]3[\/latex] and [latex]6[\/latex] are ready. Assign task [latex]3[\/latex].<\/p>\n<p class=\"lt-math-34213\">Time [latex]31[\/latex]: Task [latex]3[\/latex] completes. Assign task [latex]6[\/latex].<\/p>\n<p class=\"lt-math-34213\">Time [latex]35[\/latex]: Everything is done. Finishing time is [latex]35[\/latex] for this schedule.<\/p>\n<div style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" class=\"internal alignnone\" src=\"https:\/\/math.libretexts.org\/@api\/deki\/files\/39329\/clipboard_eeee2de77e15748630b6197c99fed34fc.png?revision=1\" alt=\"Timeline chart with two parallel rows, P1 and P2. P1 row has tasks T1 in pink from 0-10, T2 in red from 10-17, T5 in beige from 17-27, T6 in green from 27-31, and T9 in yellow from 31-35. P2 row has T4 in turquoise from 0-6, T7 in purple from 6-22, T8 in violet from 22-26, and T10 in pink from 26-32. The timeline is marked at intervals 6, 9, 10, 17, 22, 26, 27, 31, 32, and 35.\" width=\"713\" height=\"123\" \/><\/div>\n<\/div>\n<\/div>\n<\/section>\n<p>There are other algorithms that can be used to create the priority list including, the decreasing time algorithm, the critical path algorithm, and the backflow algorithm. We will explore these algorithms in the Apply It section.\u00a0<\/p>\n","protected":false},"author":15,"menu_order":26,"template":"","meta":{"_candela_citation":"[]","pb_show_title":"on","pb_short_title":"","pb_subtitle":"","pb_authors":[],"pb_section_license":""},"chapter-type":[],"contributor":[],"license":[],"part":92,"module-header":"learn_it","content_attributions":[],"internal_book_links":[],"video_content":null,"cc_video_embed_content":{"cc_scripts":"","media_targets":[]},"try_it_collection":null,"_links":{"self":[{"href":"https:\/\/content.one.lumenlearning.com\/quantitativereasoning\/wp-json\/pressbooks\/v2\/chapters\/9977"}],"collection":[{"href":"https:\/\/content.one.lumenlearning.com\/quantitativereasoning\/wp-json\/pressbooks\/v2\/chapters"}],"about":[{"href":"https:\/\/content.one.lumenlearning.com\/quantitativereasoning\/wp-json\/wp\/v2\/types\/chapter"}],"author":[{"embeddable":true,"href":"https:\/\/content.one.lumenlearning.com\/quantitativereasoning\/wp-json\/wp\/v2\/users\/15"}],"version-history":[{"count":8,"href":"https:\/\/content.one.lumenlearning.com\/quantitativereasoning\/wp-json\/pressbooks\/v2\/chapters\/9977\/revisions"}],"predecessor-version":[{"id":15956,"href":"https:\/\/content.one.lumenlearning.com\/quantitativereasoning\/wp-json\/pressbooks\/v2\/chapters\/9977\/revisions\/15956"}],"part":[{"href":"https:\/\/content.one.lumenlearning.com\/quantitativereasoning\/wp-json\/pressbooks\/v2\/parts\/92"}],"metadata":[{"href":"https:\/\/content.one.lumenlearning.com\/quantitativereasoning\/wp-json\/pressbooks\/v2\/chapters\/9977\/metadata\/"}],"wp:attachment":[{"href":"https:\/\/content.one.lumenlearning.com\/quantitativereasoning\/wp-json\/wp\/v2\/media?parent=9977"}],"wp:term":[{"taxonomy":"chapter-type","embeddable":true,"href":"https:\/\/content.one.lumenlearning.com\/quantitativereasoning\/wp-json\/pressbooks\/v2\/chapter-type?post=9977"},{"taxonomy":"contributor","embeddable":true,"href":"https:\/\/content.one.lumenlearning.com\/quantitativereasoning\/wp-json\/wp\/v2\/contributor?post=9977"},{"taxonomy":"license","embeddable":true,"href":"https:\/\/content.one.lumenlearning.com\/quantitativereasoning\/wp-json\/wp\/v2\/license?post=9977"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}