1Feng Chen[email protected]* Adapted from OSC slides by Silberschatz, Galvin and Gagne, DOSA by Chow and Johnson, and OS slides by B. B Karki, LSUDistributed Process Scheduling1.2Feng Chen, LSUCSC 7103 Advanced Operating SystemsScheduling BasicsBefore execution/running, processes must be scheduled for CPUs andallocated with resourcesObjectives of schedulingEnhance overall system performance metrics such as processcompletion (turnaround) time and processor (resource) utilizationAchieve location and performance transparencySeveral challenges:Multiple processing nodes are geographically distributedDynamical behaviors of the system–underlying architectureLocal and global schedulingDistributed processes execute on remote nodes and may migratefrom node to node:Remote execution, process/task migration, data migrationNon-negligible communication overhead12
21.3Feng Chen, LSUCSC 7103 Advanced Operating SystemsProcess/CPU SchedulingScheduler selects from among the processes in ready queue, andallocates the available processor/CPU to one of themScheduling decision may take placeWhen a process switches state (e.g., running to waiting)When a new process enters the systemWhenever a scheduling condition is metWhen a process terminatesPreemptive vs. non-preemptiveScheduling can benon-preemptive(static)–once CPU isallocated to a process, the process keeps CPU until its executionfinishesScheduling can bepreemptive–process is interrupted(suspended) for other process to be allocated to CPUDispatch latency–time the dispatcher takes to stop one process andstart another running1.4Feng Chen, LSUCSC 7103 Advanced Operating SystemsRepresentation of Process SchedulingQueuing diagramrepresents queues, resources, flows34
31.5Feng Chen, LSUCSC 7103 Advanced Operating SystemsCommon Scheduling AlgorithmsSeveral scheduling algorithms exist for single processor computer systemFirst-Come, First Served (FCFS) schedulingShortest-Job-First (SJF) schedulingShortest-Remaining-Time-First (SRTF) scheduling (preemptive)Priority scheduling (preemptive/non-preemptive)Round Robin (RR) scheduling (preemptive)Multilevel Queue schedulingMultilevel Feedback Queue scheduling1.6Feng Chen, LSUCSC 7103 Advanced Operating SystemsFirst- Come, First-Served (FCFS) SchedulingProcessBurst TimeP124P23P33Suppose that the processes arrive in the order:P1,P2,P3TheGantt Chartfor the schedule is:Waiting time forP1= 0;P2= 24;P3= 27Average waiting time:(0 + 24 + 27)/3 = 17Average turn-around time: (24+27+30)/3=27PPP123024302756
41.7Feng Chen, LSUCSC 7103 Advanced Operating SystemsOptimization CriteriaSpeedup–Increasingthroughput(the number of completed processesper time unit)Resource utilization–keeping processors as busy as possibleMakespan orcompletion time–decreasingturnaround time(waiting +execution + event)Response time–reducing the time taken from request submission untilthe first response (important in time-sharing systems)Load sharing and balancing–key in distributed and multiprocessorsystemsOptimize the max or min values or average measure or variance1.8Feng Chen, LSUCSC 7103 Advanced Operating SystemsMultiple Processor SchedulingScheduling becomes more complex when multiple CPUs/processors areavailable–load sharing/balancingis importantHomogeneous (identical) processors within amultiprocessor system:Asymmetric multiprocessingOne single processor (called master server like coordinator) does
Upload your study docs or become a
Course Hero member to access this document
Upload your study docs or become a
Course Hero member to access this document
End of preview. Want to read all 20 pages?
Upload your study docs or become a
Course Hero member to access this document
Term
Fall
Professor
Kannan,R
Tags
Computer multitasking, Scheduling algorithm, Advanced Operating Systems, Feng Chen