TopicsProcesslifecycle- Process scheduling- Context switching- Scheduling criteriaScheduling algorithmsApplications/Scenarios(intel)Core"i726
26 Topics - Process lifecycle - Process scheduling - Context switching - Scheduling criteria - Scheduling algorithms - Applications/Scenarios
Scheduling Criteria. How to choose which algorithm to use in aparticular situation?TypesAlgorithmPropertiesPreemptiveCPU utilization ThroughputNonpreemptiveTurnaround time WaitingtimeResponse timeApplicationMultiprocessorReal-time sysApplicationrequirementsand algorithmproperties mayvarysignificantly27
Scheduling Criteria • How to choose which algorithm to use in a particular situation? 27 Algorithm Properties CPU utilization Response time Throughput Turnaround time Waiting time Types Preemptive Nonpreemptive Application Multiprocessor Real-time sys Application requirements and algorithm properties may vary significantly
Classesof processschedulingNon-preemptive scheduling.When a process is chosenbythescheduler,theprocess wouldneverleavethe scheduler until..Whatisit?-theprocessvoluntarilywaitsforl/O,or-theprocessvoluntarilyreleasestheCPU,e.g.,exit()WhatistheIf theprocessis purely CPU-bound,it will seizethe CPU fromthetimeitiscatch?chosen until it terminates.GoodforsystemsthatemphasizethetimeinfinishingtasksPros-Because the task is running without others'interruption.Bad for nowadays systems in which user experience and multi-taskingConsaretheprimarygoals.WherecanINowhere...butitcould befound back inthemainframecomputers infind it?1960s.28
Classes of process scheduling • Non-preemptive scheduling. 28 Cons Bad for nowadays systems in which user experience and multi-tasking are the primary goals. Pros Good for systems that emphasize the time in finishing tasks. - Because the task is running without others’ interruption. What is it? When a process is chosen by the scheduler, the process would never leave the scheduler until. -the process voluntarily waits for I/O, or -the process voluntarily releases the CPU, e.g., exit(). Where can I find it? Nowhere.but it could be found back in the mainframe computers in 1960s. What is the catch? If the process is purely CPU-bound, it will seize the CPU from the time it is chosen until it terminates
Classes of process schedulingPreemptive schedulingWhen a process ischosen bythe scheduler,theprocess would neverleavethe scheduleruntil...What is it?-theprocessvoluntarilywaitsforl/o,or-the process voluntarilyreleases the cpU,e.g., exit()particularkinds of interrupts and events aredetected.Whatis theIf that particular event is the periodic clock interrupt, then you can havecatch?atime-sharingsystemGoodfor systemsthat emphasizeinteractivenessPros-Because everytask will receiveattentions fromthe CPU.ConsBadforsystemsthatemphasizethetimeinfinishingtasksWherecanlEverywhere!This is the design of nowadayssystems.find it?29
Classes of process scheduling • Preemptive scheduling. 29 Cons Bad for systems that emphasize the time in finishing tasks. Where can I find it? Everywhere! This is the design of nowadays systems. What is the catch? If that particular event is the periodic clock interrupt, then you can have a time-sharing system. What is it? When a process is chosen by the scheduler, the process would never leave the scheduler until. -the process voluntarily waits for I/O, or -the process voluntarily releases the CPU, e.g., exit(). -particular kinds of interrupts and events are detected. Pros Good for systems that emphasize interactiveness. - Because every task will receive attentions from the CPU
PerformancemeasuresIn algorithm design:What factors/performance measuresshould be carefully considered?TurnaroundtimeThroughputWaitingtimeCPUutilizationResponsetime30
30 Performance measures CPU utilization Throughput Turnaround time In algorithm design: What factors/performance measures should be carefully considered? Waiting time Response time