views:

75

answers:

1

Where can I find information (books, papers, tutorials) on how concurrency primitives are usually implemented? I'm mostly interested in the implementation of inter-process communication, or message-passing (both synchronous and asynchronous): send, receive, select etc.

+1  A: 

Where to look depends on the level of abstraction you interested in.

Books I've know which touch this topic, by level of abstraction:

  • Hardware: 'Structured Computer Organization' by Tanenbaum;
  • OS Level: Several books about Linux kernel and Tanenbaum's 'Operating Systems Design and Implementation';
  • OS Level API (not implementation): Books by Richard Stevens -- 'Unix Network Programming' & 'Advanced Programming in the Unix environment';
  • In case you interested in distributed systems: again's Tanenbaum 'Distributed Systems: Principles & Paradigms';
Victor Sorokin
Thanks for answering. I didn't find the actual implementation of asynchronous message queues and synchronous messages in any of those books; OS books seem to mention them but won't get into details. For asynchronous messages, the FreeBSD kernel source was actually very helpful; I didn't yet find anything about synchronous message implementation.
Jay
Books I mentioned talk about general principles/algorithms of synchronization primitives. You can look into Ch19 of 'Understanding Linux Kernel' 3rd ed. for description of IPC impl in Linux. Additionally, there's MINIX OS. It was created as the educational POSIX-compliant OS, so it's source code must be simpler to understand than, say, Linux or FreeBSD.
Victor Sorokin