What will it take for Transactional Memory to be viable?

痞子三分冷 提交于 2019-12-04 11:00:49

I have done some experimenting with TBoost STM and it seems to be usable, though I would not be comfortable using it in a production product yet. The shift in thinking needed is significant though, so I doubt it will catch on unless it shows a compelling benefit in real applications.

I keep hearing that the future is in massively parallel computing as CPUs start to double in cores like they used to double in frequency. So far, 4- and 8-core desktops aren't really showing themselves to be useful for general workloads. I think we have a bit of a chicken-and-egg problem: adoption of parallel machines is waiting on software capable of taking full advantage, while mainstream development of highly parallel software is waiting for ubiquity of highly parallel hardware.

I think perhaps what's needed is an open-source software project to adopt an STM model for something like a web server. A successful project like that would be an excellent model and might help kickstart interest across the software industry by proving that STM is ready for the real world.

Several things:

1) The Software Transactional Memory (STM) System would have to be robust, reliable, and tested so that it actually works.

2) The performance overhead of an uncontested STM transaction should be comparable to the same routine with a uncontested lock.

3) The STM system must perform significantly better when multiple transactions are pending vs using a lock on contested resources.

I think that there are some criteria that A STM system must provide to user adoption:

Simplicity: The use of transactions is in theory more simple than using lock, but in practice it is not the case there will be no reason to use it.

Performances: The user can accept that the performances be a little bit slower than using locks, but not too much slower.

Interaction with non-transactional world: STM systems that work only on a transaction only world can not succeed for people that works in projects that need to work with a legacy system, or that has other constraints, that can be solved better using other paradigms.

Correctness: The user needs to be confident that the system s/he is using is correct on its foundations as well as in its implementation. Most of the current STM systems are not at the stage of a product, so people can suffer of unstable versions for a moment.

Debugging tools: The debugger tools must be adapted to this new paradigm (at least when the STM system is incorporated on the language), as debugging could be more complex when the same code is executed several times if there are conflicts.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!