SlideShare una empresa de Scribd logo
1 de 4
Descargar para leer sin conexión
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

Más contenido relacionado

La actualidad más candente

Computer architecture multi processor
Computer architecture multi processorComputer architecture multi processor
Computer architecture multi processorMazin Alwaaly
 
Symmetric Multi Processor Multiprocessors
Symmetric Multi Processor MultiprocessorsSymmetric Multi Processor Multiprocessors
Symmetric Multi Processor MultiprocessorsSaad Tanvir
 
Symmetric multiprocessing (smp)
Symmetric multiprocessing (smp)Symmetric multiprocessing (smp)
Symmetric multiprocessing (smp)rayhan basher
 
Symmetric multiprocessing and Microkernel
Symmetric multiprocessing and MicrokernelSymmetric multiprocessing and Microkernel
Symmetric multiprocessing and MicrokernelManoraj Pannerselum
 
Multi Processors And Multi Computers
 Multi Processors And Multi Computers Multi Processors And Multi Computers
Multi Processors And Multi ComputersNemwos
 
Chapter 08
Chapter 08Chapter 08
Chapter 08 Google
 
Multiprocessor
MultiprocessorMultiprocessor
MultiprocessorNeel Patel
 
multi processors
multi processorsmulti processors
multi processorsAcad
 
Multiprocessor Architecture for Image Processing
Multiprocessor Architecture for Image ProcessingMultiprocessor Architecture for Image Processing
Multiprocessor Architecture for Image Processingmayank.grd
 
Multiprocessors(performance and synchronization issues)
Multiprocessors(performance and synchronization issues)Multiprocessors(performance and synchronization issues)
Multiprocessors(performance and synchronization issues)Gaurav Dalvi
 
Multiprocessor structures
Multiprocessor structuresMultiprocessor structures
Multiprocessor structuresShareb Ismaeel
 
Multivector and multiprocessor
Multivector and multiprocessorMultivector and multiprocessor
Multivector and multiprocessorKishan Panara
 
Multiprocessor Architecture (Advanced computer architecture)
Multiprocessor Architecture  (Advanced computer architecture)Multiprocessor Architecture  (Advanced computer architecture)
Multiprocessor Architecture (Advanced computer architecture)vani261
 
Multiprocessor Scheduling
Multiprocessor SchedulingMultiprocessor Scheduling
Multiprocessor SchedulingKhadija Saleem
 
Hardware Multi-Threading
Hardware Multi-ThreadingHardware Multi-Threading
Hardware Multi-Threadingbabuece
 
Introduction to Advance Computer Architecture
Introduction to Advance Computer ArchitectureIntroduction to Advance Computer Architecture
Introduction to Advance Computer Architecturebabuece
 

La actualidad más candente (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
 

Similar a Lecture24 Multiprocessor

Introduction to multi core
Introduction to multi coreIntroduction to multi core
Introduction to multi coremukul bhardwaj
 
Introduction to OS LEVEL Virtualization & Containers
Introduction to OS LEVEL Virtualization & ContainersIntroduction to OS LEVEL Virtualization & Containers
Introduction to OS LEVEL Virtualization & ContainersVaibhav Sharma
 
1 introduction
1 introduction1 introduction
1 introductionMohd Arif
 
bfarm-v2
bfarm-v2bfarm-v2
bfarm-v2Zeus G
 
Multiprocessor Scheduling
Multiprocessor SchedulingMultiprocessor Scheduling
Multiprocessor SchedulingoDesk
 
Track A-Shmuel Panijel, Windriver
Track A-Shmuel Panijel, WindriverTrack A-Shmuel Panijel, Windriver
Track A-Shmuel Panijel, Windriverchiportal
 
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 VMsHwanju Kim
 
Os Madsen Block
Os Madsen BlockOs Madsen Block
Os Madsen Blockoscon2007
 
Unix operating system basics
Unix operating system basicsUnix operating system basics
Unix operating system basicsSankar Suriya
 
Network Stack in Userspace (NUSE)
Network Stack in Userspace (NUSE)Network Stack in Userspace (NUSE)
Network Stack in Userspace (NUSE)Hajime Tazaki
 
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 FischerNETWAYS
 
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 centerNETWAYS
 
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 FischerNETWAYS
 

Similar a 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
 

Más de allankliu

NMEA Manual of SiRF-III
NMEA Manual of SiRF-IIINMEA Manual of SiRF-III
NMEA Manual of SiRF-IIIallankliu
 
Mp Os Survey
Mp Os SurveyMp Os Survey
Mp Os Surveyallankliu
 
Embedded Systems Design Embedded
Embedded Systems Design   EmbeddedEmbedded Systems Design   Embedded
Embedded Systems Design Embeddedallankliu
 
Usb In A Nutshell
Usb In A NutshellUsb In A Nutshell
Usb In A Nutshellallankliu
 
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 Exampleallankliu
 
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)allankliu
 
Usb Wp Implementing Usb
Usb Wp Implementing UsbUsb Wp Implementing Usb
Usb Wp Implementing Usballankliu
 

Más 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
 

Último

Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 

Último (20)

Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 

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