SlideShare a Scribd company logo
Majid saleem
11-ntu-1232
BSCS 6th(A)
Submitted To: Sir Nasir Mahmood
Submission Date: 05-07-2014
National Textile university Faisalabad
CACHE COHERENCE:
………………………
DEFINATION:
Cache coherence is the discipline that ensures that changes in the
values of shared operands are propagated throughout the system
in a timely fashion.
EXPLANATION:
 shared memory multiprocessor
 separate cache memory for each processor
 possible to have many copies of any one instruction operand
 one copy in the main memory and one in each cache memory.
 When one copy of an operand is changed, the other copies of the
operand must be changed also.
THERE ARE THREE DISTINCT LEVELS
OF CACHE COHERENCE:
 every write operation appears to occur instantaneously
 all processors see exactly the same sequence of changes of values for each
separate operand
 different processors may see an operation and assume different sequences of
values; this is considered to be a noncoherent behavior
CACHE COHERENCY PROBLEM •
 update from a writing processor
is not known to other processors
TWO TYPES OF SOLUTIONS:
 Software-based
 Hardware base
SOFTWARE-BASED
 Compiler based or with run-time system support.
 With or without hardware assist.
 Tough problem because perfect information is needed in the
presence of memory aliasing and explicit parallelism.
TWO TYPES OF HARDWARE_BASE
SOLUTION:
 Snooping
 Directory_Based
SNOOPING:
 used with low-end MPs
 few processors
 centralized memory
 bus-based
 distributed implementation: responsibility for
maintaining coherence lies with each cache
LOW END MP’S
SNOOPING IMPLEMENTATION
A distributed coherency protocol
 coherency state associated with each cache block
 each snoop maintains coherency for its own cache
CONTINUE…….
HOW THE BUS IS USED?
 broadcast medium
 entire coherency operation is atomic wrt other processors
 keep-the-bus protocol: master holds the bus until the entire operation
has completed
CONTINUE…….
SPLIT-TRANSACTION BUSES
 request & response are different phases
 state value that indicates that an operation is in progress
 do not initiate another operation for a cache block that
has one in progress
BUS IN SNOOPING
AN EXAMPLE SNOOPING PROTOCOL:
INVALIDATION-BASED COHERENCY
PROTOCOL EACH CACHE BLOCK IS IN ONE
OF THREE STATES
shared:
 clean in all caches & up-to-date in memory
 block can be read by any processor
exclusive:
 dirty in exactly one cache
 only that processor can write to it (it’s the owner of the block)
invalid:
 block contains no valid data
DIRECTORY-BASED
• used with higher-end MPs
 more processors
 distributed memory
 multi-path interconnect
 centralized for each address: responsibility for
maintaining coherence lies with the directory for each
address
DIRECTORY IMPLEMENTATION
Distributed memory machine
 processor-memory pairs are connected via a multi-path interconnection
network
 point-to-point communication
 snooping with broadcasting is wasteful of the parallel communication
capability
 each processor (or cluster of processors) has its own memory
 a processor has fast access to its local memory & slower access to “remote”
memory located at other processors
 NUMA (non-uniform memory access) machines
INTERCONNECTION NETWORK
DIRECTORY IMPLEMENTATION
• directory tracks state of cache blocks
• shared:
 at least 1 processor has the data cached & memory is up- to-date
 block can be read by any processor
• exclusive:
 1 processor (the owner) has the data cached & memory is stale
 only that processor can write to it
• invalid:
 no processor has the data cached & memory is up-to-date ctory tracks
state of cache blocks
CONTINUE…..
 Directory blocks play different roles during a memory operation.
home node:
the memory location of the requested data
 local node:
where the memory request initiated
 remote node:
an alternate location for the data if this processor has requested &
cached it
ANY QUESTION.????
Thank you…………………………………………….

More Related Content

What's hot

Multi processor scheduling
Multi  processor schedulingMulti  processor scheduling
Multi processor scheduling
Shashank Kapoor
 
Multiprocessor system
Multiprocessor system Multiprocessor system
Multiprocessor system
Mr. Vikram Singh Slathia
 
Superscalar Processor
Superscalar ProcessorSuperscalar Processor
Superscalar Processor
Manash Kumar Mondal
 
Parallel processing
Parallel processingParallel processing
Parallel processing
Syed Zaid Irshad
 
Multiprocessor
MultiprocessorMultiprocessor
Multiprocessor
Kamal Acharya
 
Superscalar & superpipeline processor
Superscalar & superpipeline processorSuperscalar & superpipeline processor
Superscalar & superpipeline processorMuhammad Ishaq
 
Computer organization-and-architecture-questions-and-answers
Computer organization-and-architecture-questions-and-answersComputer organization-and-architecture-questions-and-answers
Computer organization-and-architecture-questions-and-answers
appasami
 
Hardware multithreading
Hardware multithreadingHardware multithreading
Hardware multithreading
Fraboni Ec
 
parallel Questions & answers
parallel Questions & answersparallel Questions & answers
parallel Questions & answers
Md. Mashiur Rahman
 
8 memory management strategies
8 memory management strategies8 memory management strategies
8 memory management strategies
Dr. Loganathan R
 
SYNCHRONIZATION IN MULTIPROCESSING
SYNCHRONIZATION IN MULTIPROCESSINGSYNCHRONIZATION IN MULTIPROCESSING
SYNCHRONIZATION IN MULTIPROCESSING
Aparna Bhadran
 
6.distributed shared memory
6.distributed shared memory6.distributed shared memory
6.distributed shared memory
Gd Goenka University
 
Synchronization in distributed computing
Synchronization in distributed computingSynchronization in distributed computing
Synchronization in distributed computing
SVijaylakshmi
 
Distributed Operating System
Distributed Operating SystemDistributed Operating System
Distributed Operating System
SanthiNivas
 
Parallel processing
Parallel processingParallel processing
Parallel processing
rajshreemuthiah
 
8237 dma controller
8237 dma controller8237 dma controller
8237 dma controllerTech_MX
 
RISC - Reduced Instruction Set Computing
RISC - Reduced Instruction Set ComputingRISC - Reduced Instruction Set Computing
RISC - Reduced Instruction Set Computing
Tushar Swami
 
Multithreaded processors ppt
Multithreaded processors pptMultithreaded processors ppt
Multithreaded processors ppt
Siddhartha Anand
 
Computer architecture input output organization
Computer architecture input output organizationComputer architecture input output organization
Computer architecture input output organization
Mazin Alwaaly
 
Multiprocessor architecture
Multiprocessor architectureMultiprocessor architecture
Multiprocessor architecture
Arpan Baishya
 

What's hot (20)

Multi processor scheduling
Multi  processor schedulingMulti  processor scheduling
Multi processor scheduling
 
Multiprocessor system
Multiprocessor system Multiprocessor system
Multiprocessor system
 
Superscalar Processor
Superscalar ProcessorSuperscalar Processor
Superscalar Processor
 
Parallel processing
Parallel processingParallel processing
Parallel processing
 
Multiprocessor
MultiprocessorMultiprocessor
Multiprocessor
 
Superscalar & superpipeline processor
Superscalar & superpipeline processorSuperscalar & superpipeline processor
Superscalar & superpipeline processor
 
Computer organization-and-architecture-questions-and-answers
Computer organization-and-architecture-questions-and-answersComputer organization-and-architecture-questions-and-answers
Computer organization-and-architecture-questions-and-answers
 
Hardware multithreading
Hardware multithreadingHardware multithreading
Hardware multithreading
 
parallel Questions & answers
parallel Questions & answersparallel Questions & answers
parallel Questions & answers
 
8 memory management strategies
8 memory management strategies8 memory management strategies
8 memory management strategies
 
SYNCHRONIZATION IN MULTIPROCESSING
SYNCHRONIZATION IN MULTIPROCESSINGSYNCHRONIZATION IN MULTIPROCESSING
SYNCHRONIZATION IN MULTIPROCESSING
 
6.distributed shared memory
6.distributed shared memory6.distributed shared memory
6.distributed shared memory
 
Synchronization in distributed computing
Synchronization in distributed computingSynchronization in distributed computing
Synchronization in distributed computing
 
Distributed Operating System
Distributed Operating SystemDistributed Operating System
Distributed Operating System
 
Parallel processing
Parallel processingParallel processing
Parallel processing
 
8237 dma controller
8237 dma controller8237 dma controller
8237 dma controller
 
RISC - Reduced Instruction Set Computing
RISC - Reduced Instruction Set ComputingRISC - Reduced Instruction Set Computing
RISC - Reduced Instruction Set Computing
 
Multithreaded processors ppt
Multithreaded processors pptMultithreaded processors ppt
Multithreaded processors ppt
 
Computer architecture input output organization
Computer architecture input output organizationComputer architecture input output organization
Computer architecture input output organization
 
Multiprocessor architecture
Multiprocessor architectureMultiprocessor architecture
Multiprocessor architecture
 

Similar to Cache coherence problem and its solutions

Parallel Processing (Part 2)
Parallel Processing (Part 2)Parallel Processing (Part 2)
Parallel Processing (Part 2)
Ajeng Savitri
 
22CS201 COA
22CS201 COA22CS201 COA
22CS201 COA
Kathirvel Ayyaswamy
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
ssuser5c9d4b1
 
Networking threads
Networking threadsNetworking threads
Networking threads
Nilesh Pawar
 
Chapter 10
Chapter 10Chapter 10
Computer architecture multi processor
Computer architecture multi processorComputer architecture multi processor
Computer architecture multi processor
Mazin Alwaaly
 
Distributed Shared Memory
Distributed Shared MemoryDistributed Shared Memory
Distributed Shared Memory
Prakhar Rastogi
 
Introduction 1
Introduction 1Introduction 1
Introduction 1
Yasir Khan
 
Memory and Cache Coherence in Multiprocessor System.pdf
Memory and Cache Coherence in Multiprocessor System.pdfMemory and Cache Coherence in Multiprocessor System.pdf
Memory and Cache Coherence in Multiprocessor System.pdf
rajaratna4
 
ADVANCED COMPUTER ARCHITECTURE AND PARALLEL PROCESSING
ADVANCED COMPUTER ARCHITECTUREAND PARALLEL PROCESSINGADVANCED COMPUTER ARCHITECTUREAND PARALLEL PROCESSING
ADVANCED COMPUTER ARCHITECTURE AND PARALLEL PROCESSING
Zena Abo-Altaheen
 
Symmetric multiprocessing and Microkernel
Symmetric multiprocessing and MicrokernelSymmetric multiprocessing and Microkernel
Symmetric multiprocessing and Microkernel
Manoraj Pannerselum
 
MC0085 – Advanced Operating Systems - Master of Computer Science - MCA - SMU DE
MC0085 – Advanced Operating Systems - Master of Computer Science - MCA - SMU DEMC0085 – Advanced Operating Systems - Master of Computer Science - MCA - SMU DE
MC0085 – Advanced Operating Systems - Master of Computer Science - MCA - SMU DEAravind NC
 
Introduction to OS LEVEL Virtualization & Containers
Introduction to OS LEVEL Virtualization & ContainersIntroduction to OS LEVEL Virtualization & Containers
Introduction to OS LEVEL Virtualization & Containers
Vaibhav Sharma
 
Multiple processor (ppt 2010)
Multiple processor (ppt 2010)Multiple processor (ppt 2010)
Multiple processor (ppt 2010)
Arth Ramada
 
Topic 4- processes.pptx
Topic 4- processes.pptxTopic 4- processes.pptx
Topic 4- processes.pptx
DanishMahmood23
 

Similar to Cache coherence problem and its solutions (20)

Parallel Processing (Part 2)
Parallel Processing (Part 2)Parallel Processing (Part 2)
Parallel Processing (Part 2)
 
22CS201 COA
22CS201 COA22CS201 COA
22CS201 COA
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
 
Networking threads
Networking threadsNetworking threads
Networking threads
 
Chapter 10
Chapter 10Chapter 10
Chapter 10
 
Computer architecture multi processor
Computer architecture multi processorComputer architecture multi processor
Computer architecture multi processor
 
Distributed Shared Memory
Distributed Shared MemoryDistributed Shared Memory
Distributed Shared Memory
 
Threads
ThreadsThreads
Threads
 
Introduction 1
Introduction 1Introduction 1
Introduction 1
 
Memory and Cache Coherence in Multiprocessor System.pdf
Memory and Cache Coherence in Multiprocessor System.pdfMemory and Cache Coherence in Multiprocessor System.pdf
Memory and Cache Coherence in Multiprocessor System.pdf
 
Chapter04 new
Chapter04 newChapter04 new
Chapter04 new
 
ADVANCED COMPUTER ARCHITECTURE AND PARALLEL PROCESSING
ADVANCED COMPUTER ARCHITECTUREAND PARALLEL PROCESSINGADVANCED COMPUTER ARCHITECTUREAND PARALLEL PROCESSING
ADVANCED COMPUTER ARCHITECTURE AND PARALLEL PROCESSING
 
Symmetric multiprocessing and Microkernel
Symmetric multiprocessing and MicrokernelSymmetric multiprocessing and Microkernel
Symmetric multiprocessing and Microkernel
 
Ipc ppt
Ipc pptIpc ppt
Ipc ppt
 
MC0085 – Advanced Operating Systems - Master of Computer Science - MCA - SMU DE
MC0085 – Advanced Operating Systems - Master of Computer Science - MCA - SMU DEMC0085 – Advanced Operating Systems - Master of Computer Science - MCA - SMU DE
MC0085 – Advanced Operating Systems - Master of Computer Science - MCA - SMU DE
 
Week5
Week5Week5
Week5
 
Introduction to OS LEVEL Virtualization & Containers
Introduction to OS LEVEL Virtualization & ContainersIntroduction to OS LEVEL Virtualization & Containers
Introduction to OS LEVEL Virtualization & Containers
 
Multiple processor (ppt 2010)
Multiple processor (ppt 2010)Multiple processor (ppt 2010)
Multiple processor (ppt 2010)
 
Parallel processing Concepts
Parallel processing ConceptsParallel processing Concepts
Parallel processing Concepts
 
Topic 4- processes.pptx
Topic 4- processes.pptxTopic 4- processes.pptx
Topic 4- processes.pptx
 

Recently uploaded

一比一原版(UCSB毕业证)圣塔芭芭拉社区大学毕业证如何办理
一比一原版(UCSB毕业证)圣塔芭芭拉社区大学毕业证如何办理一比一原版(UCSB毕业证)圣塔芭芭拉社区大学毕业证如何办理
一比一原版(UCSB毕业证)圣塔芭芭拉社区大学毕业证如何办理
aozcue
 
LORRAINE ANDREI_LEQUIGAN_GOOGLE CALENDAR
LORRAINE ANDREI_LEQUIGAN_GOOGLE CALENDARLORRAINE ANDREI_LEQUIGAN_GOOGLE CALENDAR
LORRAINE ANDREI_LEQUIGAN_GOOGLE CALENDAR
lorraineandreiamcidl
 
Building a Raspberry Pi Robot with Dot NET 8, Blazor and SignalR - Slides Onl...
Building a Raspberry Pi Robot with Dot NET 8, Blazor and SignalR - Slides Onl...Building a Raspberry Pi Robot with Dot NET 8, Blazor and SignalR - Slides Onl...
Building a Raspberry Pi Robot with Dot NET 8, Blazor and SignalR - Slides Onl...
Peter Gallagher
 
Schematic Diagram MSI MS-7309 - REV 1.0 PDF .pdf
Schematic Diagram MSI MS-7309 - REV 1.0 PDF .pdfSchematic Diagram MSI MS-7309 - REV 1.0 PDF .pdf
Schematic Diagram MSI MS-7309 - REV 1.0 PDF .pdf
nikoloco007
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证如何办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证如何办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证如何办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证如何办理
aozcue
 
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证如何办理
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证如何办理一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证如何办理
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证如何办理
peuce
 
欧洲杯冠军-欧洲杯冠军网站-欧洲杯冠军|【​网址​🎉ac123.net🎉​】领先全球的买球投注平台
欧洲杯冠军-欧洲杯冠军网站-欧洲杯冠军|【​网址​🎉ac123.net🎉​】领先全球的买球投注平台欧洲杯冠军-欧洲杯冠军网站-欧洲杯冠军|【​网址​🎉ac123.net🎉​】领先全球的买球投注平台
欧洲杯冠军-欧洲杯冠军网站-欧洲杯冠军|【​网址​🎉ac123.net🎉​】领先全球的买球投注平台
andreassenrolf537
 
天博体育下载-可靠的网络天博体育下载-网络天博体育下载|【​网址​🎉ac123.net🎉​】
天博体育下载-可靠的网络天博体育下载-网络天博体育下载|【​网址​🎉ac123.net🎉​】天博体育下载-可靠的网络天博体育下载-网络天博体育下载|【​网址​🎉ac123.net🎉​】
天博体育下载-可靠的网络天博体育下载-网络天博体育下载|【​网址​🎉ac123.net🎉​】
arcosarturo900
 

Recently uploaded (8)

一比一原版(UCSB毕业证)圣塔芭芭拉社区大学毕业证如何办理
一比一原版(UCSB毕业证)圣塔芭芭拉社区大学毕业证如何办理一比一原版(UCSB毕业证)圣塔芭芭拉社区大学毕业证如何办理
一比一原版(UCSB毕业证)圣塔芭芭拉社区大学毕业证如何办理
 
LORRAINE ANDREI_LEQUIGAN_GOOGLE CALENDAR
LORRAINE ANDREI_LEQUIGAN_GOOGLE CALENDARLORRAINE ANDREI_LEQUIGAN_GOOGLE CALENDAR
LORRAINE ANDREI_LEQUIGAN_GOOGLE CALENDAR
 
Building a Raspberry Pi Robot with Dot NET 8, Blazor and SignalR - Slides Onl...
Building a Raspberry Pi Robot with Dot NET 8, Blazor and SignalR - Slides Onl...Building a Raspberry Pi Robot with Dot NET 8, Blazor and SignalR - Slides Onl...
Building a Raspberry Pi Robot with Dot NET 8, Blazor and SignalR - Slides Onl...
 
Schematic Diagram MSI MS-7309 - REV 1.0 PDF .pdf
Schematic Diagram MSI MS-7309 - REV 1.0 PDF .pdfSchematic Diagram MSI MS-7309 - REV 1.0 PDF .pdf
Schematic Diagram MSI MS-7309 - REV 1.0 PDF .pdf
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证如何办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证如何办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证如何办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证如何办理
 
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证如何办理
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证如何办理一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证如何办理
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证如何办理
 
欧洲杯冠军-欧洲杯冠军网站-欧洲杯冠军|【​网址​🎉ac123.net🎉​】领先全球的买球投注平台
欧洲杯冠军-欧洲杯冠军网站-欧洲杯冠军|【​网址​🎉ac123.net🎉​】领先全球的买球投注平台欧洲杯冠军-欧洲杯冠军网站-欧洲杯冠军|【​网址​🎉ac123.net🎉​】领先全球的买球投注平台
欧洲杯冠军-欧洲杯冠军网站-欧洲杯冠军|【​网址​🎉ac123.net🎉​】领先全球的买球投注平台
 
天博体育下载-可靠的网络天博体育下载-网络天博体育下载|【​网址​🎉ac123.net🎉​】
天博体育下载-可靠的网络天博体育下载-网络天博体育下载|【​网址​🎉ac123.net🎉​】天博体育下载-可靠的网络天博体育下载-网络天博体育下载|【​网址​🎉ac123.net🎉​】
天博体育下载-可靠的网络天博体育下载-网络天博体育下载|【​网址​🎉ac123.net🎉​】
 

Cache coherence problem and its solutions

  • 1. Majid saleem 11-ntu-1232 BSCS 6th(A) Submitted To: Sir Nasir Mahmood Submission Date: 05-07-2014 National Textile university Faisalabad
  • 3. DEFINATION: Cache coherence is the discipline that ensures that changes in the values of shared operands are propagated throughout the system in a timely fashion.
  • 4. EXPLANATION:  shared memory multiprocessor  separate cache memory for each processor  possible to have many copies of any one instruction operand  one copy in the main memory and one in each cache memory.  When one copy of an operand is changed, the other copies of the operand must be changed also.
  • 5. THERE ARE THREE DISTINCT LEVELS OF CACHE COHERENCE:  every write operation appears to occur instantaneously  all processors see exactly the same sequence of changes of values for each separate operand  different processors may see an operation and assume different sequences of values; this is considered to be a noncoherent behavior
  • 6. CACHE COHERENCY PROBLEM •  update from a writing processor is not known to other processors
  • 7. TWO TYPES OF SOLUTIONS:  Software-based  Hardware base
  • 8. SOFTWARE-BASED  Compiler based or with run-time system support.  With or without hardware assist.  Tough problem because perfect information is needed in the presence of memory aliasing and explicit parallelism.
  • 9. TWO TYPES OF HARDWARE_BASE SOLUTION:  Snooping  Directory_Based
  • 10. SNOOPING:  used with low-end MPs  few processors  centralized memory  bus-based  distributed implementation: responsibility for maintaining coherence lies with each cache
  • 12. SNOOPING IMPLEMENTATION A distributed coherency protocol  coherency state associated with each cache block  each snoop maintains coherency for its own cache
  • 13. CONTINUE……. HOW THE BUS IS USED?  broadcast medium  entire coherency operation is atomic wrt other processors  keep-the-bus protocol: master holds the bus until the entire operation has completed
  • 14. CONTINUE……. SPLIT-TRANSACTION BUSES  request & response are different phases  state value that indicates that an operation is in progress  do not initiate another operation for a cache block that has one in progress
  • 16. AN EXAMPLE SNOOPING PROTOCOL: INVALIDATION-BASED COHERENCY PROTOCOL EACH CACHE BLOCK IS IN ONE OF THREE STATES shared:  clean in all caches & up-to-date in memory  block can be read by any processor exclusive:  dirty in exactly one cache  only that processor can write to it (it’s the owner of the block) invalid:  block contains no valid data
  • 17. DIRECTORY-BASED • used with higher-end MPs  more processors  distributed memory  multi-path interconnect  centralized for each address: responsibility for maintaining coherence lies with the directory for each address
  • 18. DIRECTORY IMPLEMENTATION Distributed memory machine  processor-memory pairs are connected via a multi-path interconnection network  point-to-point communication  snooping with broadcasting is wasteful of the parallel communication capability  each processor (or cluster of processors) has its own memory  a processor has fast access to its local memory & slower access to “remote” memory located at other processors  NUMA (non-uniform memory access) machines
  • 20. DIRECTORY IMPLEMENTATION • directory tracks state of cache blocks • shared:  at least 1 processor has the data cached & memory is up- to-date  block can be read by any processor • exclusive:  1 processor (the owner) has the data cached & memory is stale  only that processor can write to it • invalid:  no processor has the data cached & memory is up-to-date ctory tracks state of cache blocks
  • 21. CONTINUE…..  Directory blocks play different roles during a memory operation. home node: the memory location of the requested data  local node: where the memory request initiated  remote node: an alternate location for the data if this processor has requested & cached it