Disclaimer

The content of this blog is my personal opinion only. Although I am an employee - currently of Imagination Technologies's MIPS group, in the past of other companies such as Intellectual Ventures, Intel, AMD, Motorola, and Gould - I reveal this only so that the reader may account for any possible bias I may have towards my employer's products. The statements I make here in no way represent my employer's position, nor am I authorized to speak on behalf of my employer. In fact, this posting may not even represent my personal opinion, since occasionally I play devil's advocate.

See http://docs.google.com/View?id=dcxddbtr_23cg5thdfj for photo credits.

Sunday, June 21, 2009

Blogging from ISCA: WDDD: Is TM easier than locks?

Is TM really easier than locks? Programmers must still write critical sections.

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 ..
TM had far fewer errors.

---

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: