SlideShare a Scribd company logo
1 of 17
Multiprocessor scheduling
Introduction
 When a computer system contains more than a single processor, several
new issues are introduced into the design of scheduling functions. We will
examine these issues and the details of scheduling algorithms for tightly
coupled multi-processor systems.
Classifications of Multiprocessor
Systems
 Loosely coupled or distributed multiprocessor, or cluster
 Each processor has its own memory and I/O channels
 Functionally specialized processors
 Such as I/O processor
 Controlled by a master processor
 Tightly coupled multiprocessing
 Processors share main memory
 Controlled by operating system
Interconnection Network
P P P
Memory
disk
Memory Memory
disk disk
Shared Nothing
(Loosely Coupled)
P P P
Interconnection Network
Global Shared Memory
disk disk disk
Shared Memory
(Tightly Coupled)
Memory Memory Memory
P P P
Interconnection Network
disk disk disk
Shared Disk
Granularity
 A good metric for characterizing multiprocessors and placing then in
context with other architectures is to consider the synchronization
granularity, or frequency of synchronization, between processes in a
system.
 Five categories of parallelism that differ in the degree of granularity
can be defined:
1. Independent parallelism
2. Very coarse granularity
3. Coarse granularity
4. Medium granularity
5. Fine granularity
Independent Parallelism
 With independent parallelism there is no explicit synchronization among
processes.
 Each process represents a separate, independent application or job.
 This type of parallelism is typical of a time-sharing system.
 The multiprocessor provides the same service as a multiprogrammed
uniprocessor, however, because more than one processor is available,
average response times to the user tend to be less.
Coarse and Very Coarse-Grained
Parallelism
 With coarse and very coarse grained parallelism, there is synchronization
among processes, but at a very gross level.
 This type of situation is easily handled as a set of concurrent processes running
on a multi-programmed uni-processor and can be supported on a
multiprocessor with little or no change to user software.
 Good for concurrent processes that need to communicate or synchronize can
benefit from the use of a multiprocessor architecture.
 In the case of very infrequent interaction among the processes, a distributed
system can provide good support. However, if the interaction is somewhat
more frequent, then the overhead of communication across the network may
negate some of the potential speedup. In that case, the multiprocessor
organization provides the most effective support.
Medium-Grained Parallelism
 Single application is a collection of threads
 Threads usually interact frequently
Fine-Grained Parallelism
 Highly parallel applications
 Specialized and fragmented area
Design Issues For Multiprocessor
Scheduling
 Scheduling on a multiprocessor involves three interrelated
issues:
1. The assignment of processes to processors
2. The use of multiprogramming on individual processors
3. The actual dispatching of a process
 Looking at these three issues, it is important to keep in mind
that the approach taken will depend, in general, on the
degree of granularity of the applications and on the
number of processors available.
1: Assignment of Processes to Processors
 Treat processors as a pooled resource and assign process to processors on
demand
 Permanently assign process to a processor
 Known as group or gang scheduling
 Dedicate short-term queue for each processor
 Less overhead
 Processor could be idle while another processor has a backlog
 Global queue
 Schedule to any available processor
Assignment of Processes to Processors
 Master/slave architecture
 Key kernel functions always run on a particular processor
 Master is responsible for scheduling
 Slave sends service request to the master
 Disadvantages
 Failure of master brings down whole system
 Master can become a performance bottleneck
 Peer architecture
 Kernel can execute on any processor
 Each processor does self-scheduling
 Complicates the operating system
 Make sure two processors do not choose the same process
Process Scheduling
 Single queue for all processes
 Multiple queues are used for priorities
 All queues feed to the common pool of processors
Multiprocessor Thread Scheduling
 Executes separate from the rest of the process
 An application can be a set of threads that cooperate and execute concurrently in the
same address space
 Load sharing
 Processes are not assigned to a particular processor
 Gang scheduling
 A set of related threads is scheduled to run on a set of processors at the same time
 Dedicated processor assignment
 Threads are assigned to a specific processor
 Dynamic scheduling
 Number of threads can be altered during course of execution
Load Sharing
 Load is distributed evenly across the processors
 No centralized scheduler required
 Use global queues
Disadvantages of Load Sharing
 Central queue needs mutual exclusion
 Preemptive threads are unlikely to resume execution on the same
processor
 If all threads are in the global queue, all threads of a program will not gain
access to the processors at the same time
Gang Scheduling
 Simultaneous scheduling of threads that make up a single process
 Useful for applications where performance severely degrades when any
part of the application is not running
 Threads often need to synchronize with each other
Dedicated Processor Assignment
 When application is scheduled, its threads are assigned to a processor
 Some processors may be idle
 No multiprogramming of processors
Dynamic Scheduling
 Number of threads in a process are altered dynamically by the application
 Operating system adjust the load to improve utilization
 Assign idle processors
 New arrivals may be assigned to a processor that is used by a job currently using
more than one processor
 Hold request until processor is available
 Assign processor a job in the list that currently has no processors (i.e., to all
waiting new arrivals)

More Related Content

What's hot

distributed shared memory
 distributed shared memory distributed shared memory
distributed shared memory
Ashish Kumar
 

What's hot (20)

Chapter 11 - File System Implementation
Chapter 11 - File System ImplementationChapter 11 - File System Implementation
Chapter 11 - File System Implementation
 
Unit II - 2 - Operating System - Threads
Unit II - 2 - Operating System - ThreadsUnit II - 2 - Operating System - Threads
Unit II - 2 - Operating System - Threads
 
Virtual memory
Virtual memory Virtual memory
Virtual memory
 
334839757 task-assignment
334839757 task-assignment334839757 task-assignment
334839757 task-assignment
 
Ddbms1
Ddbms1Ddbms1
Ddbms1
 
Chapter 7 - Deadlocks
Chapter 7 - DeadlocksChapter 7 - Deadlocks
Chapter 7 - Deadlocks
 
distributed shared memory
 distributed shared memory distributed shared memory
distributed shared memory
 
Distributed system
Distributed systemDistributed system
Distributed system
 
Memory Management in OS
Memory Management in OSMemory Management in OS
Memory Management in OS
 
Distributed Operating System_1
Distributed Operating System_1Distributed Operating System_1
Distributed Operating System_1
 
Virtual memory
Virtual memoryVirtual memory
Virtual memory
 
Threads ppt
Threads pptThreads ppt
Threads ppt
 
message passing vs shared memory
message passing vs shared memorymessage passing vs shared memory
message passing vs shared memory
 
Cpu scheduling in operating System.
Cpu scheduling in operating System.Cpu scheduling in operating System.
Cpu scheduling in operating System.
 
Mutual exclusion and sync
Mutual exclusion and syncMutual exclusion and sync
Mutual exclusion and sync
 
Lecture 1 introduction to parallel and distributed computing
Lecture 1   introduction to parallel and distributed computingLecture 1   introduction to parallel and distributed computing
Lecture 1 introduction to parallel and distributed computing
 
File System Implementation - Part1
File System Implementation - Part1File System Implementation - Part1
File System Implementation - Part1
 
Chorus - Distributed Operating System [ case study ]
Chorus - Distributed Operating System [ case study ]Chorus - Distributed Operating System [ case study ]
Chorus - Distributed Operating System [ case study ]
 
Os Threads
Os ThreadsOs Threads
Os Threads
 
Clock synchronization in distributed system
Clock synchronization in distributed systemClock synchronization in distributed system
Clock synchronization in distributed system
 

Similar to Multiprocessor Scheduling

Module2 MultiThreads.ppt
Module2 MultiThreads.pptModule2 MultiThreads.ppt
Module2 MultiThreads.ppt
shreesha16
 
Operating system (OS) itself is a process, what approaches are there.pdf
Operating system (OS) itself is a process, what approaches are there.pdfOperating system (OS) itself is a process, what approaches are there.pdf
Operating system (OS) itself is a process, what approaches are there.pdf
JUSTSTYLISH3B2MOHALI
 

Similar to Multiprocessor Scheduling (20)

Parallel Processing (Part 2)
Parallel Processing (Part 2)Parallel Processing (Part 2)
Parallel Processing (Part 2)
 
Wiki 2
Wiki 2Wiki 2
Wiki 2
 
Parallel and Distributed Computing Chapter 7
Parallel and Distributed Computing Chapter 7Parallel and Distributed Computing Chapter 7
Parallel and Distributed Computing Chapter 7
 
PARALLEL ARCHITECTURE AND COMPUTING - SHORT NOTES
PARALLEL ARCHITECTURE AND COMPUTING - SHORT NOTESPARALLEL ARCHITECTURE AND COMPUTING - SHORT NOTES
PARALLEL ARCHITECTURE AND COMPUTING - SHORT NOTES
 
Chapter 10
Chapter 10Chapter 10
Chapter 10
 
Parallel processing Concepts
Parallel processing ConceptsParallel processing Concepts
Parallel processing Concepts
 
Shared memory Parallelism (NOTES)
Shared memory Parallelism (NOTES)Shared memory Parallelism (NOTES)
Shared memory Parallelism (NOTES)
 
Scheduler Activations - Effective Kernel Support for the User-Level Managemen...
Scheduler Activations - Effective Kernel Support for the User-Level Managemen...Scheduler Activations - Effective Kernel Support for the User-Level Managemen...
Scheduler Activations - Effective Kernel Support for the User-Level Managemen...
 
Symmetric multiprocessing and Microkernel
Symmetric multiprocessing and MicrokernelSymmetric multiprocessing and Microkernel
Symmetric multiprocessing and Microkernel
 
Module2 MultiThreads.ppt
Module2 MultiThreads.pptModule2 MultiThreads.ppt
Module2 MultiThreads.ppt
 
Assignment-01.pptx
Assignment-01.pptxAssignment-01.pptx
Assignment-01.pptx
 
CS9222 ADVANCED OPERATING SYSTEMS
CS9222 ADVANCED OPERATING SYSTEMSCS9222 ADVANCED OPERATING SYSTEMS
CS9222 ADVANCED OPERATING SYSTEMS
 
Operating system (OS) itself is a process, what approaches are there.pdf
Operating system (OS) itself is a process, what approaches are there.pdfOperating system (OS) itself is a process, what approaches are there.pdf
Operating system (OS) itself is a process, what approaches are there.pdf
 
Unit 2 part 2(Process)
Unit 2 part 2(Process)Unit 2 part 2(Process)
Unit 2 part 2(Process)
 
Operating system 20 threads
Operating system 20 threadsOperating system 20 threads
Operating system 20 threads
 
Topic 4- processes.pptx
Topic 4- processes.pptxTopic 4- processes.pptx
Topic 4- processes.pptx
 
Pthread
PthreadPthread
Pthread
 
Epc 3.ppt
Epc 3.pptEpc 3.ppt
Epc 3.ppt
 
Distributed Shared Memory
Distributed Shared MemoryDistributed Shared Memory
Distributed Shared Memory
 
Process Management Operating Systems .pptx
Process Management        Operating Systems .pptxProcess Management        Operating Systems .pptx
Process Management Operating Systems .pptx
 

Recently uploaded

Economics Presentation-2.pdf xxjshshsjsjsjwjw
Economics Presentation-2.pdf xxjshshsjsjsjwjwEconomics Presentation-2.pdf xxjshshsjsjsjwjw
Economics Presentation-2.pdf xxjshshsjsjsjwjw
mordockmatt25
 
abortion pills in Riyadh Saudi Arabia (+919707899604)cytotec pills in dammam
abortion pills in Riyadh Saudi Arabia (+919707899604)cytotec pills in dammamabortion pills in Riyadh Saudi Arabia (+919707899604)cytotec pills in dammam
abortion pills in Riyadh Saudi Arabia (+919707899604)cytotec pills in dammam
samsungultra782445
 
+97470301568>>buy weed in qatar,buy thc oil in qatar doha>>buy cannabis oil i...
+97470301568>>buy weed in qatar,buy thc oil in qatar doha>>buy cannabis oil i...+97470301568>>buy weed in qatar,buy thc oil in qatar doha>>buy cannabis oil i...
+97470301568>>buy weed in qatar,buy thc oil in qatar doha>>buy cannabis oil i...
Health
 

Recently uploaded (20)

Toronto dominion bank investor presentation.pdf
Toronto dominion bank investor presentation.pdfToronto dominion bank investor presentation.pdf
Toronto dominion bank investor presentation.pdf
 
Shrambal_Distributors_Newsletter_May-2024.pdf
Shrambal_Distributors_Newsletter_May-2024.pdfShrambal_Distributors_Newsletter_May-2024.pdf
Shrambal_Distributors_Newsletter_May-2024.pdf
 
Seeman_Fiintouch_LLP_Newsletter_May-2024.pdf
Seeman_Fiintouch_LLP_Newsletter_May-2024.pdfSeeman_Fiintouch_LLP_Newsletter_May-2024.pdf
Seeman_Fiintouch_LLP_Newsletter_May-2024.pdf
 
Black magic specialist in Canada (Kala ilam specialist in UK) Bangali Amil ba...
Black magic specialist in Canada (Kala ilam specialist in UK) Bangali Amil ba...Black magic specialist in Canada (Kala ilam specialist in UK) Bangali Amil ba...
Black magic specialist in Canada (Kala ilam specialist in UK) Bangali Amil ba...
 
Certified Kala Jadu, Black magic specialist in Rawalpindi and Bangali Amil ba...
Certified Kala Jadu, Black magic specialist in Rawalpindi and Bangali Amil ba...Certified Kala Jadu, Black magic specialist in Rawalpindi and Bangali Amil ba...
Certified Kala Jadu, Black magic specialist in Rawalpindi and Bangali Amil ba...
 
Test bank for advanced assessment interpreting findings and formulating diffe...
Test bank for advanced assessment interpreting findings and formulating diffe...Test bank for advanced assessment interpreting findings and formulating diffe...
Test bank for advanced assessment interpreting findings and formulating diffe...
 
falcon-invoice-discounting-unlocking-prime-investment-opportunities
falcon-invoice-discounting-unlocking-prime-investment-opportunitiesfalcon-invoice-discounting-unlocking-prime-investment-opportunities
falcon-invoice-discounting-unlocking-prime-investment-opportunities
 
Technology industry / Finnish economic outlook
Technology industry / Finnish economic outlookTechnology industry / Finnish economic outlook
Technology industry / Finnish economic outlook
 
Economics Presentation-2.pdf xxjshshsjsjsjwjw
Economics Presentation-2.pdf xxjshshsjsjsjwjwEconomics Presentation-2.pdf xxjshshsjsjsjwjw
Economics Presentation-2.pdf xxjshshsjsjsjwjw
 
7 tips trading Deriv Accumulator Options
7 tips trading Deriv Accumulator Options7 tips trading Deriv Accumulator Options
7 tips trading Deriv Accumulator Options
 
Pension dashboards forum 1 May 2024 (1).pdf
Pension dashboards forum 1 May 2024 (1).pdfPension dashboards forum 1 May 2024 (1).pdf
Pension dashboards forum 1 May 2024 (1).pdf
 
abortion pills in Riyadh Saudi Arabia (+919707899604)cytotec pills in dammam
abortion pills in Riyadh Saudi Arabia (+919707899604)cytotec pills in dammamabortion pills in Riyadh Saudi Arabia (+919707899604)cytotec pills in dammam
abortion pills in Riyadh Saudi Arabia (+919707899604)cytotec pills in dammam
 
劳伦森大学毕业证
劳伦森大学毕业证劳伦森大学毕业证
劳伦森大学毕业证
 
uk-no 1 kala ilam expert specialist in uk and qatar kala ilam expert speciali...
uk-no 1 kala ilam expert specialist in uk and qatar kala ilam expert speciali...uk-no 1 kala ilam expert specialist in uk and qatar kala ilam expert speciali...
uk-no 1 kala ilam expert specialist in uk and qatar kala ilam expert speciali...
 
+97470301568>>buy weed in qatar,buy thc oil in qatar doha>>buy cannabis oil i...
+97470301568>>buy weed in qatar,buy thc oil in qatar doha>>buy cannabis oil i...+97470301568>>buy weed in qatar,buy thc oil in qatar doha>>buy cannabis oil i...
+97470301568>>buy weed in qatar,buy thc oil in qatar doha>>buy cannabis oil i...
 
Female Escorts Service in Hyderabad Starting with 5000/- for Savita Escorts S...
Female Escorts Service in Hyderabad Starting with 5000/- for Savita Escorts S...Female Escorts Service in Hyderabad Starting with 5000/- for Savita Escorts S...
Female Escorts Service in Hyderabad Starting with 5000/- for Savita Escorts S...
 
logistics industry development power point ppt.pdf
logistics industry development power point ppt.pdflogistics industry development power point ppt.pdf
logistics industry development power point ppt.pdf
 
Business Principles, Tools, and Techniques in Participating in Various Types...
Business Principles, Tools, and Techniques  in Participating in Various Types...Business Principles, Tools, and Techniques  in Participating in Various Types...
Business Principles, Tools, and Techniques in Participating in Various Types...
 
Q1 2024 Conference Call Presentation vF.pdf
Q1 2024 Conference Call Presentation vF.pdfQ1 2024 Conference Call Presentation vF.pdf
Q1 2024 Conference Call Presentation vF.pdf
 
Responsible Finance Principles and Implication
Responsible Finance Principles and ImplicationResponsible Finance Principles and Implication
Responsible Finance Principles and Implication
 

Multiprocessor Scheduling

  • 2. Introduction  When a computer system contains more than a single processor, several new issues are introduced into the design of scheduling functions. We will examine these issues and the details of scheduling algorithms for tightly coupled multi-processor systems.
  • 3. Classifications of Multiprocessor Systems  Loosely coupled or distributed multiprocessor, or cluster  Each processor has its own memory and I/O channels  Functionally specialized processors  Such as I/O processor  Controlled by a master processor  Tightly coupled multiprocessing  Processors share main memory  Controlled by operating system
  • 4. Interconnection Network P P P Memory disk Memory Memory disk disk Shared Nothing (Loosely Coupled) P P P Interconnection Network Global Shared Memory disk disk disk Shared Memory (Tightly Coupled) Memory Memory Memory P P P Interconnection Network disk disk disk Shared Disk
  • 5. Granularity  A good metric for characterizing multiprocessors and placing then in context with other architectures is to consider the synchronization granularity, or frequency of synchronization, between processes in a system.  Five categories of parallelism that differ in the degree of granularity can be defined: 1. Independent parallelism 2. Very coarse granularity 3. Coarse granularity 4. Medium granularity 5. Fine granularity
  • 6. Independent Parallelism  With independent parallelism there is no explicit synchronization among processes.  Each process represents a separate, independent application or job.  This type of parallelism is typical of a time-sharing system.  The multiprocessor provides the same service as a multiprogrammed uniprocessor, however, because more than one processor is available, average response times to the user tend to be less.
  • 7. Coarse and Very Coarse-Grained Parallelism  With coarse and very coarse grained parallelism, there is synchronization among processes, but at a very gross level.  This type of situation is easily handled as a set of concurrent processes running on a multi-programmed uni-processor and can be supported on a multiprocessor with little or no change to user software.  Good for concurrent processes that need to communicate or synchronize can benefit from the use of a multiprocessor architecture.  In the case of very infrequent interaction among the processes, a distributed system can provide good support. However, if the interaction is somewhat more frequent, then the overhead of communication across the network may negate some of the potential speedup. In that case, the multiprocessor organization provides the most effective support.
  • 8. Medium-Grained Parallelism  Single application is a collection of threads  Threads usually interact frequently Fine-Grained Parallelism  Highly parallel applications  Specialized and fragmented area
  • 9. Design Issues For Multiprocessor Scheduling  Scheduling on a multiprocessor involves three interrelated issues: 1. The assignment of processes to processors 2. The use of multiprogramming on individual processors 3. The actual dispatching of a process  Looking at these three issues, it is important to keep in mind that the approach taken will depend, in general, on the degree of granularity of the applications and on the number of processors available.
  • 10. 1: Assignment of Processes to Processors  Treat processors as a pooled resource and assign process to processors on demand  Permanently assign process to a processor  Known as group or gang scheduling  Dedicate short-term queue for each processor  Less overhead  Processor could be idle while another processor has a backlog  Global queue  Schedule to any available processor
  • 11. Assignment of Processes to Processors  Master/slave architecture  Key kernel functions always run on a particular processor  Master is responsible for scheduling  Slave sends service request to the master  Disadvantages  Failure of master brings down whole system  Master can become a performance bottleneck  Peer architecture  Kernel can execute on any processor  Each processor does self-scheduling  Complicates the operating system  Make sure two processors do not choose the same process
  • 12. Process Scheduling  Single queue for all processes  Multiple queues are used for priorities  All queues feed to the common pool of processors
  • 13. Multiprocessor Thread Scheduling  Executes separate from the rest of the process  An application can be a set of threads that cooperate and execute concurrently in the same address space  Load sharing  Processes are not assigned to a particular processor  Gang scheduling  A set of related threads is scheduled to run on a set of processors at the same time  Dedicated processor assignment  Threads are assigned to a specific processor  Dynamic scheduling  Number of threads can be altered during course of execution
  • 14. Load Sharing  Load is distributed evenly across the processors  No centralized scheduler required  Use global queues Disadvantages of Load Sharing  Central queue needs mutual exclusion  Preemptive threads are unlikely to resume execution on the same processor  If all threads are in the global queue, all threads of a program will not gain access to the processors at the same time
  • 15. Gang Scheduling  Simultaneous scheduling of threads that make up a single process  Useful for applications where performance severely degrades when any part of the application is not running  Threads often need to synchronize with each other
  • 16. Dedicated Processor Assignment  When application is scheduled, its threads are assigned to a processor  Some processors may be idle  No multiprogramming of processors
  • 17. Dynamic Scheduling  Number of threads in a process are altered dynamically by the application  Operating system adjust the load to improve utilization  Assign idle processors  New arrivals may be assigned to a processor that is used by a job currently using more than one processor  Hold request until processor is available  Assign processor a job in the list that currently has no processors (i.e., to all waiting new arrivals)