brucehsu / GobiesVM

A Ruby VM written in Go aims to exploit parallelism via Software Transactional Memory
MIT License
184 stars 8 forks source link

Adjust transaction length #14

Open brucehsu opened 10 years ago

brucehsu commented 10 years ago

Currently GobiesVM ends a transaction on BC_GETLOCAL and BC_SEND bytecode instructions. However, these two are too frequent therefore shrink transaction length. Shorter transactions do well when abort rate is high, but produce too much initialization overhead on the other hand. We can set a counter to determine how many instruction encounters to end a transaction. To avoid consistently abort on lengthy transactions, we can decrement the counter maximum on each retry.