Docsity

Multiprocessor - Operating Systems and Architecture - Lecture Slides, Slides of Computer Science

Partial preview of the text

Download Multiprocessor - Operating Systems and Architecture - Lecture Slides and more Slides Computer Science in PDF only on Docsity!

1

Multiprocessor and Real-Time

Scheduling

Chapter 10

2

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

Coarse and Very Coarse-

Grained Parallelism

  • Synchronization among processes at a very gross level
  • Good for concurrent processes running on a multiprogrammed uniprocessor - Can by supported on a multiprocessor with little change

5

Medium-Grained Parallelism

  • Single application is a collection of threads
  • Threads usually interact frequently

7

Scheduling

  • Assignment of processes to processors
  • Use of multiprogramming on individual processors
  • Actual dispatching of a process

8

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

10

Assignment of Processes to

Processors

  • Peer architecture
    • Operating system can execute on any processor
    • Each processor does self-scheduling
    • Complicates the operating system
      • Make sure two processors do not choose the same process

11

13

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
  • Threads running on separate processors yields a dramatic gain in performance

14

Multiprocessor Thread

Scheduling

  • 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

16

Load Sharing

  • Load is distributed evenly across the processors
  • No centralized scheduler required
  • Use global queues

17

Disadvantages of Load

Sharing

  • Central queue needs mutual exclusion
    • May be a bottleneck when more than one processor looks for work at the same time
  • Preemptive threads are unlikely resume execution on the same processor - Cache use is less efficient
  • If all threads are in the global queue, all threads of a program will not gain access to the processors at the same time

19

Scheduling Groups

20

Dedicated Processor

Assignment

  • When application is scheduled, its threads are assigned to a processor
  • Some processors may be idle
  • No multiprogramming of processors