170 likes | 238 Vues
Scheduling in Distributed Systems. By Arlington Wilson. Presentation content. Problem Definition What is Distributed system scheduling? What conditions does it apply under? Ousterhout 3 Co-Scheduling algorithms Matrix Algorithm Continuous Algorithm Undivided Algorithm
E N D
Scheduling in Distributed Systems By Arlington Wilson
Presentation content • Problem Definition What is Distributed system scheduling? What conditions does it apply under? • Ousterhout 3 Co-Scheduling algorithms Matrix Algorithm Continuous Algorithm Undivided Algorithm • Co-scheduling effectiveness analysis • Implicit co-scheduling • References
Problem definition • Normally each processor does it own local scheduling. • Processes A & B run on processor 0 and processes C & D run on processor 1. Processors Time slot 0 1 0 1 2 3 4 5
Problem definition • How to improve performance when a group of heavily interactive processes run on different processors? • In 1982, John Ousterhout proposed 3 scheduling techniques based on a concept he called co-scheduling.
Co-Scheduling Assumptions • Related processes are started together. • In general intra-group communication is more likely than inter-group communication. • Sufficiently large numbers of processors are available to handle the largest group. • Each processor is multi-programmed with N process slots (N-way multiprogramming)
Algorithm 1 - The Matrix Method Processors 0 1 2 3 4 5 6 7 P = # of processors, Q = # of processes/group Allocation • If Pavail/row 0 >= Q, assign to row 0. If not check row 1, etc... Scheduling • A round robin mechanism Time Slots 0 1 2 3 4 5
Algorithm 1 - The Matrix Method Processors 0 1 2 3 4 5 6 7 Alternate selection If an executing row has a empty or blocked process slot, scan for next slot in column to execute. Time Slots 0 1 2 3 4 5
Algorithm 1 – The Matrix Method Advantages: Simple allocation and scheduling algorithms Disadvantages: A group cannot be spread over multiple rows, thus many processor slots are left Empty. Alternate selection causes opportunities for co- scheduling to me missed.
The continuous Algorithm Allocation • Start a window of size P at the left end of the process sequence • If # of empty slot >= Q, allocate the group. • Else, slide window to the right until left most process slot is empty.
The continuous Algorithm Scheduling • Start a window of size P at the left end of the process sequence • At the beginning of each time slice, until the start of a new process group. • When the window has empty process slots or processes that aren’t running, use the alternate selection mechanism.
The Continuous Algorithm • Advantages • Better utilization of processor slots • Disadvantages When the process sequence becomes populated with non-continuous empty slots, during allocation groups become fragmented. Fragmentation leads to poor performance.
The Undivided Algorithm • Same as the continuous algorithm, except that during allocation all new groups are required to be contiguous in the linear process sequence. (No dividing between slots) • Less efficient at packing than continuous. • Substantial better system behavior under heavy loads due to reduced fragmentation.
Analysis of the Algorithms • Results presented in terms of co-scheduling effectiveness. • The ability to co-schedule grouped processes not the performance. • Co-scheduling effectiveness is the mean of the ratio of the total # of processors executing co-scheduled processes to the total # of processors with runnable processes. (Ideal is and effectiveness of 1)
What lowers co-scheduling effectiveness? • Straddling – The continuous and undivided algorithm, would straddle the right end of the scheduling window. Thus causing the processes inside the window to execute as a fragment, lowering co-scheduling effectiveness. • Alternate Selection – Creates fragments and will degrade the system co-scheduling effectiveness.
Analysis of the Algorithms • For average system loads (<1.0) All three algorithms perform about the same due to low straddling and alternate selection. • For system loads above 1.0 both straddling and alternate selection occur cause effectiveness to degrade. • For heavy loads, the undivided algorithm performs 5-10% better then the continuous algorithm which performs 5-10 percent better than the matrix algorithm.
Implicit Co-Scheduling [1] • If a process sends a message, then waits a period of time, if no response, assume other group processes are not executing and relinquish the processor. • If a process receives a message, it can infer that other processes in the application are executing and this process should be scheduled. • It uses no global coordinator.
References • Scheduling with implicit Information in Distributed Systems - Andrea C. Arpaci-Dusseau, David E. Culler, Alan Mainwaring – Sigmetric ’98 • Scheduling Techniques for Concurrent Sytems – John K. Ousterhout ’80 • Distributed Operating Systems – Andrews Tanenbaum