Threads Cannot Be Implemented As a Library. Boehm, H. In Proceedings of the 2005 ACM SIGPLAN Conference on Programming Language Design and Implementation, volume 40, of PLDI '05, pages 261–268, New York, NY, USA, 2005. ACM. event-place: Chicago, IL, USA Citation Key Alias: boehm2005
Paper doi abstract bibtex In many environments, multi-threaded code is written in a language that was originally designed without thread support (e.g. C), to which a library of threading primitives was subsequently added. There appears to be a general understanding that this is not the right approach. We provide specific arguments that a pure library approach, in which the compiler is designed independently of threading issues, cannot guarantee correctness of the resulting code.We first review why the approach almost works, and then examine some of the surprising behavior it may entail. We further illustrate that there are very simple cases in which a pure library-based approach seems incapable of expressing an efficient parallel algorithm.Our discussion takes place in the context of C with Pthreads, since it is commonly used, reasonably well specified, and does not attempt to ensure type-safety, which would entail even stronger constraints. The issues we raise are not specific to that context.
@inproceedings{boehm_threads_2005,
address = {New York, NY, USA},
series = {{PLDI} '05},
title = {Threads {Cannot} {Be} {Implemented} {As} a {Library}},
volume = {40},
isbn = {978-1-59593-056-9},
url = {http://doi.acm.org/10.1145/1065010.1065042},
doi = {10/bnwvv9},
abstract = {In many environments, multi-threaded code is written in a language that was originally designed without thread support (e.g. C), to which a library of threading primitives was subsequently added. There appears to be a general understanding that this is not the right approach. We provide specific arguments that a pure library approach, in which the compiler is designed independently of threading issues, cannot guarantee correctness of the resulting code.We first review why the approach almost works, and then examine some of the surprising behavior it may entail. We further illustrate that there are very simple cases in which a pure library-based approach seems incapable of expressing an efficient parallel algorithm.Our discussion takes place in the context of C with Pthreads, since it is commonly used, reasonably well specified, and does not attempt to ensure type-safety, which would entail even stronger constraints. The issues we raise are not specific to that context.},
urldate = {2019-09-24},
booktitle = {Proceedings of the 2005 {ACM} {SIGPLAN} {Conference} on {Programming} {Language} {Design} and {Implementation}},
publisher = {ACM},
author = {Boehm, Hans-J.},
year = {2005},
note = {event-place: Chicago, IL, USA
Citation Key Alias: boehm2005},
keywords = {Favorites},
pages = {261--268}
}
Downloads: 0
{"_id":"wRcGb9pqJiavscRe7","bibbaseid":"boehm-threadscannotbeimplementedasalibrary-2005","authorIDs":[],"author_short":["Boehm, H."],"bibdata":{"bibtype":"inproceedings","type":"inproceedings","address":"New York, NY, USA","series":"PLDI '05","title":"Threads Cannot Be Implemented As a Library","volume":"40","isbn":"978-1-59593-056-9","url":"http://doi.acm.org/10.1145/1065010.1065042","doi":"10/bnwvv9","abstract":"In many environments, multi-threaded code is written in a language that was originally designed without thread support (e.g. C), to which a library of threading primitives was subsequently added. There appears to be a general understanding that this is not the right approach. We provide specific arguments that a pure library approach, in which the compiler is designed independently of threading issues, cannot guarantee correctness of the resulting code.We first review why the approach almost works, and then examine some of the surprising behavior it may entail. We further illustrate that there are very simple cases in which a pure library-based approach seems incapable of expressing an efficient parallel algorithm.Our discussion takes place in the context of C with Pthreads, since it is commonly used, reasonably well specified, and does not attempt to ensure type-safety, which would entail even stronger constraints. The issues we raise are not specific to that context.","urldate":"2019-09-24","booktitle":"Proceedings of the 2005 ACM SIGPLAN Conference on Programming Language Design and Implementation","publisher":"ACM","author":[{"propositions":[],"lastnames":["Boehm"],"firstnames":["Hans-J."],"suffixes":[]}],"year":"2005","note":"event-place: Chicago, IL, USA Citation Key Alias: boehm2005","keywords":"Favorites","pages":"261–268","bibtex":"@inproceedings{boehm_threads_2005,\n\taddress = {New York, NY, USA},\n\tseries = {{PLDI} '05},\n\ttitle = {Threads {Cannot} {Be} {Implemented} {As} a {Library}},\n\tvolume = {40},\n\tisbn = {978-1-59593-056-9},\n\turl = {http://doi.acm.org/10.1145/1065010.1065042},\n\tdoi = {10/bnwvv9},\n\tabstract = {In many environments, multi-threaded code is written in a language that was originally designed without thread support (e.g. C), to which a library of threading primitives was subsequently added. There appears to be a general understanding that this is not the right approach. We provide specific arguments that a pure library approach, in which the compiler is designed independently of threading issues, cannot guarantee correctness of the resulting code.We first review why the approach almost works, and then examine some of the surprising behavior it may entail. We further illustrate that there are very simple cases in which a pure library-based approach seems incapable of expressing an efficient parallel algorithm.Our discussion takes place in the context of C with Pthreads, since it is commonly used, reasonably well specified, and does not attempt to ensure type-safety, which would entail even stronger constraints. The issues we raise are not specific to that context.},\n\turldate = {2019-09-24},\n\tbooktitle = {Proceedings of the 2005 {ACM} {SIGPLAN} {Conference} on {Programming} {Language} {Design} and {Implementation}},\n\tpublisher = {ACM},\n\tauthor = {Boehm, Hans-J.},\n\tyear = {2005},\n\tnote = {event-place: Chicago, IL, USA\nCitation Key Alias: boehm2005},\n\tkeywords = {Favorites},\n\tpages = {261--268}\n}\n\n","author_short":["Boehm, H."],"key":"boehm_threads_2005","id":"boehm_threads_2005","bibbaseid":"boehm-threadscannotbeimplementedasalibrary-2005","role":"author","urls":{"Paper":"http://doi.acm.org/10.1145/1065010.1065042"},"keyword":["Favorites"],"downloads":0},"bibtype":"inproceedings","biburl":"https://bibbase.org/zotero/k4rtik","creationDate":"2020-05-31T17:07:22.750Z","downloads":0,"keywords":["favorites"],"search_terms":["threads","implemented","library","boehm"],"title":"Threads Cannot Be Implemented As a Library","year":2005,"dataSources":["Z5Dp3qAJiMzxtvKMq"]}