A Memory Model Sensitive Checker for C#

A Memory Model Sensitive Checker for C#Short Description
Abstract. Modern concurrent programming languages like Java and C# have a programming language level memory model; it captures the set of all allowed behaviors of programs on any implementation platform -uni- or multi-processor. Such a memory model is typically weaker than Sequential Consistency and allows reordering of operations within a program thread. Therefore, programs verified correct by assuming Sequential Consistency (that is, each thread proceeds in program order) may not behave correctly on certain platforms! The solution to this problem is to develop program checkers which are memory model sensitive. In this paper, we develop such an invariant checker for the programming language C#. Our checker identifies program states which are reached only because the C# memory model is more relaxed than Sequential Consistency. Furthermore, our checker identifies (a) operation reorderings which cause such undesirable states to be reached, and (b) simple program modifications - by inserting memory barrier operations - which prevent such undesirable reorderings.

Website: www.comp.nus.edu.sg | Filesize: 210kb
No of Page(s): 16

Content

Modern mainstream programming languages like Java and C# support multithreading as an essential feature of the language. In these languages multiple threads can access shared objects. Moreover, synchronization mechanisms exist for controlling access to shared objects by threads. If every access to a shared object by any thread requires prior acquisition of a common lock, then the program is guaranteed to be “properly synchronized”. On the other hand, if there are two accesses to a shared object/variable v by two different threads, at least one of them is a write, and they are not ordered by synchronization - the program is then said to contain a data race, that is, the program is improperly synchronized. Improperly synchronized programs are common for more than one reason - (a) programmers may want to avoid synchronization overheads for low-level program fragments which are executed frequently, (b) programmers may forget to add certain synchronization operations in the program, or (c) programmers forget to maintain a common lock guarding accesses to some shared variable v since there are often many lock variables in a real-life program.

Get the file Download here

AddThis Social Bookmark Button
Related Books:
  • VW/Audi V-Checker Manual
  • How to Add Context-Sensitive Help to Visual Basic .NET Windows …
  • Samsung E950 with a 3 Megapixel Camera
  • userSmarts GX
  • Sony Ericsson Announces the S500 Model
  • Nothing compares to U
  • The Z650i UMTS Touch Sensitive Slider
  • New Ultra-Low-Power Touch-sensor Chips

  • Related Searches: , , , ,



    Comments

    Leave a Reply