CASHMERe - PowerPoint PPT Presentation

1 / 12
About This Presentation
Title:

CASHMERe

Description:

Data Sharing Management. Page-sized coherence blocks for shared-memory ... Read access: upgrade sharing state for the node and set permission to Read ... – PowerPoint PPT presentation

Number of Views:199
Avg rating:3.0/5.0
Slides: 13
Provided by: esteba
Learn more at: http://charm.cs.uiuc.edu
Category:
Tags: cashmere | sharing

less

Transcript and Presenter's Notes

Title: CASHMERe


1
CASHMERe
  • David Kunzman, Mei Chao, Esteban Pauli

2
Overview
  • It is well accepted today that commercial
    workstations offer the best price/performance
    ratio and that shared memory provides the most
    desirable programming paradigm for parallel
    computing.
  • CASHMERe provides a shared memory view of
    distributed memory machines.
  • Provide two DSM coherence protocols
  • Over message passing
  • With DEC Memory Channel NIC

3
Data Sharing Management
  • Page-sized coherence blocks for shared-memory
  • Accesses detected by VM subsystem
  • Each page
  • A single distinguished home node master copy
  • An entry in a global page directory maintains
    info about sharing state and home node location
  • States Invalid, Read or Read-Write

4
Handling Page Faults
  • Invalid page copy from home node via page update
    request
  • Read access upgrade sharing state for the node
    and set permission to Read
  • Write access
  • Exclusive mode if no other shares
  • Make a pristine copy (Twin), page ID into dirty
    list (Enable recovery later) Update sharing info
    and set permission to Read-Write

5
During Release/Acquire Operation
  • Release
  • Diff traverse processors dirty list and compare
    the working copy of each modified page to its
    twin
  • After diff, write notices are sent to all sharers
    of the page
  • Acquire
  • Invalidate all pages with write notice

6
Programming in CASHMERe
  • SPMD
  • Primitives
  • Locks acquire, release
  • Barrier
  • Flags
  • acquire, release
  • More advanced functionality
  • void csm_wait_eq_flag(int index, long value)
  • long csm_poll_flag(int index)
  • http//www.cs.rochester.edu/research/cashmere/docs
    /csm_api.html

7
Example Initialization
  1. struct int values4096 pGlobalData1
  2. struct int others256 pGlobalData2
  3. void main(int arg, char argv)
  4. csm_init_memory_size(
  5. csm_memory_page_round(sizeof(pGlobalData1
    ))
  6. csm_memory_page_round(sizeof(pGlobalData2
    ))
  7. )
  8. csm_init_start(argc, argv) // spawn other
    threads
  9. if (csm_pid 0)
  10. pGlobalData1 csm_malloc(sizeof(pGlobalD
    ata1))
  11. csm_distribute(pGlobalData1,
    sizeof(pGlobalData1))
  12. pGlobalData2 csm_malloc(sizeof(pGlobalD
    ata2))
  13. csm_distribute(pGlobalData2,
    sizeof(pGlobalData2))
  14. csm_init_complete() // before this, only pe
    0 can touch global data
  15. // compute using global variable...
  16. pGlobalData1-gtvalues0 pGlobalData2-gtother
    scsm_pid
  17. csm_exit(0)

8
Example 1D Jacobi
  1. while(not converged)
  2. my_start csm_pid chunk_size
  3. my_end (csm_pid 1) chunk_size
  4. for(i my_start i lt my_end i)
  5. oldi curi // copy
  6. for(i my_start i lt my_end i)
  7. curi // compute
  8. csm_barrier(0 / barrier ID /)

9
Example Dining Philosophers
  1. while(still_hungry_for_pizza())
  2. csm_lock_acquire(csm_pid)
  3. csm_lock_acquire((csm_pid 1) csm_num_pid)
  4. eat_pizza() // yummy
  5. csm_lock_release(csm_pid)
  6. csm_lock_release((csm_pid 1) csm_num_pid)
  7. // can deadlock, just showing use of locks

10
Example flag use
  1. // wait my turn
  2. csm_wait_neq_flag(0, csm_pid)
  3. csm_acquire_flag(0)
  4. // take my turn
  5. //let next person take their turn
  6. cms_inc_flag(0, 1)

11
Example Bubble Sort
  1. // Assume flag 0 is initialized to 0
  2. for (int i 0 i lt N i)
  3. csm_wait_neq_flag(0, csm_pid 2)
  4. // swap with neighbor if needed
  5. if (csm_pid 0 csm_pid 1)
  6. csm_aquire_flag(0)
  7. if (csm_pid 0) csm_inc_flag(0, 1)
  8. if (csm_pid 1) csm_reset_flag(0)

12
Current Status
  • Could not find a place to download it
  • Last paper in 1999
Write a Comment
User Comments (0)
About PowerShow.com