tag:blogger.com,1999:blog-1228698015266547737.post6120765399880353077..comments2023-07-28T01:27:33.228-07:00Comments on Computational Thoughts: Some examples of Software Transactional Memory in HaskellJosefhttp://www.blogger.com/profile/13272830598221833253noreply@blogger.comBlogger6125tag:blogger.com,1999:blog-1228698015266547737.post-44100076659940020282014-05-20T14:46:41.688-07:002014-05-20T14:46:41.688-07:00This comment has been removed by the author.Hussain Sobhyhttps://www.blogger.com/profile/14600246493528044733noreply@blogger.comtag:blogger.com,1999:blog-1228698015266547737.post-88502234854826376982012-12-19T00:10:50.326-08:002012-12-19T00:10:50.326-08:00cheater,
Since I wrote this example I've patc...cheater,<br /><br />Since I wrote this example I've patched GHC so that the starvation issue doesn't come up.<br /><br />http://hackage.haskell.org/trac/ghc/ticket/2319Josefhttps://www.blogger.com/profile/13272830598221833253noreply@blogger.comtag:blogger.com,1999:blog-1228698015266547737.post-9320823474967122752012-12-18T12:38:10.168-08:002012-12-18T12:38:10.168-08:00Hi,
I have run your example with a constant thread...Hi,<br />I have run your example with a constant threadDelay and none of the philosophers starve. They all seem to enjoy the same amount of transitions. I tried with 5 and 50 philosophers and then got bored, but my intuition says it works for any amount. I am on GHC 7.4.1 and Linux 3.5.0 generic. I tried with -threaded and -threaded -rtsopts too and couldn't reproduce.cheaterhttps://www.blogger.com/profile/17582891779655886034noreply@blogger.comtag:blogger.com,1999:blog-1228698015266547737.post-43919320103020765892010-07-15T19:55:53.673-07:002010-07-15T19:55:53.673-07:00Interesting blog, i usally be aware all about all ...Interesting blog, i usally be aware all about all different kind of sofware. i am online all the time, and this action allow me to see a site <a href="http://www.costaricaindex.com/homes-for-sale-in-costa-rica/" title="costa rica homes for sale" rel="nofollow">costa rica homes for sale</a> and i like it too much. beyond all doubt without my computer i never would have seen this site too.Unknownhttps://www.blogger.com/profile/00303888404713862153noreply@blogger.comtag:blogger.com,1999:blog-1228698015266547737.post-31635818349622096052008-12-19T12:43:00.000-08:002008-12-19T12:43:00.000-08:00I/O can be performed inside of a transaction; the ...I/O can be performed inside of a transaction; the transaction just has to be irrevocable (inevitable) or isolated. Welc et al. and Spear et al. have good papers out explaining irrevocability (inevitability).<BR/><BR/>Cheers,<BR/>JustinUnknownhttps://www.blogger.com/profile/01344125680486558879noreply@blogger.comtag:blogger.com,1999:blog-1228698015266547737.post-81509445283598671142008-04-22T06:36:00.000-07:002008-04-22T06:36:00.000-07:00To make this program interesting we have to output...<I>To make this program interesting we have to output what the philosophers are doing so that we can verify that the simulation is correct. But the standard I/O primitives in Haskell are not thread safe so we have to take a bit of care when writing stuff to standard out.<BR/></I><BR/>I think the issue is not that primitives aren't thread safe, but rather that IO actions can't be performed inside a transition to allow retrying in case the commit fails.Pedro Baltazar Vasconceloshttps://www.blogger.com/profile/01383651854208249259noreply@blogger.com