
Appropriate for all intermediate-to-advanced courses in UNIX or Linux programming. This fully updated UNIX classic covers everything students need to know to master UNIX threads, TCP/IP, and RPC programming--with reusable code examples that explain syntax every step of the way. The authors explain the fundamentals of UNIX programming, focusing on communication, concurrency, and multithreading techniques: how they work, when to use them, and how to use them most effectively. This Second Edition includes entirely new chapters on programming for the Web and multicasting, as well as thoroughly revised and updated coverage of RPC. Coverage also includes files, signals, semaphores, POSIX threads, and client-server communication. The authors illustrate the best ways to write system calls, they present several hands-on projects designed to help students quickly improve their skills. Throughout, the authors present short code examples and simplified network communication libraries, demonstrating how to design complex software to achieve the best possible reliability and performance.
A very good Unix book with lots of projects like shell, token ring etc. is Practical UNIX Programming: A Guide to Concurrency, Communication, and Multithreading by Kay Robbins and Steven Robbins. It's 2nd edition is named UNIX Systems Programming: Communication, Concurrency and Threads. The code given in the book is really illuminating.
1) Foundations of Multithreaded, Parallel, and Distributed Programming by Gregory R. Andrews - This is one of my favourites even though old. You get to learn/compare the different paradigms in one single book.
2) Parallel Programming: Concepts and Practice by Bertil Schmidt et al. - This is a more recent book with good explanations/coverage including CUDA.
3) The Art of Multiprocessor Programming by Maurice Herlihy et al. - Well known classic though with a main focus on shared-memory architectures.
Along with the above you also need more detailed language/library specific implementation books;
a) C++ Concurrency in Action by Anthony Williams.
b) Programming with POSIX Threads by David Butenhof.
c) UNIX Systems Programming: Communication, Concurrency and Threads by Kay Robbins and Steve Robbins.
Finally; for studying concurrency at the OS level where software meets hardware, i have found nothing better than;
i) Unix Systems for Modern Architectures: Symmetric Multiprocessing and Caching for Kernel Programmers by Curt Schimmel.
Unix man pages. Look at /etc/init scripts.
Minux OS source code/documentation[0].
Review / understand BSD version changes/differences. v1.0 to 4.4.
Linux from Scratch[1]
"UNIX Systems Programming: Communication, Concurrency and Threads" by Kay A. Robbins & Steve Robbins
"Expert C Programming, Deep C Secrets" by Peter Van Der Linden
"Comprehensive C" by David Spuler
Awk / shell programming from a CS autonoma perspective. (start search: s-expressions, m-expressions) Note: CS masters level backround knowledge!
[0] : http://www.minix3.org/
* Low-level languages, compiler runtimes, toolchains and libraries.
* OS system call apis.
* Concurrency.
* Networking.
You need books/papers which will teach and walk you through sample idioms and applications in the above domains. A prerequisite is fluency in the C language. With that in mind the following are recommended (some are old books which you can buy used and cheap wherever possible);* Computer Systems: A Programmer's Perspective by Bryant and O'Hallaron.
* The C Companion by Allen Holub. A gem of an oldie.
* ELF: From the Programmer's Perspective; a paper by Hongjiu Lu.
* UNIX Network Programming by Richard Stevens. Initially, get the old 1st edition since it contains TCP/IP, IPC etc. all in one volume.
* Advanced UNIX Programming by Marc Rochkind.
* Advanced programming in the UNIX Environment by Richard Stevens.
* UNIX Systems Programming by Robbins and Robbins.
* Programming for the Real World, POSIX.4 by Bill Gallmeister.
> A secure coding standard form CERT should focus entirely on describing conventions and program properties that do not already follow from the standard as a matter of correctness.
from CERT 1.7 "The wiki also contains two platform-specific annexes at the time of this writing; one annex for POSIX and one for Windows. These annexes have been omitted from this standard because they are not part of the core standard."
So while the CERT does use some examples from system interfaces its not a standard for programming the system interfaces for POSIX or Windows. It looks like there trying to limit the standard to ISO C. The examples you gave fall into the system interface category. POSIX is huge and the same for Windows, much bigger then ISO C.
I think in order to explain conventions for a system interface you really need a longer form publication like a book. So you can take 50 pages to describe an interface and how to use it and show examples etc.
The best way that I have found to figure this stuff out is the standard way. You get a copy of all the relevant standards as a foundation, ISO, POSIX, Window and stuff like CERT. Then you you get some of the system programming books (listed below). Then you find get some good reference code that show best practice. usually code from the operating system or utilities. Lastly read all the compiler docs and tool docs to set up the best code analysis framework you can.
These are a few system programming books that I use.
(best intro book) GNU/Linux Application Programming https://www.amazon.com/GNU-Linux-Application-Programming/dp/...
UNIX Systems Programming https://www.amazon.com/UNIX-Systems-Programming-Communicatio...
Advanced Programming in the UNIX Environment https://www.amazon.com/Advanced-Programming-UNIX-Environment...
Windows System Programming https://www.amazon.com/Programming-Paperback-Addison-Wesley-...
The Linux Programming Interface http://www.man7.org/tlpi/
edit: I'm not sure your skill level, you may have seen all of those but I posted them regardless. There is a lot of security and convention in those books.