SlideShare a Scribd company logo
Cache Coherence for
  Multiprocessors
Presented by Adesh Mishra
    Reg. No.:1111427
   Roll No.:RD1107A44
• Shared-Memory Multiprocessor
all processor share a common memory,
each processor have own cache.
• Cache Coherence Problem
• Solutions to Cache Coherence
  – Hardware
      • Policies
      • Two Primary Categories
  – Software
Shared-Memory Multiprocessor
Cache Coherence Problem
• Multiple copy of the same data can exist in the different
  caches simultaneously,
• and if processors allowed to update their own copies freely,
  an inconsistent view of memory can result.
• Write policies : write back, write through
->In the write back policy only cache is updated and the location
   marked so that it can be copied later into main memory.
->In the write through policy cache and main memory are
   updated with every write operation.
Solutions to Cache Coherence
• Hardware Solution : in hardware solution the cache
  controller specify designed to allow it to monitor all bus
  requests from CPUs and IOPs.
->Directory protocol :
  >it collect & maintain the information about copies of lines
  reside .
  >contain the information about content of various local
  caches.
    >keeping the information up-to-date.
    >manage the information which caches copy of which line.
   Drawback – only for less buses not large scale system
Snoopy Cache Protocol
 ->distributed responsibility for maintaining cache coherence
   among all of the cache controller in the multiprocessor.
Basic Approach: write invalid & write update.
• Write invalid protocol – there can be multiple readers but
  only one writer at a time, only one cache can write to the line.
• Write update protocol – there can be multiple writer as
   well as multiple readers.
 ->when a processor wishes to update a shared line, the word to
   be distributed to all others, and caches containing that line
   can update it.
Software cache solution
• in the software based protocol relying on the operating
  system and Compiler.
• Compiler-based coherence mechanisms performed an
  analysis on the code to determine which data items become
  unsafe for caching, and the mark those item accordingly.
• The operating system prevent any non-cacheable items from
  being cached.
• Software Approaches are attractive because to overhead of
  detecting potential problems is transferred run time to
  compile time.
?

More Related Content

What's hot

Inter Process Communication Presentation[1]
Inter Process Communication Presentation[1]Inter Process Communication Presentation[1]
Inter Process Communication Presentation[1]Ravindra Raju Kolahalam
 
distributed shared memory
 distributed shared memory distributed shared memory
distributed shared memoryAshish Kumar
 
Cache coherence problem and its solutions
Cache coherence problem and its solutionsCache coherence problem and its solutions
Cache coherence problem and its solutions
Majid Saleem
 
Distributed shred memory architecture
Distributed shred memory architectureDistributed shred memory architecture
Distributed shred memory architecture
Maulik Togadiya
 
Cache memory
Cache memoryCache memory
Cache memory
Ansari Maviya
 
Shared-Memory Multiprocessors
Shared-Memory MultiprocessorsShared-Memory Multiprocessors
Shared-Memory Multiprocessors
Salvatore La Bua
 
Distributed system
Distributed systemDistributed system
Distributed system
Syed Zaid Irshad
 
Memory management ppt
Memory management pptMemory management ppt
Memory management ppt
ManishaJha43
 
Thrashing allocation frames.43
Thrashing allocation frames.43Thrashing allocation frames.43
Thrashing allocation frames.43myrajendra
 
Multiprocessor architecture
Multiprocessor architectureMultiprocessor architecture
Multiprocessor architecture
Arpan Baishya
 
Distributed Shared Memory
Distributed Shared MemoryDistributed Shared Memory
Distributed Shared Memory
Prakhar Rastogi
 
Cache memory ppt
Cache memory ppt  Cache memory ppt
Cache memory ppt
Arpita Naik
 
Distributed Mutual exclusion algorithms
Distributed Mutual exclusion algorithmsDistributed Mutual exclusion algorithms
Distributed Mutual exclusion algorithms
MNM Jain Engineering College
 
Computer architecture cache memory
Computer architecture cache memoryComputer architecture cache memory
Computer architecture cache memory
Mazin Alwaaly
 
Parallel processing
Parallel processingParallel processing
Parallel processing
rajshreemuthiah
 
6.distributed shared memory
6.distributed shared memory6.distributed shared memory
6.distributed shared memory
Gd Goenka University
 
File replication
File replicationFile replication
File replication
Klawal13
 

What's hot (20)

Inter Process Communication Presentation[1]
Inter Process Communication Presentation[1]Inter Process Communication Presentation[1]
Inter Process Communication Presentation[1]
 
distributed shared memory
 distributed shared memory distributed shared memory
distributed shared memory
 
Cache coherence problem and its solutions
Cache coherence problem and its solutionsCache coherence problem and its solutions
Cache coherence problem and its solutions
 
Distributed shred memory architecture
Distributed shred memory architectureDistributed shred memory architecture
Distributed shred memory architecture
 
Cache memory
Cache memoryCache memory
Cache memory
 
Shared-Memory Multiprocessors
Shared-Memory MultiprocessorsShared-Memory Multiprocessors
Shared-Memory Multiprocessors
 
VIRTUAL MEMORY
VIRTUAL MEMORYVIRTUAL MEMORY
VIRTUAL MEMORY
 
Distributed system
Distributed systemDistributed system
Distributed system
 
Memory management ppt
Memory management pptMemory management ppt
Memory management ppt
 
Thrashing allocation frames.43
Thrashing allocation frames.43Thrashing allocation frames.43
Thrashing allocation frames.43
 
Multiprocessor architecture
Multiprocessor architectureMultiprocessor architecture
Multiprocessor architecture
 
Distributed Shared Memory
Distributed Shared MemoryDistributed Shared Memory
Distributed Shared Memory
 
NUMA overview
NUMA overviewNUMA overview
NUMA overview
 
Cache memory ppt
Cache memory ppt  Cache memory ppt
Cache memory ppt
 
Distributed Mutual exclusion algorithms
Distributed Mutual exclusion algorithmsDistributed Mutual exclusion algorithms
Distributed Mutual exclusion algorithms
 
Computer architecture cache memory
Computer architecture cache memoryComputer architecture cache memory
Computer architecture cache memory
 
Parallel processing
Parallel processingParallel processing
Parallel processing
 
6.distributed shared memory
6.distributed shared memory6.distributed shared memory
6.distributed shared memory
 
File replication
File replicationFile replication
File replication
 
Linux Memory Management
Linux Memory ManagementLinux Memory Management
Linux Memory Management
 

Similar to Cache coherence

Lecture-7 Main Memroy.pptx
Lecture-7 Main Memroy.pptxLecture-7 Main Memroy.pptx
Lecture-7 Main Memroy.pptx
Amanuelmergia
 
Memory Management in Operating Systems for all
Memory Management in Operating Systems for allMemory Management in Operating Systems for all
Memory Management in Operating Systems for all
VSKAMCSPSGCT
 
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
 
22CS201 COA
22CS201 COA22CS201 COA
22CS201 COA
Kathirvel Ayyaswamy
 
Cache Coherence.pptx
Cache Coherence.pptxCache Coherence.pptx
Cache Coherence.pptx
SamyakJain710491
 
Cache simulator
Cache simulatorCache simulator
Cache simulator
Suraj Saini
 
assignment_presentaion_jhvvnvhjhbhjhvjh.pptx
assignment_presentaion_jhvvnvhjhbhjhvjh.pptxassignment_presentaion_jhvvnvhjhbhjhvjh.pptx
assignment_presentaion_jhvvnvhjhbhjhvjh.pptx
23mu36
 
Ch8 main memory
Ch8   main memoryCh8   main memory
Ch8 main memory
Welly Dian Astika
 
Operating systems- Main Memory Management
Operating systems- Main Memory ManagementOperating systems- Main Memory Management
Operating systems- Main Memory Management
Chandrakant Divate
 
MK Sistem Operasi.pdf
MK Sistem Operasi.pdfMK Sistem Operasi.pdf
MK Sistem Operasi.pdf
wisard1
 
Memory Management.pdf
Memory Management.pdfMemory Management.pdf
Memory Management.pdf
SujanTimalsina5
 
UNIT 3-EXPLAINING THE MEMORY MANAGEMENT LOGICAL AND AND PHYSICAL DATA FLOW DI...
UNIT 3-EXPLAINING THE MEMORY MANAGEMENT LOGICAL AND AND PHYSICAL DATA FLOW DI...UNIT 3-EXPLAINING THE MEMORY MANAGEMENT LOGICAL AND AND PHYSICAL DATA FLOW DI...
UNIT 3-EXPLAINING THE MEMORY MANAGEMENT LOGICAL AND AND PHYSICAL DATA FLOW DI...
LeahRachael
 
Mahti quick-start guide
Mahti quick-start guide Mahti quick-start guide
Mahti quick-start guide
CSC - IT Center for Science
 
Parallel Processing Presentation2
Parallel Processing Presentation2Parallel Processing Presentation2
Parallel Processing Presentation2daniyalqureshi712
 
Cache Memory.pptx
Cache Memory.pptxCache Memory.pptx
Cache Memory.pptx
ssusere16bd9
 
Module2 MultiThreads.ppt
Module2 MultiThreads.pptModule2 MultiThreads.ppt
Module2 MultiThreads.ppt
shreesha16
 
Scalable Web Apps
Scalable Web AppsScalable Web Apps
Scalable Web Apps
Piotr Pelczar
 
Computer Architecture & Organization.ppt
Computer Architecture & Organization.pptComputer Architecture & Organization.ppt
Computer Architecture & Organization.ppt
FarhanaMariyam1
 
A Closer Look at Apache Kudu
A Closer Look at Apache KuduA Closer Look at Apache Kudu
A Closer Look at Apache Kudu
Andriy Zabavskyy
 
Parallel Processing & Pipelining in Computer Architecture_Prof.Sumalatha.pptx
Parallel Processing & Pipelining in Computer Architecture_Prof.Sumalatha.pptxParallel Processing & Pipelining in Computer Architecture_Prof.Sumalatha.pptx
Parallel Processing & Pipelining in Computer Architecture_Prof.Sumalatha.pptx
Sumalatha A
 

Similar to Cache coherence (20)

Lecture-7 Main Memroy.pptx
Lecture-7 Main Memroy.pptxLecture-7 Main Memroy.pptx
Lecture-7 Main Memroy.pptx
 
Memory Management in Operating Systems for all
Memory Management in Operating Systems for allMemory Management in Operating Systems for all
Memory Management in Operating Systems for all
 
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
 
22CS201 COA
22CS201 COA22CS201 COA
22CS201 COA
 
Cache Coherence.pptx
Cache Coherence.pptxCache Coherence.pptx
Cache Coherence.pptx
 
Cache simulator
Cache simulatorCache simulator
Cache simulator
 
assignment_presentaion_jhvvnvhjhbhjhvjh.pptx
assignment_presentaion_jhvvnvhjhbhjhvjh.pptxassignment_presentaion_jhvvnvhjhbhjhvjh.pptx
assignment_presentaion_jhvvnvhjhbhjhvjh.pptx
 
Ch8 main memory
Ch8   main memoryCh8   main memory
Ch8 main memory
 
Operating systems- Main Memory Management
Operating systems- Main Memory ManagementOperating systems- Main Memory Management
Operating systems- Main Memory Management
 
MK Sistem Operasi.pdf
MK Sistem Operasi.pdfMK Sistem Operasi.pdf
MK Sistem Operasi.pdf
 
Memory Management.pdf
Memory Management.pdfMemory Management.pdf
Memory Management.pdf
 
UNIT 3-EXPLAINING THE MEMORY MANAGEMENT LOGICAL AND AND PHYSICAL DATA FLOW DI...
UNIT 3-EXPLAINING THE MEMORY MANAGEMENT LOGICAL AND AND PHYSICAL DATA FLOW DI...UNIT 3-EXPLAINING THE MEMORY MANAGEMENT LOGICAL AND AND PHYSICAL DATA FLOW DI...
UNIT 3-EXPLAINING THE MEMORY MANAGEMENT LOGICAL AND AND PHYSICAL DATA FLOW DI...
 
Mahti quick-start guide
Mahti quick-start guide Mahti quick-start guide
Mahti quick-start guide
 
Parallel Processing Presentation2
Parallel Processing Presentation2Parallel Processing Presentation2
Parallel Processing Presentation2
 
Cache Memory.pptx
Cache Memory.pptxCache Memory.pptx
Cache Memory.pptx
 
Module2 MultiThreads.ppt
Module2 MultiThreads.pptModule2 MultiThreads.ppt
Module2 MultiThreads.ppt
 
Scalable Web Apps
Scalable Web AppsScalable Web Apps
Scalable Web Apps
 
Computer Architecture & Organization.ppt
Computer Architecture & Organization.pptComputer Architecture & Organization.ppt
Computer Architecture & Organization.ppt
 
A Closer Look at Apache Kudu
A Closer Look at Apache KuduA Closer Look at Apache Kudu
A Closer Look at Apache Kudu
 
Parallel Processing & Pipelining in Computer Architecture_Prof.Sumalatha.pptx
Parallel Processing & Pipelining in Computer Architecture_Prof.Sumalatha.pptxParallel Processing & Pipelining in Computer Architecture_Prof.Sumalatha.pptx
Parallel Processing & Pipelining in Computer Architecture_Prof.Sumalatha.pptx
 

Cache coherence

  • 1. Cache Coherence for Multiprocessors Presented by Adesh Mishra Reg. No.:1111427 Roll No.:RD1107A44
  • 2. • Shared-Memory Multiprocessor all processor share a common memory, each processor have own cache. • Cache Coherence Problem • Solutions to Cache Coherence – Hardware • Policies • Two Primary Categories – Software
  • 4. Cache Coherence Problem • Multiple copy of the same data can exist in the different caches simultaneously, • and if processors allowed to update their own copies freely, an inconsistent view of memory can result. • Write policies : write back, write through ->In the write back policy only cache is updated and the location marked so that it can be copied later into main memory. ->In the write through policy cache and main memory are updated with every write operation.
  • 5. Solutions to Cache Coherence • Hardware Solution : in hardware solution the cache controller specify designed to allow it to monitor all bus requests from CPUs and IOPs. ->Directory protocol : >it collect & maintain the information about copies of lines reside . >contain the information about content of various local caches. >keeping the information up-to-date. >manage the information which caches copy of which line. Drawback – only for less buses not large scale system
  • 6. Snoopy Cache Protocol ->distributed responsibility for maintaining cache coherence among all of the cache controller in the multiprocessor. Basic Approach: write invalid & write update. • Write invalid protocol – there can be multiple readers but only one writer at a time, only one cache can write to the line. • Write update protocol – there can be multiple writer as well as multiple readers. ->when a processor wishes to update a shared line, the word to be distributed to all others, and caches containing that line can update it.
  • 7. Software cache solution • in the software based protocol relying on the operating system and Compiler. • Compiler-based coherence mechanisms performed an analysis on the code to determine which data items become unsafe for caching, and the mark those item accordingly. • The operating system prevent any non-cacheable items from being cached. • Software Approaches are attractive because to overhead of detecting potential problems is transferred run time to compile time.
  • 8. ?