Experiment: measure on a class of inexperienced programmers in a UT OS class.
The problem: sync gallery: a rogue's gallery of synchronization. Rogues shoot paint balls in lanes. Cleaners. Etc.
9 different variations: {single lane, two lane, cleaner thread} X {coarse, fine, TM}
TM support: Year1 DSTM2 (Herlihy 06). Year2 JDASTM (Ramadan 09). Library, not langage support.
DSTM syntax baroque. "thread.doit(method)" == thread.execute_method_as_transaction(method).
JDASTM: txbegin, txend.
Survey included experience, hours, rankings
147 students
Hours reported:
single lane: coarse grained > tm > fine grain. They did coarse grained first.
Best syntax: coarse > (TM|Coarse) > fine > (fine|conditions)
Easiest to think about: coarse > fine|conditions > tm
Defects tested using condor.
Errors taxonomy:
- lock ordering - 8%
- lock cond - 7%
- lock forgot - 15%
- cv exotic - 8%
- cv use - 11%
- tm exotic - 3%
- tm forgot ..
- tm order - not really a bug ..
---
Wants support for atomic blocks.
---
I asked if there were programmer visible abort actions - if there was contention. There was not.
AFG opinion: abort actions will be a source of errors. Hard to test. I like transactions, but I hate increasing non-determinism.
Audience Q: learning curve. Why not teach TM first, and then translate into locks?
I was surprised at syntax preference for coarse grained locks. IMHO txstart/txend is almost equivalent to lock/unlock coarse grained locks. The presenter was similarly puzzled.
No comments:
Post a Comment