SlideShare une entreprise Scribd logo
1  sur  4
Télécharger pour lire hors ligne
Comparisons on OS
                                                                          Extension/Customization
                    Multiprocessor OS                                         Approaches
                                                                                      Exokernel
                                                                                      Downloading code into the kernel
                                                                                      The graybox approach
                                                                                      OS configuration
                                                                                      Virtual machine

                    CS 256/456                                                Comparison on
                                                                                      flexibility
 Dept. of Computer Science, University of Rochester
                                                                                      how much changes in the original OS?
                                                                                      overall simplicity
                                                                                      overhead of each customization/extension

4/18/2005                  CSC 256/456 - Spring 2005                  1   4/18/2005                   CSC 256/456 - Spring 2005       2




Multiprocessor Hardware                                                   Multiprocessor Applications
   A computer system in which two or more CPUs share full
   access to the main memory                                                 Multiprogramming
   Each CPU might have its own cache and the coherence                           Multiple regular applications running concurrently
   among multiple cache is maintained
       Write operation by a CPU is visible to all other CPUs                 Concurrent servers
       writes to the same location is seen in the same order by all              Web servers, … …
       CPUs (also called write serialization)
                                                                             Parallel programs
            CPU             CPU                         CPU                      Utilizing multiple processors to complete one task
                                           ………
            Cache          Cache                        Cache                    Strong synchronization




                                Memory

4/18/2005                  CSC 256/456 - Spring 2005                  3   4/18/2005                   CSC 256/456 - Spring 2005       4
Single-processor OS vs. Multi-processor OS                           Multiprocessor OS
   Single-processor OS
       easier to support kernel synchronization – why?
       easier to perform scheduling – less complex.

   Multi-processor OS
       OS structure
       synchronization                                                                            Bus
       scheduling
                                                                        Each CPU has its own operating system
                                                                            quick to port from a single-processor OS
                                                                        Disadvantages
                                                                            difficult to share things (processing cycles, memory, buffer
                                                                            cache)


4/18/2005                  CSC 256/456 - Spring 2005             5   4/18/2005                  CSC 256/456 - Spring 2005                    6




Multiprocessor OS – Master/Slave                                     Multiprocessor OS – Shared OS




                            Bus

                                                                                                  Bus
   All operating system functionality goes to one CPU
       no multiprocessor concurrency in the kernel                      All CPUs run a single OS instance
   Disadvantage                                                         The OS itself must handle multiprocessor synchronization
       OS CPU consumption may be large so the OS CPU becomes                have a big kernel lock – only one processor can execute in the
       the bottleneck (especially in a machine with many CPUs)              kernel at a time
                                                                            support fine-grain synchronization

4/18/2005                  CSC 256/456 - Spring 2005             7   4/18/2005                  CSC 256/456 - Spring 2005                    8
Multiprocessor Kernel Synchronization                                          TSL on Multiprocessor
  Protecting short critical region – busy waiting is OK
    Disabling interrupts does not work
    Software spin locks
    Hardware spin locks
            using TSL

entry_section:
   TSL R1, LOCK          |   copy lock to R1 and set lock to 1
   CMP R1, #0            |   was lock zero?
   JNE entry_section     |   if it wasn’t zero, lock was set, so loop
   RET                   |   return; critical section entered

exit_section:                                                                On multiprocessor, the TSL implementation is more complex, usually
   MOV LOCK, #0          | store 0 into lock
                                                                                                 it has to lock the memory bus
   RET                   | return; out of critical section



4/18/2005                    CSC 256/456 - Spring 2005                   9      4/18/2005                  CSC 256/456 - Spring 2005          10




More on TSL Locks                                                              Spin or Yield?
  Every TSL is a read/write, image multiple CPUs are busy                            Multi-processor synchronization.
  waiting on one block, there will be a lot of traffic on the bus                           A process is waiting for an event, triggered by
                                                                                            another process.
            CPU              CPU                         CPU
                                           ………                                              Spinning wastes CPU cycles
        Cache            Cache                           Cache
                                                                                            Switching also uses up CPU cycles
                                                                                            Should it spin wait or yield the processor?
                                Memory


  Precede each TSL lock will a trylock (basically a simple read)
      only when trylock shows the lock is not locked, a TSL lock will
      be applied


4/18/2005                    CSC 256/456 - Spring 2005                  11      4/18/2005                  CSC 256/456 - Spring 2005          12
Multiprocessor Scheduling                                                   Disclaimer
      Timesharing
            using a single wait queue (protected by synchronization)            Parts of the lecture slides contain original work by
            for scheduling                                                      Andrew S. Tanenbaum. The slides are intended for the
                                                                                sole purpose of instruction of operating systems at the
                                                                                University of Rochester. All copyrighted materials
      cache affinity
                                                                                belong to their original owner(s).
            affinity-based scheduling

      synchronization of parallel programs
            gang scheduling




4/18/2005                     CSC 256/456 - Spring 2005                13   4/18/2005               CSC 256/456 - Spring 2005             14

Contenu connexe

Tendances

Chapter 08
Chapter 08Chapter 08
Chapter 08
Google
 
Multivector and multiprocessor
Multivector and multiprocessorMultivector and multiprocessor
Multivector and multiprocessor
Kishan Panara
 

Tendances (20)

Computer architecture multi processor
Computer architecture multi processorComputer architecture multi processor
Computer architecture multi processor
 
Symmetric Multi Processor Multiprocessors
Symmetric Multi Processor MultiprocessorsSymmetric Multi Processor Multiprocessors
Symmetric Multi Processor Multiprocessors
 
Symmetric multiprocessing
Symmetric multiprocessingSymmetric multiprocessing
Symmetric multiprocessing
 
Symmetric multiprocessing (smp)
Symmetric multiprocessing (smp)Symmetric multiprocessing (smp)
Symmetric multiprocessing (smp)
 
Symmetric multiprocessing and Microkernel
Symmetric multiprocessing and MicrokernelSymmetric multiprocessing and Microkernel
Symmetric multiprocessing and Microkernel
 
Multi Processors And Multi Computers
 Multi Processors And Multi Computers Multi Processors And Multi Computers
Multi Processors And Multi Computers
 
Chapter 08
Chapter 08Chapter 08
Chapter 08
 
Multiprocessor
MultiprocessorMultiprocessor
Multiprocessor
 
multi processors
multi processorsmulti processors
multi processors
 
13. multiprocessing
13. multiprocessing13. multiprocessing
13. multiprocessing
 
Multiprocessor Architecture for Image Processing
Multiprocessor Architecture for Image ProcessingMultiprocessor Architecture for Image Processing
Multiprocessor Architecture for Image Processing
 
Multiprocessors(performance and synchronization issues)
Multiprocessors(performance and synchronization issues)Multiprocessors(performance and synchronization issues)
Multiprocessors(performance and synchronization issues)
 
Multiprocessor
MultiprocessorMultiprocessor
Multiprocessor
 
Multiprocessor structures
Multiprocessor structuresMultiprocessor structures
Multiprocessor structures
 
Multivector and multiprocessor
Multivector and multiprocessorMultivector and multiprocessor
Multivector and multiprocessor
 
Multiprocessor Architecture (Advanced computer architecture)
Multiprocessor Architecture  (Advanced computer architecture)Multiprocessor Architecture  (Advanced computer architecture)
Multiprocessor Architecture (Advanced computer architecture)
 
Multiprocessor Scheduling
Multiprocessor SchedulingMultiprocessor Scheduling
Multiprocessor Scheduling
 
Multi processor
Multi processorMulti processor
Multi processor
 
Hardware Multi-Threading
Hardware Multi-ThreadingHardware Multi-Threading
Hardware Multi-Threading
 
Introduction to Advance Computer Architecture
Introduction to Advance Computer ArchitectureIntroduction to Advance Computer Architecture
Introduction to Advance Computer Architecture
 

Similaire à Lecture24 Multiprocessor

Introduction to multi core
Introduction to multi coreIntroduction to multi core
Introduction to multi core
mukul bhardwaj
 
1 introduction
1 introduction1 introduction
1 introduction
Mohd Arif
 
bfarm-v2
bfarm-v2bfarm-v2
bfarm-v2
Zeus G
 
Track A-Shmuel Panijel, Windriver
Track A-Shmuel Panijel, WindriverTrack A-Shmuel Panijel, Windriver
Track A-Shmuel Panijel, Windriver
chiportal
 
Os Madsen Block
Os Madsen BlockOs Madsen Block
Os Madsen Block
oscon2007
 

Similaire à Lecture24 Multiprocessor (20)

Introduction to multi core
Introduction to multi coreIntroduction to multi core
Introduction to multi core
 
Introduction to OS LEVEL Virtualization & Containers
Introduction to OS LEVEL Virtualization & ContainersIntroduction to OS LEVEL Virtualization & Containers
Introduction to OS LEVEL Virtualization & Containers
 
1 introduction
1 introduction1 introduction
1 introduction
 
bfarm-v2
bfarm-v2bfarm-v2
bfarm-v2
 
Multiprocessor Scheduling
Multiprocessor SchedulingMultiprocessor Scheduling
Multiprocessor Scheduling
 
Ecoz presentation
Ecoz presentationEcoz presentation
Ecoz presentation
 
In a monolithic kernel
In a monolithic kernelIn a monolithic kernel
In a monolithic kernel
 
Track A-Shmuel Panijel, Windriver
Track A-Shmuel Panijel, WindriverTrack A-Shmuel Panijel, Windriver
Track A-Shmuel Panijel, Windriver
 
Demand-Based Coordinated Scheduling for SMP VMs
Demand-Based Coordinated Scheduling for SMP VMsDemand-Based Coordinated Scheduling for SMP VMs
Demand-Based Coordinated Scheduling for SMP VMs
 
Os Madsen Block
Os Madsen BlockOs Madsen Block
Os Madsen Block
 
Unix operating system basics
Unix operating system basicsUnix operating system basics
Unix operating system basics
 
Factored Operating Systems paper review
Factored Operating Systems paper reviewFactored Operating Systems paper review
Factored Operating Systems paper review
 
IEEExeonmem
IEEExeonmemIEEExeonmem
IEEExeonmem
 
PROSE
PROSEPROSE
PROSE
 
Factored operating systems
Factored operating systemsFactored operating systems
Factored operating systems
 
Network Stack in Userspace (NUSE)
Network Stack in Userspace (NUSE)Network Stack in Userspace (NUSE)
Network Stack in Userspace (NUSE)
 
OSDC 2017 | Open POWER for the data center by Werner Fischer
OSDC 2017 | Open POWER for the data center by Werner FischerOSDC 2017 | Open POWER for the data center by Werner Fischer
OSDC 2017 | Open POWER for the data center by Werner Fischer
 
OSDC 2017 - Werner Fischer - Open power for the data center
OSDC 2017 - Werner Fischer - Open power for the data centerOSDC 2017 - Werner Fischer - Open power for the data center
OSDC 2017 - Werner Fischer - Open power for the data center
 
OSDC 2017 | Linux Performance Profiling and Monitoring by Werner Fischer
OSDC 2017 | Linux Performance Profiling and Monitoring by Werner FischerOSDC 2017 | Linux Performance Profiling and Monitoring by Werner Fischer
OSDC 2017 | Linux Performance Profiling and Monitoring by Werner Fischer
 
Multi-Core on Chip Architecture *doc - IK
Multi-Core on Chip Architecture *doc - IKMulti-Core on Chip Architecture *doc - IK
Multi-Core on Chip Architecture *doc - IK
 

Plus de allankliu (8)

NMEA Manual of SiRF-III
NMEA Manual of SiRF-IIINMEA Manual of SiRF-III
NMEA Manual of SiRF-III
 
Mp Os Survey
Mp Os SurveyMp Os Survey
Mp Os Survey
 
Embedded Systems Design Embedded
Embedded Systems Design   EmbeddedEmbedded Systems Design   Embedded
Embedded Systems Design Embedded
 
Usb In A Nutshell
Usb In A NutshellUsb In A Nutshell
Usb In A Nutshell
 
Pdiusbd11
Pdiusbd11Pdiusbd11
Pdiusbd11
 
Usb Multi Role Device Design By Example
Usb Multi Role Device Design By ExampleUsb Multi Role Device Design By Example
Usb Multi Role Device Design By Example
 
Design Of A Usb Device Driver (Overview)
Design Of A Usb Device Driver (Overview)Design Of A Usb Device Driver (Overview)
Design Of A Usb Device Driver (Overview)
 
Usb Wp Implementing Usb
Usb Wp Implementing UsbUsb Wp Implementing Usb
Usb Wp Implementing Usb
 

Dernier

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Dernier (20)

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 

Lecture24 Multiprocessor

  • 1. Comparisons on OS Extension/Customization Multiprocessor OS Approaches Exokernel Downloading code into the kernel The graybox approach OS configuration Virtual machine CS 256/456 Comparison on flexibility Dept. of Computer Science, University of Rochester how much changes in the original OS? overall simplicity overhead of each customization/extension 4/18/2005 CSC 256/456 - Spring 2005 1 4/18/2005 CSC 256/456 - Spring 2005 2 Multiprocessor Hardware Multiprocessor Applications A computer system in which two or more CPUs share full access to the main memory Multiprogramming Each CPU might have its own cache and the coherence Multiple regular applications running concurrently among multiple cache is maintained Write operation by a CPU is visible to all other CPUs Concurrent servers writes to the same location is seen in the same order by all Web servers, … … CPUs (also called write serialization) Parallel programs CPU CPU CPU Utilizing multiple processors to complete one task ……… Cache Cache Cache Strong synchronization Memory 4/18/2005 CSC 256/456 - Spring 2005 3 4/18/2005 CSC 256/456 - Spring 2005 4
  • 2. Single-processor OS vs. Multi-processor OS Multiprocessor OS Single-processor OS easier to support kernel synchronization – why? easier to perform scheduling – less complex. Multi-processor OS OS structure synchronization Bus scheduling Each CPU has its own operating system quick to port from a single-processor OS Disadvantages difficult to share things (processing cycles, memory, buffer cache) 4/18/2005 CSC 256/456 - Spring 2005 5 4/18/2005 CSC 256/456 - Spring 2005 6 Multiprocessor OS – Master/Slave Multiprocessor OS – Shared OS Bus Bus All operating system functionality goes to one CPU no multiprocessor concurrency in the kernel All CPUs run a single OS instance Disadvantage The OS itself must handle multiprocessor synchronization OS CPU consumption may be large so the OS CPU becomes have a big kernel lock – only one processor can execute in the the bottleneck (especially in a machine with many CPUs) kernel at a time support fine-grain synchronization 4/18/2005 CSC 256/456 - Spring 2005 7 4/18/2005 CSC 256/456 - Spring 2005 8
  • 3. Multiprocessor Kernel Synchronization TSL on Multiprocessor Protecting short critical region – busy waiting is OK Disabling interrupts does not work Software spin locks Hardware spin locks using TSL entry_section: TSL R1, LOCK | copy lock to R1 and set lock to 1 CMP R1, #0 | was lock zero? JNE entry_section | if it wasn’t zero, lock was set, so loop RET | return; critical section entered exit_section: On multiprocessor, the TSL implementation is more complex, usually MOV LOCK, #0 | store 0 into lock it has to lock the memory bus RET | return; out of critical section 4/18/2005 CSC 256/456 - Spring 2005 9 4/18/2005 CSC 256/456 - Spring 2005 10 More on TSL Locks Spin or Yield? Every TSL is a read/write, image multiple CPUs are busy Multi-processor synchronization. waiting on one block, there will be a lot of traffic on the bus A process is waiting for an event, triggered by another process. CPU CPU CPU ……… Spinning wastes CPU cycles Cache Cache Cache Switching also uses up CPU cycles Should it spin wait or yield the processor? Memory Precede each TSL lock will a trylock (basically a simple read) only when trylock shows the lock is not locked, a TSL lock will be applied 4/18/2005 CSC 256/456 - Spring 2005 11 4/18/2005 CSC 256/456 - Spring 2005 12
  • 4. Multiprocessor Scheduling Disclaimer Timesharing using a single wait queue (protected by synchronization) Parts of the lecture slides contain original work by for scheduling Andrew S. Tanenbaum. The slides are intended for the sole purpose of instruction of operating systems at the University of Rochester. All copyrighted materials cache affinity belong to their original owner(s). affinity-based scheduling synchronization of parallel programs gang scheduling 4/18/2005 CSC 256/456 - Spring 2005 13 4/18/2005 CSC 256/456 - Spring 2005 14