Question: CPU Scheduling - Operating System Synchronization/C Programming Answer the question in the red box at the bottom, please follow all directions! C programming: Real-Time CPU
CPU Scheduling - Operating System Synchronization/C Programming
Answer the question in the red box at the bottom, please follow all directions!

C programming: Real-Time CPU Scheduling Question is at the bottom! Supplemental Material to help you: Page 1 Page 2 Earliest-Deadline-First Scheduling To illustrate EDF scheduling, we again schedule the processes shown in Earliest-deadline-first (EDF) scheduling dynamically assigns priorities accord Figure 6.18, which failed to meet deadline requirements under rate-monotonic ing to deadline. The earlier the deadline, the higher the priority; the later the scheduling. Recall that Pi has values of p 50 and 25 and that P2 has deadline, the lower the priority. Under the EDF policy, when a process becomes values of p2 80 and t2 35 The EDF scheduling of these processes is shown runnable, it must announce its deadline requirements to the system. Priorities in Figure 6.19. Process Pi has the earliest deadline, so its initial priority is higher may have to be adjusted to reflect the deadline of the newly runnable process.than that of process P2. Process P2 begins running at the end of the CPU burst P1. However, whereas rate-monotonic scheduling allows P to preempt P2 at the beginning of its next period at time 50, EDF scheduling allows process P2 to continue running. P2 now has a higher priority than P1 because its next deadline (at time 80) is earlier than that of P (at time 100). Thus, both P1 and 2 P2 meet their first deadlines. Process P1 again begins running at time 60 and completes its second CPU burst at time 85, also meeting its second deadline at time 100. P2 begins running at this point, only to be preempted by P at the start of its next period at time 100. P2 is preempted because Pi has an earlier deadline (time 150) than P2 (time 160). At time 125, P1 completes its CPU burst and P2 resumes execution, finishing at time 145 and meeting its deadline as well. The system is idle until time 150, when Pi is scheduled to run once again. Unlike the rate-monotonic algorithm, EDF scheduling does not require that dic, nor must a process require a constant amount of CPU P, P ime per burst. The only requirement is that a process announce its deadline to the scheduler when it becomes runnable. The appeal of EDF scheduling is that it is theoretically optimaltheoretically, it can schedule processes so that each process can meet its deadline requirements and CPU utilization will be 0 10 20 30 40 50 60 70 80 90 100 110 120 130 140 150 160 100 percent. In practice, however, it is impossible to achieve this level of CPU utilization due to the cost of context switching between processes and interrupt Note how this differs from rate-monotonic scheduling, where priorities are Ior fixed deadlines P1, P 0 10 20 30 40 50 60 70 80 90 100 110 120 130 140 150 160 Figure 6.18 Mis deadlines with rate-monotonic scheduli processes be deadlines Figure 6.19 Earliest-deadline-first scheduling handling. C program question Show all of your work AND explain your answer CLEARLY! Follow these directions for a 1 A) Consider the processes: (P0, 45,25), (P1, 25, 5). The triples have the form (process, period, tme). Assume that deadline and period are identical Draw the scheduling that would occur for these processes using Earliest-Deadline-First over 90 time units B) Can these two processes be scheduled using earliest deadline-first (EDF) scheduling? Answer yes or no C programming: Real-Time CPU Scheduling Question is at the bottom! Supplemental Material to help you: Page 1 Page 2 Earliest-Deadline-First Scheduling To illustrate EDF scheduling, we again schedule the processes shown in Earliest-deadline-first (EDF) scheduling dynamically assigns priorities accord Figure 6.18, which failed to meet deadline requirements under rate-monotonic ing to deadline. The earlier the deadline, the higher the priority; the later the scheduling. Recall that Pi has values of p 50 and 25 and that P2 has deadline, the lower the priority. Under the EDF policy, when a process becomes values of p2 80 and t2 35 The EDF scheduling of these processes is shown runnable, it must announce its deadline requirements to the system. Priorities in Figure 6.19. Process Pi has the earliest deadline, so its initial priority is higher may have to be adjusted to reflect the deadline of the newly runnable process.than that of process P2. Process P2 begins running at the end of the CPU burst P1. However, whereas rate-monotonic scheduling allows P to preempt P2 at the beginning of its next period at time 50, EDF scheduling allows process P2 to continue running. P2 now has a higher priority than P1 because its next deadline (at time 80) is earlier than that of P (at time 100). Thus, both P1 and 2 P2 meet their first deadlines. Process P1 again begins running at time 60 and completes its second CPU burst at time 85, also meeting its second deadline at time 100. P2 begins running at this point, only to be preempted by P at the start of its next period at time 100. P2 is preempted because Pi has an earlier deadline (time 150) than P2 (time 160). At time 125, P1 completes its CPU burst and P2 resumes execution, finishing at time 145 and meeting its deadline as well. The system is idle until time 150, when Pi is scheduled to run once again. Unlike the rate-monotonic algorithm, EDF scheduling does not require that dic, nor must a process require a constant amount of CPU P, P ime per burst. The only requirement is that a process announce its deadline to the scheduler when it becomes runnable. The appeal of EDF scheduling is that it is theoretically optimaltheoretically, it can schedule processes so that each process can meet its deadline requirements and CPU utilization will be 0 10 20 30 40 50 60 70 80 90 100 110 120 130 140 150 160 100 percent. In practice, however, it is impossible to achieve this level of CPU utilization due to the cost of context switching between processes and interrupt Note how this differs from rate-monotonic scheduling, where priorities are Ior fixed deadlines P1, P 0 10 20 30 40 50 60 70 80 90 100 110 120 130 140 150 160 Figure 6.18 Mis deadlines with rate-monotonic scheduli processes be deadlines Figure 6.19 Earliest-deadline-first scheduling handling. C program question Show all of your work AND explain your answer CLEARLY! Follow these directions for a 1 A) Consider the processes: (P0, 45,25), (P1, 25, 5). The triples have the form (process, period, tme). Assume that deadline and period are identical Draw the scheduling that would occur for these processes using Earliest-Deadline-First over 90 time units B) Can these two processes be scheduled using earliest deadline-first (EDF) scheduling? Answer yes or no
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
