A CSP Model for Java Multithreading

Uloženo v:
Podrobná bibliografie
Název: A CSP Model for Java Multithreading
Autoři: H. Welch, Jeremy M. R. Martin, Presented Tim Grabowski
Přispěvatelé: The Pennsylvania State University CiteSeerX Archives
Zdroj: http://se.inf.ethz.ch/courses/2012a_spring/ccc/seminars/Grabowski.pdf.
Informace o vydavateli: Questions
Rok vydání: 2000
Sbírka: CiteSeerX
Popis: Why Java needs a CSP model • Many Java programs using threads seem to work correctly, but • Data races might be hidden • Deadlocks might not yet be detected • How can we be sure that data races and deadlocks in fact cannot occur? Why Java needs a CSP model • Solution: Model Java‘s synchronization facility in CSP • Allows us to reason in a formal way about its correct usage in Java programs • Synchronization primitives of Java‘s client interface that are modelled: • synchronized • wait(), notify(), notifyAll() Java Monitors in CSP • We model synchronized by the following CSP processes [1]: • STARTSYNC ( o, me) = claim.o.me ➔ SKIP • ENDSYNC ( o, me) = release.o.me ➔ SKIP Java Monitors in CSP • wait(), notify(), notifyAll() are modelled by the following CSP processes [1]: • WAIT(o, me) = waita.o.me ➔ release.o.me ➔ waitb.o.me ➔ claim.o.me ➔ SKIP • NOTIFY ( o, me) = notify.o.me ➔ SKIP • NOTIFYALL ( o, me) = notifyAll.o.me ➔ SKIP Java Monitors in CSP • Java‘s internal monitor facility for an object o is modelled by [1]
Druh dokumentu: text
Popis souboru: application/pdf
Jazyk: English
Relation: http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.648.9517; http://se.inf.ethz.ch/courses/2012a_spring/ccc/seminars/Grabowski.pdf
Dostupnost: http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.648.9517
http://se.inf.ethz.ch/courses/2012a_spring/ccc/seminars/Grabowski.pdf
Rights: Metadata may be used without restrictions as long as the oai identifier remains attached to it.
Přístupové číslo: edsbas.8D8B6E9C
Databáze: BASE
Popis
Abstrakt:Why Java needs a CSP model • Many Java programs using threads seem to work correctly, but • Data races might be hidden • Deadlocks might not yet be detected • How can we be sure that data races and deadlocks in fact cannot occur? Why Java needs a CSP model • Solution: Model Java‘s synchronization facility in CSP • Allows us to reason in a formal way about its correct usage in Java programs • Synchronization primitives of Java‘s client interface that are modelled: • synchronized • wait(), notify(), notifyAll() Java Monitors in CSP • We model synchronized by the following CSP processes [1]: • STARTSYNC ( o, me) = claim.o.me ➔ SKIP • ENDSYNC ( o, me) = release.o.me ➔ SKIP Java Monitors in CSP • wait(), notify(), notifyAll() are modelled by the following CSP processes [1]: • WAIT(o, me) = waita.o.me ➔ release.o.me ➔ waitb.o.me ➔ claim.o.me ➔ SKIP • NOTIFY ( o, me) = notify.o.me ➔ SKIP • NOTIFYALL ( o, me) = notifyAll.o.me ➔ SKIP Java Monitors in CSP • Java‘s internal monitor facility for an object o is modelled by [1]