SlideShare a Scribd company logo
Unit VI Multiprocessors
by:
Er. Dipesh Vaya
Head & Asst. Prof.
Department of CSE
SSCE, Udaipur, Rajasthan
Contents
 Characteristics of Multiprocessors
 Interconnection Structure
 Interprocessor Arbitration
 Interprocessor Communication and Synchronization
Cache Coherence
 Shared Memory Multiprocessors
SS College of Engineering, Udaipur, Rajasthan 2
Cache Coherence
(Coherence : the quality of being logical and consistent.)
by:
Er. Dipesh Vaya
Head & Asst. Prof.
Department of CSE
SSCE, Udaipur, Rajasthan
SS College of Engineering, Udaipur, Rajasthan
3
Introduction
 The primary advantage of cache is its ability to reduce the average
access time in uniprocessors.
 When the processor finds a word in cache during a read operation, the
main memory is not involved in the transfer.
 If the operation is to write, there are two commonly used procedures to
update memory.
 In the write-through policy, both cache and main memory are updated with every
write operation.
 In the write-back policy, only the cache is updated and the location is marked so
that it can be copied later into main memory.
SS College of Engineering, Udaipur, Rajasthan 4
Introduction(cont.)
 The same information may reside in a number
of copies in some caches and main memory.
 To ensure the ability of the system to execute
memory operations correctly, the multiple
copies must be kept identical. This requirement
imposes a cache coherence problem.
 A memory scheme is coherent if the value
returned on a load instruction is always the
value given by the latest store instruction with
the same address.
SS College of Engineering, Udaipur, Rajasthan 5
Conditions for incoherence
 To illustrate the problem, consider the three-processor configuration
with private caches shown in Fig. 1.
 The load on X to the three processors results in consistent copies in the caches and
main memory.
 If one of the processors performs a store to X, the copies of X in the
caches become inconsistent.
 Depending on the memory update policy used in the cache, the main
memory may also be inconsistent with respect to the cache. This is
shown in Fig. 2.
 Another configuration that may cause consistency problems is a direct
memory access (DMA) activity in conjunction with an IOP connected
to the system bus.
 In the case of input, the DMA may modify locations in main memory that also
reside in cache without updating the cache.
 During a DMA output, memory locations may be read before they are updated
from the cache when using a write-back policy.
SS College of Engineering, Udaipur, Rajasthan 6
Cache configuration after a load on X Fig. 1
X=52
X=52 X=52 X=52
P1 P2 P3
Bus
Main memory
Caches
Processors
SS College of Engineering, Udaipur, Rajasthan 7
With write-through cache policy Fig. 2
X=120
X=120 X=52 X=52
P1 P2 P3
Bus
Main memory
Caches
Processors
Cache configuration after a store to X by processor P1
SS College of Engineering, Udaipur, Rajasthan 8
With write-back cache policy
X=52
X=120 X=52 X=52
P1 P2 P3
Bus
Main memory
Caches
Processors
Cache configuration after a store to X by processor P1
SS College of Engineering, Udaipur, Rajasthan 9
Solutions to the cache coherence problem
 A simple scheme is to disallow private caches for each processor and
have a shared cache memory associated with main memory.
 This method violates the principle of closeness of CPU to cache and increases the average
memory access time.
 One scheme that has been used allows only nonshared and read-only
data to be stored in caches. Such items are called cachable. Shared
writable data are noncachable.
 This method restricts the type of data stored in caches and introduces an extra software
overhead that may degrade performance.
SS College of Engineering, Udaipur, Rajasthan 10
Solutions to the cache coherence problem(cont.)
 A scheme that allows writable data to exist in at least
one cache is a method that employs a centralized global
table in its compiler.
 The status of memory blocks is stored in the central global table.
 Each block is identified as read-only (RO) or read and write (RW)
 Hardware-only solutions are handled by the hardware
automatically and have the advantage of higher speed
and program transparency.
 In the hardware solution, the cache controller is specially
designed to allow it to monitor all bus requests from
CPUs and IOPs.
 The bus controller that monitors this action is referred to
as a snoopy cache controller.
SS College of Engineering, Udaipur, Rajasthan
11
Solutions to the cache coherence
problem(cont.)
 The local snoopy controllers in all other caches check their memory to determine if
they have a copy of the word that has been overwritten.
 If a copy exists in a remote cache, that location is marked invalid.
SS College of Engineering, Udaipur, Rajasthan 12

More Related Content

What's hot

Symmetric multiprocessing (smp)
Symmetric multiprocessing (smp)Symmetric multiprocessing (smp)
Symmetric multiprocessing (smp)
rayhan basher
 
Input/Output System (Part 2)
Input/Output System (Part 2) Input/Output System (Part 2)
Input/Output System (Part 2)
Ajeng Savitri
 
151 A SURVEY OF DIFFERENT APPROACHES FOR OVERCOMING THE PROCESSOR-MEMORY BOTT...
151 A SURVEY OF DIFFERENT APPROACHES FOR OVERCOMING THE PROCESSOR-MEMORY BOTT...151 A SURVEY OF DIFFERENT APPROACHES FOR OVERCOMING THE PROCESSOR-MEMORY BOTT...
151 A SURVEY OF DIFFERENT APPROACHES FOR OVERCOMING THE PROCESSOR-MEMORY BOTT...
ijcsit
 
Interleaved memory
Interleaved memoryInterleaved memory
Interleaved memory
ashishgy
 
Bus System
Bus SystemBus System
Bus System
Ajeng Savitri
 
Memory (Part 3)
Memory (Part 3)Memory (Part 3)
Memory (Part 3)
Ajeng Savitri
 
Input/Output System
Input/Output System Input/Output System
Input/Output System
Ajeng Savitri
 
multiprocessors and multicomputers
 multiprocessors and multicomputers multiprocessors and multicomputers
multiprocessors and multicomputers
Pankaj Kumar Jain
 
Memory Organization of a Computer System
Memory Organization of a Computer SystemMemory Organization of a Computer System
Memory Organization of a Computer System
Taminul Islam
 
Memory Hierarchy
Memory HierarchyMemory Hierarchy
Memory Hierarchy
Trinity Dwarka
 
Memory Reference Instructions | Computer Science
Memory Reference Instructions | Computer ScienceMemory Reference Instructions | Computer Science
Memory Reference Instructions | Computer Science
Transweb Global Inc
 
Os concepts 3 I/O and storage Basics
Os concepts 3 I/O and storage BasicsOs concepts 3 I/O and storage Basics
Os concepts 3 I/O and storage Basics
Vaibhav Khanna
 
Terminologies Used In Big data Environments,G.Sumithra,II-M.sc(computer scien...
Terminologies Used In Big data Environments,G.Sumithra,II-M.sc(computer scien...Terminologies Used In Big data Environments,G.Sumithra,II-M.sc(computer scien...
Terminologies Used In Big data Environments,G.Sumithra,II-M.sc(computer scien...
sumithragunasekaran
 
Describr the features of pentium microppr
Describr the features of pentium micropprDescribr the features of pentium microppr
Describr the features of pentium microppr
edwardkiwalabye1
 
Memory organisation ppt final presentation
Memory organisation ppt final presentationMemory organisation ppt final presentation
Memory organisation ppt final presentation
rockymani
 
Memory hierarchy
Memory hierarchyMemory hierarchy
Memory hierarchy
Anurag Verma
 
Memory Organization
Memory OrganizationMemory Organization
Memory Organization
Acad
 
A451 introduction to cpu (2-12)
A451   introduction to cpu (2-12)A451   introduction to cpu (2-12)
A451 introduction to cpu (2-12)wardjo
 

What's hot (20)

Symmetric multiprocessing (smp)
Symmetric multiprocessing (smp)Symmetric multiprocessing (smp)
Symmetric multiprocessing (smp)
 
Input/Output System (Part 2)
Input/Output System (Part 2) Input/Output System (Part 2)
Input/Output System (Part 2)
 
151 A SURVEY OF DIFFERENT APPROACHES FOR OVERCOMING THE PROCESSOR-MEMORY BOTT...
151 A SURVEY OF DIFFERENT APPROACHES FOR OVERCOMING THE PROCESSOR-MEMORY BOTT...151 A SURVEY OF DIFFERENT APPROACHES FOR OVERCOMING THE PROCESSOR-MEMORY BOTT...
151 A SURVEY OF DIFFERENT APPROACHES FOR OVERCOMING THE PROCESSOR-MEMORY BOTT...
 
Interleaved memory
Interleaved memoryInterleaved memory
Interleaved memory
 
Bus System
Bus SystemBus System
Bus System
 
Memory (Part 3)
Memory (Part 3)Memory (Part 3)
Memory (Part 3)
 
Input/Output System
Input/Output System Input/Output System
Input/Output System
 
Memory organization
Memory organizationMemory organization
Memory organization
 
multiprocessors and multicomputers
 multiprocessors and multicomputers multiprocessors and multicomputers
multiprocessors and multicomputers
 
Memory Organization of a Computer System
Memory Organization of a Computer SystemMemory Organization of a Computer System
Memory Organization of a Computer System
 
Memory Hierarchy
Memory HierarchyMemory Hierarchy
Memory Hierarchy
 
Memory Reference Instructions | Computer Science
Memory Reference Instructions | Computer ScienceMemory Reference Instructions | Computer Science
Memory Reference Instructions | Computer Science
 
Os concepts 3 I/O and storage Basics
Os concepts 3 I/O and storage BasicsOs concepts 3 I/O and storage Basics
Os concepts 3 I/O and storage Basics
 
Memory hierarchy
Memory hierarchyMemory hierarchy
Memory hierarchy
 
Terminologies Used In Big data Environments,G.Sumithra,II-M.sc(computer scien...
Terminologies Used In Big data Environments,G.Sumithra,II-M.sc(computer scien...Terminologies Used In Big data Environments,G.Sumithra,II-M.sc(computer scien...
Terminologies Used In Big data Environments,G.Sumithra,II-M.sc(computer scien...
 
Describr the features of pentium microppr
Describr the features of pentium micropprDescribr the features of pentium microppr
Describr the features of pentium microppr
 
Memory organisation ppt final presentation
Memory organisation ppt final presentationMemory organisation ppt final presentation
Memory organisation ppt final presentation
 
Memory hierarchy
Memory hierarchyMemory hierarchy
Memory hierarchy
 
Memory Organization
Memory OrganizationMemory Organization
Memory Organization
 
A451 introduction to cpu (2-12)
A451   introduction to cpu (2-12)A451   introduction to cpu (2-12)
A451 introduction to cpu (2-12)
 

Similar to Unit 6 cache coherence

Cache memory
Cache memoryCache memory
Cache memory
Eklavya Gupta
 
Operating Systems - memory management
Operating Systems - memory managementOperating Systems - memory management
Operating Systems - memory management
Mukesh Chinta
 
International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)
IJERD Editor
 
Cache Memory
Cache MemoryCache Memory
Cache Memory
Subid Biswas
 
cachememory-210517060741 (1).pdf
cachememory-210517060741 (1).pdfcachememory-210517060741 (1).pdf
cachememory-210517060741 (1).pdf
OmGadekar2
 
Cache memory
Cache memoryCache memory
Cache memoryAnuj Modi
 
Memory consistency models
Memory consistency modelsMemory consistency models
Memory consistency models
palani kumar
 
OS Unit 2.pptx
OS Unit 2.pptxOS Unit 2.pptx
OS Unit 2.pptx
GautamBorana
 
DESIGNED DYNAMIC SEGMENTED LRU AND MODIFIED MOESI PROTOCOL FOR RING CONNECTED...
DESIGNED DYNAMIC SEGMENTED LRU AND MODIFIED MOESI PROTOCOL FOR RING CONNECTED...DESIGNED DYNAMIC SEGMENTED LRU AND MODIFIED MOESI PROTOCOL FOR RING CONNECTED...
DESIGNED DYNAMIC SEGMENTED LRU AND MODIFIED MOESI PROTOCOL FOR RING CONNECTED...
Ilango Jeyasubramanian
 
E24099025李宇洋_專題報告.pdf
E24099025李宇洋_專題報告.pdfE24099025李宇洋_專題報告.pdf
E24099025李宇洋_專題報告.pdf
KerzPAry137
 
Aca lab project (rohit malav)
Aca lab project (rohit malav) Aca lab project (rohit malav)
Aca lab project (rohit malav)
Rohit malav
 
OS Memory Management
OS Memory ManagementOS Memory Management
OS Memory Management
anand hd
 
THE EFFECTIVE WAY OF PROCESSOR PERFORMANCE ENHANCEMENT BY PROPER BRANCH HANDL...
THE EFFECTIVE WAY OF PROCESSOR PERFORMANCE ENHANCEMENT BY PROPER BRANCH HANDL...THE EFFECTIVE WAY OF PROCESSOR PERFORMANCE ENHANCEMENT BY PROPER BRANCH HANDL...
THE EFFECTIVE WAY OF PROCESSOR PERFORMANCE ENHANCEMENT BY PROPER BRANCH HANDL...
cscpconf
 
The effective way of processor performance enhancement by proper branch handling
The effective way of processor performance enhancement by proper branch handlingThe effective way of processor performance enhancement by proper branch handling
The effective way of processor performance enhancement by proper branch handling
csandit
 
Robust Fault Tolerance in Content Addressable Memory Interface
Robust Fault Tolerance in Content Addressable Memory InterfaceRobust Fault Tolerance in Content Addressable Memory Interface
Robust Fault Tolerance in Content Addressable Memory Interface
IOSRJVSP
 
Bus Based Multiprocessors v2
Bus Based Multiprocessors v2Bus Based Multiprocessors v2
Bus Based Multiprocessors v2
Mustafa Yumurtacı
 
Cache Memory.pptx
Cache Memory.pptxCache Memory.pptx
Cache Memory.pptx
ssusere16bd9
 

Similar to Unit 6 cache coherence (20)

Cache memory
Cache memoryCache memory
Cache memory
 
Operating Systems - memory management
Operating Systems - memory managementOperating Systems - memory management
Operating Systems - memory management
 
Memory Management
Memory Management Memory Management
Memory Management
 
Cache memory
Cache memoryCache memory
Cache memory
 
International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)
 
Cache Memory
Cache MemoryCache Memory
Cache Memory
 
cachememory-210517060741 (1).pdf
cachememory-210517060741 (1).pdfcachememory-210517060741 (1).pdf
cachememory-210517060741 (1).pdf
 
Cache memory
Cache memoryCache memory
Cache memory
 
Memory consistency models
Memory consistency modelsMemory consistency models
Memory consistency models
 
OS Unit 2.pptx
OS Unit 2.pptxOS Unit 2.pptx
OS Unit 2.pptx
 
DESIGNED DYNAMIC SEGMENTED LRU AND MODIFIED MOESI PROTOCOL FOR RING CONNECTED...
DESIGNED DYNAMIC SEGMENTED LRU AND MODIFIED MOESI PROTOCOL FOR RING CONNECTED...DESIGNED DYNAMIC SEGMENTED LRU AND MODIFIED MOESI PROTOCOL FOR RING CONNECTED...
DESIGNED DYNAMIC SEGMENTED LRU AND MODIFIED MOESI PROTOCOL FOR RING CONNECTED...
 
E24099025李宇洋_專題報告.pdf
E24099025李宇洋_專題報告.pdfE24099025李宇洋_專題報告.pdf
E24099025李宇洋_專題報告.pdf
 
Aca lab project (rohit malav)
Aca lab project (rohit malav) Aca lab project (rohit malav)
Aca lab project (rohit malav)
 
Computer architecture
Computer architectureComputer architecture
Computer architecture
 
OS Memory Management
OS Memory ManagementOS Memory Management
OS Memory Management
 
THE EFFECTIVE WAY OF PROCESSOR PERFORMANCE ENHANCEMENT BY PROPER BRANCH HANDL...
THE EFFECTIVE WAY OF PROCESSOR PERFORMANCE ENHANCEMENT BY PROPER BRANCH HANDL...THE EFFECTIVE WAY OF PROCESSOR PERFORMANCE ENHANCEMENT BY PROPER BRANCH HANDL...
THE EFFECTIVE WAY OF PROCESSOR PERFORMANCE ENHANCEMENT BY PROPER BRANCH HANDL...
 
The effective way of processor performance enhancement by proper branch handling
The effective way of processor performance enhancement by proper branch handlingThe effective way of processor performance enhancement by proper branch handling
The effective way of processor performance enhancement by proper branch handling
 
Robust Fault Tolerance in Content Addressable Memory Interface
Robust Fault Tolerance in Content Addressable Memory InterfaceRobust Fault Tolerance in Content Addressable Memory Interface
Robust Fault Tolerance in Content Addressable Memory Interface
 
Bus Based Multiprocessors v2
Bus Based Multiprocessors v2Bus Based Multiprocessors v2
Bus Based Multiprocessors v2
 
Cache Memory.pptx
Cache Memory.pptxCache Memory.pptx
Cache Memory.pptx
 

Recently uploaded

space technology lecture notes on satellite
space technology lecture notes on satellitespace technology lecture notes on satellite
space technology lecture notes on satellite
ongomchris
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
Kamal Acharya
 
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
H.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdfH.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdf
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
MLILAB
 
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdfGoverning Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
WENKENLI1
 
Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
gerogepatton
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
VENKATESHvenky89705
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation & Control
 
The Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdfThe Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdf
Pipe Restoration Solutions
 
AP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specificAP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specific
BrazilAccount1
 
ASME IX(9) 2007 Full Version .pdf
ASME IX(9)  2007 Full Version       .pdfASME IX(9)  2007 Full Version       .pdf
ASME IX(9) 2007 Full Version .pdf
AhmedHussein950959
 
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang,  ICLR 2024, MLILAB, KAIST AI.pdfJ.Yang,  ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
MLILAB
 
power quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptxpower quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptx
ViniHema
 
Runway Orientation Based on the Wind Rose Diagram.pptx
Runway Orientation Based on the Wind Rose Diagram.pptxRunway Orientation Based on the Wind Rose Diagram.pptx
Runway Orientation Based on the Wind Rose Diagram.pptx
SupreethSP4
 
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
AJAYKUMARPUND1
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
zwunae
 
HYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generationHYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generation
Robbie Edward Sayers
 
ethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.pptethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.ppt
Jayaprasanna4
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
SamSarthak3
 
Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdf
gdsczhcet
 
English lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdfEnglish lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdf
BrazilAccount1
 

Recently uploaded (20)

space technology lecture notes on satellite
space technology lecture notes on satellitespace technology lecture notes on satellite
space technology lecture notes on satellite
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
 
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
H.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdfH.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdf
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
 
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdfGoverning Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
 
Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
 
The Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdfThe Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdf
 
AP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specificAP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specific
 
ASME IX(9) 2007 Full Version .pdf
ASME IX(9)  2007 Full Version       .pdfASME IX(9)  2007 Full Version       .pdf
ASME IX(9) 2007 Full Version .pdf
 
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang,  ICLR 2024, MLILAB, KAIST AI.pdfJ.Yang,  ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
 
power quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptxpower quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptx
 
Runway Orientation Based on the Wind Rose Diagram.pptx
Runway Orientation Based on the Wind Rose Diagram.pptxRunway Orientation Based on the Wind Rose Diagram.pptx
Runway Orientation Based on the Wind Rose Diagram.pptx
 
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
 
HYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generationHYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generation
 
ethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.pptethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.ppt
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
 
Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdf
 
English lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdfEnglish lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdf
 

Unit 6 cache coherence

  • 1. Unit VI Multiprocessors by: Er. Dipesh Vaya Head & Asst. Prof. Department of CSE SSCE, Udaipur, Rajasthan
  • 2. Contents  Characteristics of Multiprocessors  Interconnection Structure  Interprocessor Arbitration  Interprocessor Communication and Synchronization Cache Coherence  Shared Memory Multiprocessors SS College of Engineering, Udaipur, Rajasthan 2
  • 3. Cache Coherence (Coherence : the quality of being logical and consistent.) by: Er. Dipesh Vaya Head & Asst. Prof. Department of CSE SSCE, Udaipur, Rajasthan SS College of Engineering, Udaipur, Rajasthan 3
  • 4. Introduction  The primary advantage of cache is its ability to reduce the average access time in uniprocessors.  When the processor finds a word in cache during a read operation, the main memory is not involved in the transfer.  If the operation is to write, there are two commonly used procedures to update memory.  In the write-through policy, both cache and main memory are updated with every write operation.  In the write-back policy, only the cache is updated and the location is marked so that it can be copied later into main memory. SS College of Engineering, Udaipur, Rajasthan 4
  • 5. Introduction(cont.)  The same information may reside in a number of copies in some caches and main memory.  To ensure the ability of the system to execute memory operations correctly, the multiple copies must be kept identical. This requirement imposes a cache coherence problem.  A memory scheme is coherent if the value returned on a load instruction is always the value given by the latest store instruction with the same address. SS College of Engineering, Udaipur, Rajasthan 5
  • 6. Conditions for incoherence  To illustrate the problem, consider the three-processor configuration with private caches shown in Fig. 1.  The load on X to the three processors results in consistent copies in the caches and main memory.  If one of the processors performs a store to X, the copies of X in the caches become inconsistent.  Depending on the memory update policy used in the cache, the main memory may also be inconsistent with respect to the cache. This is shown in Fig. 2.  Another configuration that may cause consistency problems is a direct memory access (DMA) activity in conjunction with an IOP connected to the system bus.  In the case of input, the DMA may modify locations in main memory that also reside in cache without updating the cache.  During a DMA output, memory locations may be read before they are updated from the cache when using a write-back policy. SS College of Engineering, Udaipur, Rajasthan 6
  • 7. Cache configuration after a load on X Fig. 1 X=52 X=52 X=52 X=52 P1 P2 P3 Bus Main memory Caches Processors SS College of Engineering, Udaipur, Rajasthan 7
  • 8. With write-through cache policy Fig. 2 X=120 X=120 X=52 X=52 P1 P2 P3 Bus Main memory Caches Processors Cache configuration after a store to X by processor P1 SS College of Engineering, Udaipur, Rajasthan 8
  • 9. With write-back cache policy X=52 X=120 X=52 X=52 P1 P2 P3 Bus Main memory Caches Processors Cache configuration after a store to X by processor P1 SS College of Engineering, Udaipur, Rajasthan 9
  • 10. Solutions to the cache coherence problem  A simple scheme is to disallow private caches for each processor and have a shared cache memory associated with main memory.  This method violates the principle of closeness of CPU to cache and increases the average memory access time.  One scheme that has been used allows only nonshared and read-only data to be stored in caches. Such items are called cachable. Shared writable data are noncachable.  This method restricts the type of data stored in caches and introduces an extra software overhead that may degrade performance. SS College of Engineering, Udaipur, Rajasthan 10
  • 11. Solutions to the cache coherence problem(cont.)  A scheme that allows writable data to exist in at least one cache is a method that employs a centralized global table in its compiler.  The status of memory blocks is stored in the central global table.  Each block is identified as read-only (RO) or read and write (RW)  Hardware-only solutions are handled by the hardware automatically and have the advantage of higher speed and program transparency.  In the hardware solution, the cache controller is specially designed to allow it to monitor all bus requests from CPUs and IOPs.  The bus controller that monitors this action is referred to as a snoopy cache controller. SS College of Engineering, Udaipur, Rajasthan 11
  • 12. Solutions to the cache coherence problem(cont.)  The local snoopy controllers in all other caches check their memory to determine if they have a copy of the word that has been overwritten.  If a copy exists in a remote cache, that location is marked invalid. SS College of Engineering, Udaipur, Rajasthan 12