{"title":"软件事务性内存与函数式语言中的锁:一个受控实验","authors":"F. C. Filho, J. P. Oliveira, André L. M. Santos","doi":"10.1145/2095050.2095071","DOIUrl":null,"url":null,"abstract":"Many researchers believe that software transactional memory (STM) will play an important role in the transition to multicore systems. However, little effort has been placed on assessing whether STM delivers on its promises of avoiding common concurrent/parallel programming pitfalls. In this paper, we describe a controlled experiment aiming to evaluate the ease of using STM. The study targets Haskell, a purely functional programming language that includes a mature implementation of STM. It compares the use of STM and Haskell's lock-based concurrency control mechanism to develop a program with (coarse-grained) mutual exclusion and synchronization requirements. We organized the 51 subjects in two groups, one for each technique. We found out that the two techniques did not differ significantly in terms of concurrency errors, number of LoC and time to develop the resulting programs. However, for programs where developers made only non-concurrency-related mistakes, STM programmers finished their assignments quicker.","PeriodicalId":143880,"journal":{"name":"SPLASH Workshops","volume":null,"pages":null},"PeriodicalIF":0.0000,"publicationDate":"2011-10-23","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"10","resultStr":"{\"title\":\"Software transactional memory vs. locking in a functional language: a controlled experiment\",\"authors\":\"F. C. Filho, J. P. Oliveira, André L. M. Santos\",\"doi\":\"10.1145/2095050.2095071\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"Many researchers believe that software transactional memory (STM) will play an important role in the transition to multicore systems. However, little effort has been placed on assessing whether STM delivers on its promises of avoiding common concurrent/parallel programming pitfalls. In this paper, we describe a controlled experiment aiming to evaluate the ease of using STM. The study targets Haskell, a purely functional programming language that includes a mature implementation of STM. It compares the use of STM and Haskell's lock-based concurrency control mechanism to develop a program with (coarse-grained) mutual exclusion and synchronization requirements. We organized the 51 subjects in two groups, one for each technique. We found out that the two techniques did not differ significantly in terms of concurrency errors, number of LoC and time to develop the resulting programs. However, for programs where developers made only non-concurrency-related mistakes, STM programmers finished their assignments quicker.\",\"PeriodicalId\":143880,\"journal\":{\"name\":\"SPLASH Workshops\",\"volume\":null,\"pages\":null},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2011-10-23\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"10\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"SPLASH Workshops\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1145/2095050.2095071\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"SPLASH Workshops","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/2095050.2095071","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
Software transactional memory vs. locking in a functional language: a controlled experiment
Many researchers believe that software transactional memory (STM) will play an important role in the transition to multicore systems. However, little effort has been placed on assessing whether STM delivers on its promises of avoiding common concurrent/parallel programming pitfalls. In this paper, we describe a controlled experiment aiming to evaluate the ease of using STM. The study targets Haskell, a purely functional programming language that includes a mature implementation of STM. It compares the use of STM and Haskell's lock-based concurrency control mechanism to develop a program with (coarse-grained) mutual exclusion and synchronization requirements. We organized the 51 subjects in two groups, one for each technique. We found out that the two techniques did not differ significantly in terms of concurrency errors, number of LoC and time to develop the resulting programs. However, for programs where developers made only non-concurrency-related mistakes, STM programmers finished their assignments quicker.