A CPU-scheduling algorithm determines an order for the execution of its booked procedures. Given n processes to be booked on one processor, exactly how many kind of different schedules are possible? Give a formula in terms of n.

You are watching: Why is it important for the scheduler to distinguish i/o-bound programs from cpu-bound programs?


The full number of schedules possible (number of means to order n distinctive objects in a sequence) is n!
CPU-scheduling decisions might take location under the complying with 4 circumstances:When a process switches from the running state to the waiting state (for instance, as the outcome of an I/0 research or an invocation of wait for the termicountry of among the boy processes).When a process switches from the running state to the ready state (for example, once an interrupt occurs).When a process switches from the waiting state to the all set state (for example, at completion of I/0).When a process terminates.When scheduling takes place only under circumstances 1 and also 4, we say that the scheduling system is non-preemptive or cooperative; otherwise, it is preemptive.
Suppose that the following procedures arrive for execution at the times suggested. Each process will certainly run for the amount of time provided. In answering the questions, usage nonpreemptive scheduling, and base all decisions on the information you have actually at the time the decision have to be made. Process Arrival Time Burst Time P1 0.0 8 P2 0.4 4 P3 1.0 1a. What is the average turnaround time for these procedures with the FCFS scheduling algorithm?
P1 executes and also then we discover P3 is a much shorter process than P2.P1 → P3 → P2 = ( 8 + (9 - 1) + (13 - 0.4)) / 3 = 9.53
c. The SJF algorithm is expected to improve performance, however notice that we made a decision to run procedure P1 at time 0 because we did not recognize that two shorter processes would arrive quickly. Compute what the average turnapproximately time will be if the CPU is left idle for the initially 1 unit and also then SJF scheduling is offered. Remember that processes P1 and also P2 are waiting throughout this idle time, so their waiting time may boost. This algorithm might be known as future-expertise scheduling.
Idle for 1, then usage SJF. P3 shortest, P2 following shortest, P1 longest.Idle → P3 → P2 → P1 = ((2 - 1) + ( 6 - 0.4 ) + ( 14 - 0)) / 3 = 6.87
What advantage is tright here in having different time-quantum sizes at various levels of a multilevel queueing system?
By utilizing different time-quantum sizes, you have the right to allow processes with shorter quantum and regular processes with brief execution time to be serviced quickly while procedures through huge quantum have the right to be in one more queue.
Suppose that a scheduling algorithm (at the level of short-term CPU scheduling) favors those procedures that have supplied the leastern processor time in the current past. Why will this algorithm favor I/O-bound programs and also yet not permanently starve CPU-bound programs?
I/O-bound programs would not require a lot CPU usage, having brief CPU bursts. CPU-bound programs need huge CPU bursts. CPU-bound processes execute not need to problem about starvation because I/O bound programs finish running easily permitting CPU-bound programs to usage the CPU regularly.
Process contention scope (PCS) scheduling is percreated regional to each process. System contention scope (SCS) scheduling is performed on the operating mechanism with kernel threads. On devices that use many-to-one or many-to-many type of, PCS and SCS scheduling is various. On devices using one-to-one, PCS and SCS scheduling is the very same.
I/O-bound programs have the residential property of percreating only a small amount of computation prior to performing I/O. Such programs generally execute not use up their whole CPU quantum. CPU-bound programs, on the other hand, usage their entire quantum without performing anyblocking I/O operations. Consequently, one could make much better usage of the computer"s resouces by providing better priority to I/O-bound programs and also permit them to execute ahead of the CPU-bound programs.
Discuss how the complying with pairs of scheduling criteria conflict in certainsettings. a. CPU utilization and also response time
CPU utilization and response time: CPU utilization is boosted if the overheads connected through context switching is lessened. The conmessage switching overheads could be lowered by percreating context switches intypically. This could, but, bring about raising the response time for procedures.
Mean turnapproximately time and maximum waiting time: Typical turnroughly time is decreased by executing the shortest work first. Such a scheduling plan can, but, starve long-runningwork and thereby rise their waiting time.

See more: A Pleasure To Make Your Acquaintance Meaning, A Pleasure Makin' Your Acquaintance


I/O gadget utilization and CPU utilization: CPU utilization is maximized by running long-running CPU-bound work without percreating context switches. I/O gadget utilization is maximized byscheduling I/O-bound tasks as quickly as they become prepared to run, thereby incurring the overheads of context switches.
})}else;home window.place.assign("https://lutz-heilmann.info/explanations/textbook-solutions/introduction-to-the-theory-of-computation-3rd-edition-9781133187790");">
*

})}else;window.area.assign("https://lutz-heilmann.info/explanations/textbook-solutions/engineering-electromagnetics-8th-edition-9780077418823");">
*

})}else;home window.place.assign("https://lutz-heilmann.info/explanations/textbook-solutions/fundamentals-of-python-first-programs-2nd-edition-9781337560092");">
*

})}else;window.location.assign("https://lutz-heilmann.info/explanations/textbook-solutions/python-for-everyone-2nd-edition-9781119056362");">
*