- In a multiprocessor systems that are multiple CPUs.
- The processing load is distributed among these available processors.
- Multiple processor have a shared memory.
- There are two types of Multi processor System.
- They are
2. Symmetric Multiprocessing
Asymmetric Multiprocessing
One processor is made the master processor handles all the scheduling policies, I/O operations resource allocation & other systems actions other processors works like a slave execution only user code.
Single Schedular
It had a dedicated CPU to run the schedular.
Advantages
- Simple to implement.
- Schedular have local queue in which processes are ready to run.
- CPU utilization is not proper so, performance is degrading.
Symmetric Multiprocessing System
- We will have a copy of OS is maintained by all processors.
- All processors share I/O bus & memory.
- The processes are waiting for CPU yo get execute are maintained in global ready queue.
- Each processor runs a schedular independently to select the process to execute.
- They are two methods to execute scheduling.
- They are 1.Using global queues.
1.Symmetrical Scheduling with global queue
Here we using locking System to not get selected same process by different CPUs.
Advantage
- Good CPU utilization.
- Fair to all processes.
Disadvantage
- Not scalable because contention for the global queue.
- Schedulers need to highly efficient.
- Processor affinity not easily achievable.
Symmetrical Scheduling with separate queue for each CPU
- Each CPU execute processes from its own local ready queue of processes.
- It uses static partition of processes across CPUs at the start of the execution of process either the user , So decides in which CPU process will be placed on corresponding CPU queue.
Advantage
- Easy to implement.
- No locking mechanism required
- Scalable
Disadvantage
Load imbalance
If some CPUs have lot of processes in ready queue & some have fare less processes in ready queue.
Hybrid Approach
- It uses both global & local queues.
- Local queues are associated with each CPUs.
- Global queues is shared among CPUs.
- Global queue is used to maintain load balancing .
- Used in Linux 2.6.
Load balancing across queues feasible.