SlideShare a Scribd company logo
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 Systems
Distributed SystemsDistributed Systems
Distributed Systems
Rupsee
 
Multivector and multiprocessor
Multivector and multiprocessorMultivector and multiprocessor
Multivector and multiprocessor
Kishan Panara
 

What's hot (20)

Distributed file system
Distributed file systemDistributed file system
Distributed file system
 
Message and Stream Oriented Communication
Message and Stream Oriented CommunicationMessage and Stream Oriented Communication
Message and Stream Oriented Communication
 
Parallelism
ParallelismParallelism
Parallelism
 
6.distributed shared memory
6.distributed shared memory6.distributed shared memory
6.distributed shared memory
 
Introduction to Parallel and Distributed Computing
Introduction to Parallel and Distributed ComputingIntroduction to Parallel and Distributed Computing
Introduction to Parallel and Distributed Computing
 
Process scheduling
Process schedulingProcess scheduling
Process scheduling
 
Process synchronization in Operating Systems
Process synchronization in Operating SystemsProcess synchronization in Operating Systems
Process synchronization in Operating Systems
 
Message passing in Distributed Computing Systems
Message passing in Distributed Computing SystemsMessage passing in Distributed Computing Systems
Message passing in Distributed Computing Systems
 
CPU Scheduling Algorithms
CPU Scheduling AlgorithmsCPU Scheduling Algorithms
CPU Scheduling Algorithms
 
distributed Computing system model
distributed Computing system modeldistributed Computing system model
distributed Computing system model
 
Multi Processors And Multi Computers
 Multi Processors And Multi Computers Multi Processors And Multi Computers
Multi Processors And Multi Computers
 
Page replacement algorithms
Page replacement algorithmsPage replacement algorithms
Page replacement algorithms
 
Clock synchronization in distributed system
Clock synchronization in distributed systemClock synchronization in distributed system
Clock synchronization in distributed system
 
Distributed operating system(os)
Distributed operating system(os)Distributed operating system(os)
Distributed operating system(os)
 
Distributed Operating System_1
Distributed Operating System_1Distributed Operating System_1
Distributed Operating System_1
 
Inter Process Communication
Inter Process CommunicationInter Process Communication
Inter Process Communication
 
Distributed Systems
Distributed SystemsDistributed Systems
Distributed Systems
 
Multivector and multiprocessor
Multivector and multiprocessorMultivector and multiprocessor
Multivector and multiprocessor
 
Centralized shared memory architectures
Centralized shared memory architecturesCentralized shared memory architectures
Centralized shared memory architectures
 
Cache coherence problem and its solutions
Cache coherence problem and its solutionsCache coherence problem and its solutions
Cache coherence problem and its solutions
 

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

NO1 Uk Divorce problem uk all amil baba in karachi,lahore,pakistan talaq ka m...
NO1 Uk Divorce problem uk all amil baba in karachi,lahore,pakistan talaq ka m...NO1 Uk Divorce problem uk all amil baba in karachi,lahore,pakistan talaq ka m...
NO1 Uk Divorce problem uk all amil baba in karachi,lahore,pakistan talaq ka m...
Amil Baba Dawood bangali
 
一比一原版Adelaide毕业证阿德莱德大学毕业证成绩单如何办理
一比一原版Adelaide毕业证阿德莱德大学毕业证成绩单如何办理一比一原版Adelaide毕业证阿德莱德大学毕业证成绩单如何办理
一比一原版Adelaide毕业证阿德莱德大学毕业证成绩单如何办理
zsewypy
 
USDA Loans in California: A Comprehensive Overview.pptx
USDA Loans in California: A Comprehensive Overview.pptxUSDA Loans in California: A Comprehensive Overview.pptx
USDA Loans in California: A Comprehensive Overview.pptx
marketing367770
 
what is the future of Pi Network currency.
what is the future of Pi Network currency.what is the future of Pi Network currency.
what is the future of Pi Network currency.
DOT TECH
 
Latino Buying Power - May 2024 Presentation for Latino Caucus
Latino Buying Power - May 2024 Presentation for Latino CaucusLatino Buying Power - May 2024 Presentation for Latino Caucus
Latino Buying Power - May 2024 Presentation for Latino Caucus
Danay Escanaverino
 
Introduction to Economics II Chapter 28 Unemployment (1).pdf
Introduction to Economics II Chapter 28 Unemployment (1).pdfIntroduction to Economics II Chapter 28 Unemployment (1).pdf
Introduction to Economics II Chapter 28 Unemployment (1).pdf
Safa444074
 
Monthly Economic Monitoring of Ukraine No. 232, May 2024
Monthly Economic Monitoring of Ukraine No. 232, May 2024Monthly Economic Monitoring of Ukraine No. 232, May 2024

Recently uploaded (20)

NO1 Uk Divorce problem uk all amil baba in karachi,lahore,pakistan talaq ka m...
NO1 Uk Divorce problem uk all amil baba in karachi,lahore,pakistan talaq ka m...NO1 Uk Divorce problem uk all amil baba in karachi,lahore,pakistan talaq ka m...
NO1 Uk Divorce problem uk all amil baba in karachi,lahore,pakistan talaq ka m...
 
The new type of smart, sustainable entrepreneurship and the next day | Europe...
The new type of smart, sustainable entrepreneurship and the next day | Europe...The new type of smart, sustainable entrepreneurship and the next day | Europe...
The new type of smart, sustainable entrepreneurship and the next day | Europe...
 
how can i use my minded pi coins I need some funds.
how can i use my minded pi coins I need some funds.how can i use my minded pi coins I need some funds.
how can i use my minded pi coins I need some funds.
 
Bitcoin Masterclass TechweekNZ v3.1.pptx
Bitcoin Masterclass TechweekNZ v3.1.pptxBitcoin Masterclass TechweekNZ v3.1.pptx
Bitcoin Masterclass TechweekNZ v3.1.pptx
 
一比一原版Adelaide毕业证阿德莱德大学毕业证成绩单如何办理
一比一原版Adelaide毕业证阿德莱德大学毕业证成绩单如何办理一比一原版Adelaide毕业证阿德莱德大学毕业证成绩单如何办理
一比一原版Adelaide毕业证阿德莱德大学毕业证成绩单如何办理
 
USDA Loans in California: A Comprehensive Overview.pptx
USDA Loans in California: A Comprehensive Overview.pptxUSDA Loans in California: A Comprehensive Overview.pptx
USDA Loans in California: A Comprehensive Overview.pptx
 
how can i trade pi coins for Bitcoin easily.
how can i trade pi coins for Bitcoin easily.how can i trade pi coins for Bitcoin easily.
how can i trade pi coins for Bitcoin easily.
 
where can I purchase things with pi coins online
where can I purchase things with pi coins onlinewhere can I purchase things with pi coins online
where can I purchase things with pi coins online
 
Falcon Invoice Discounting: Optimizing Returns with Minimal Risk
Falcon Invoice Discounting: Optimizing Returns with Minimal RiskFalcon Invoice Discounting: Optimizing Returns with Minimal Risk
Falcon Invoice Discounting: Optimizing Returns with Minimal Risk
 
how can I sell/buy bulk pi coins securely
how can I sell/buy bulk pi coins securelyhow can I sell/buy bulk pi coins securely
how can I sell/buy bulk pi coins securely
 
when officially can i withdraw my pi Network coins.
when officially can i withdraw my pi Network coins.when officially can i withdraw my pi Network coins.
when officially can i withdraw my pi Network coins.
 
what is the future of Pi Network currency.
what is the future of Pi Network currency.what is the future of Pi Network currency.
what is the future of Pi Network currency.
 
Empowering the Unbanked: The Vital Role of NBFCs in Promoting Financial Inclu...
Empowering the Unbanked: The Vital Role of NBFCs in Promoting Financial Inclu...Empowering the Unbanked: The Vital Role of NBFCs in Promoting Financial Inclu...
Empowering the Unbanked: The Vital Role of NBFCs in Promoting Financial Inclu...
 
Can a Pi network coin ever be sold out: I am ready to sell mine.
Can a Pi network coin ever be sold out: I am ready to sell mine.Can a Pi network coin ever be sold out: I am ready to sell mine.
Can a Pi network coin ever be sold out: I am ready to sell mine.
 
Latino Buying Power - May 2024 Presentation for Latino Caucus
Latino Buying Power - May 2024 Presentation for Latino CaucusLatino Buying Power - May 2024 Presentation for Latino Caucus
Latino Buying Power - May 2024 Presentation for Latino Caucus
 
Economics and Economic reasoning Chap. 1
Economics and Economic reasoning Chap. 1Economics and Economic reasoning Chap. 1
Economics and Economic reasoning Chap. 1
 
Introduction to Economics II Chapter 28 Unemployment (1).pdf
Introduction to Economics II Chapter 28 Unemployment (1).pdfIntroduction to Economics II Chapter 28 Unemployment (1).pdf
Introduction to Economics II Chapter 28 Unemployment (1).pdf
 
Jio Financial service Multibagger 2024 from India stock Market
Jio Financial service  Multibagger 2024 from India stock MarketJio Financial service  Multibagger 2024 from India stock Market
Jio Financial service Multibagger 2024 from India stock Market
 
how to sell pi coins in Canada, Uk and Australia
how to sell pi coins in Canada, Uk and Australiahow to sell pi coins in Canada, Uk and Australia
how to sell pi coins in Canada, Uk and Australia
 
Monthly Economic Monitoring of Ukraine No. 232, May 2024
Monthly Economic Monitoring of Ukraine No. 232, May 2024Monthly Economic Monitoring of Ukraine No. 232, May 2024
Monthly Economic Monitoring of Ukraine No. 232, May 2024
 

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)