Explain thread scheduling on multi-processors? thread scheduling techniques | Gang scheduling Advantages and Disadvantage
Here is the the information about thread scheduling on multi-processors along with its advantages and disadvantages. Also Explain what is gand scheduling:
Most machine systems have a single CPU, which ensures that threads run one at a time to create an illusion of competition. For any order the execution of several threads is called scheduling on a single CPU. While creating a thread it adopts its priority from the thread it generated. You may also use the set. Higher the integral number, the higher the priority. When multiple threads are ready to run at any given time, the runtime system chooses the Runnable thread with the highest priority for execution. Priority method to change the priorities of a thread at any time after its development. Thread priorities range from MIN PRIORITY to MAX PRIORITY integers.
When two threads with the same priority await the CPU, the scheduler will randomly pick one of them to run. The selected thread runs until one of the following conditions is true:
⦁ A thread with a higher priority is runnable.
⦁ It yields, or exits its run process.
⦁ Its allotment of time has expired on systems which support time-slicing.
What is thread scheduling on Multiprocessors?
A thread scheduler can be used for scheduling threads to processors in a multiprocessor chip or symmetric multiprocessor device. The scheduler will determine the usage of the two threads in combination by bandwidth and whether that usage exceeds the threshold value. If so, it is possible to arrange the threads on separate clusters of processors that do not have the same paths between common memory and processors. If not, then the threads may be allocated to the same cluster of processors that share cache between processors.
Multiple CPU’s are usable in multiple-processor scheduling and thus load sharing is possible. Nevertheless, the scheduling of multiple processors is more complicated than the scheduling of single processors. There are cases when the processors are identical i.e., in multiple processor scheduling. HOMOGENEOUS, we can use any processor available to run any process in the queue, in terms of their features.
Famous multiprocessor thread scheduling techniques
Following are some famous multiprocessor thread scheduling techniques:
- Load Sharing
- Dedicated Processor Assignment
- Dynamic Scheduling
- GANG Scheduling
Processes are not allocated to a given device. It maintains a regional thread queue. Each processor selects a thread from that queue when idle. Remember that load balancing refers to a system where work is more generally assigned to the processors.
A collection of similar threads is scheduled to run concurrently, 1-to-1 on a collection of processors. It can be planned for closely linked threads / processes to reduce blocking of synchronization and eliminate process switching. This technique was predated by party scheduling.
Dedicated Processor Assignment
Provides implicit scheduling specified for processors by assigning threads. — program is allocated a set of processors equal in number to the number of threads in the program for the period of program execution. Processors are selected from the pool which is open.
During execution, the number of threads in a program may be modified.
Gang scheduling is a parallel system scheduling algorithm that schedules the associated threads or processes to run concurrently on separate processors. These will typically be threads all of which belong to the same process, but they may also be from different processes. Gang scheduling is used in such a way that if two or more threads or processes communicate with each other, they are both able to communicate simultaneously. If they weren’t gang-scheduled, then one would wait to send or receive a message to another while he sleeps, and vice versa.
Advantages of GANG Scheduling
Here are some of the major advantages of gang thread scheduling technique:
- It lets you simultaneously schedule several threads that belong to the same program.
- This prevents one thread A waiting for another thread B when thread B does not run.
- The overhead of background switching or busy waiting at synchronization points can be avoided if you schedule them at the same time.
Disadvantages of GANG Scheduling
- Resource management and context changing overheads from its legacy in time sharing.
- This performs I / O intensive work with respect to certain forms of time sharing.
- These tasks cause low performance in both processor efficiency and I / O efficiency because during computation the gang scheduling cannot solve I / O demands.
- Processor performance decreases as connections wait for I / O tests, or when computer-intensive links are not permitted.
For more information about Operating Systems click here
Was this helpful?
0 / 0