%0 Conference Proceedings %T Fencing Programs with Self-Invalidation and Self-Downgrade %+ Uppsala University %+ Universidad de Murcia %A Abdulla, Parosh, Aziz %A Atig, Mohamed, Faouzi %A Kaxiras, Stefanos %A Leonardsson, Carl %A Ros, Alberto %A Zhu, Yunyun %< avec comité de lecture %( Lecture Notes in Computer Science %B 36th International Conference on Formal Techniques for Distributed Objects, Components, and Systems (FORTE) %C Heraklion, Greece %Y Elvira Albert %Y Ivan Lanese %3 Formal Techniques for Distributed Objects, Components, and Systems %V LNCS-9688 %P 19-35 %8 2016-06-06 %D 2016 %R 10.1007/978-3-319-39570-8_2 %Z Computer Science [cs] %Z Computer Science [cs]/Networking and Internet Architecture [cs.NI]Conference papers %X Cache coherence protocols using self-invalidation and self-downgrade have recently seen increased popularity due to their simplicity, potential performance efficiency, and low energy consumption. However, such protocols result in memory instruction reordering, thus causing extra program behaviors that are often not intended by the programmer. We propose a novel formal model that captures the semantics of programs running under such protocols, and employs a set of fences that interact with the coherence layer. Using the model, we perfform a reachability analysis that can check whether a program satisfies a given safety property with the current set of fences. Based on an algorithm in [19], we describe a method for insertion of optimal sets of fences that ensure correctness of the program under such protocols. The method relies on a counter-example guided fence insertion procedure. One feature of our method is that it can handle a variety of fences (with different costs). This diversity makes optimization more difficult since one has to optimize the total cost of the inserted fences, rather than just their number. To demonstrate the strength of our approach, we have implemented a prototype and run it on a wide range of examples and benchmarks. We have also, using simulation, evaluated the performance of the resulting fenced programs. %G English %Z TC 6 %Z WG 6.1 %2 https://inria.hal.science/hal-01432925/document %2 https://inria.hal.science/hal-01432925/file/426757_1_En_2_Chapter.pdf %L hal-01432925 %U https://inria.hal.science/hal-01432925 %~ IFIP-LNCS %~ IFIP %~ IFIP-TC %~ IFIP-WG %~ IFIP-TC6 %~ IFIP-WG6-1 %~ IFIP-FORTE %~ IFIP-LNCS-9688