Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Threads Cannot be Implemented as a Library #10

Open
yangwenmai opened this issue Jun 17, 2019 · 0 comments
Open

Threads Cannot be Implemented as a Library #10

yangwenmai opened this issue Jun 17, 2019 · 0 comments

Comments

@yangwenmai
Copy link
Member

yangwenmai commented Jun 17, 2019

Threads Cannot be Implemented as a Library

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.

paper: Threads Cannot be Implemented as a Library

References

  1. https://stackoverflow.com/questions/38666757/implementation-threads-as-library
  2. https://www.cs.cornell.edu/courses/cs6120/2019fa/blog/threads-not-as-libraries/
@yangwenmai yangwenmai changed the title 【paper reading】Threads Cannot be Implemented as a Library Threads Cannot be Implemented as a Library Jun 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant