CS631: Advanced Programming in the Unix Environment
stevens.netmeister.org
stevens.netmeister.org
The best references to learn Unix (and TCP/IP and networking) are still William Rich Stevens books.
Other courses/sources that I found very useful:
http://www.cs.cornell.edu/courses/cs114/2003fa/
http://www.cs.cornell.edu/courses/cs214/2004sp/
I subscribe to O'Reilly's video course program, and I've recently been watching Kirk McKusick's course on the design of FreeBSD which is one of the best OS courses I've ever come across.
Wow, that is one pricey course. Are you watching it out of personal interest or because you need it for something in particular?
https://learning.oreilly.com/videos/introduction-to-the/9780...
Why recommend?: lots of great content surrounding networking and file access, most of which will improve your programs a lot, if you code the things I do.
Why reluctantly?: it is heavily dependent on libc. It may ruin you for other languages than C.
Most of the libc shims suck.
/old man yelling at cloud mode on: do kids these days really need to look up who wrote Advanced Programming in the Unix Environment??
PS — I also use it on Linux via GNUstep. I like it that much. :)
musl is an implementation of libc. So if you are using libc, then yeah sure why not.
I was wondering whether there was something different than the standard library which made C a joy.
Things that people mention as being faster are non-null terminated string libraries. Not sure if such would also make a more expressive API
Not exactly, the POSIX API is a superset of the C standard library.
https://man7.org/linux/man-pages/man7/libc.7.html
> The term "libc" is commonly used as a shorthand for the "standard C library", a library of standard functions that can be used by all C programs (and sometimes by programs in other languages).
https://en.wikipedia.org/wiki/C_standard_library
> Starting from the original ANSI C standard, it was developed at the same time as the C library POSIX specification, which is a superset of it.
Thanks for adding nuance and dental.
Your claim is wrong, on a factual level. "The posix programming interface" is not "the C library". So no, not "even more so".
> Unix programming means to use the C library, even plus a bit
This was not what you claimed, and it is entirely possible to write a C program that only uses the POSIX specific functions and avoids any of the functions in the C standard library. It won't do much, but it will run to completion.
What did you do, if I may ask?
Threads, processes, shared memory, synchronized access, pipes, file descriptors, ...
The list goes on, but at the end of the day, basically all higher level constructs boil down to these system primitives. Understand these, and you have a much better foundation to understand high level concepts built on top of them.
https://www.youtube.com/watch?v=3H7SQWTR6Dw
cough cough
https://webcache.googleusercontent.com/search?q=cache:Y56fxQ...
I wasn't excluding the BSDs there, Stevens would definitely have covered dtrace, ZFS, Capsicum etc. But I hope that the Solaris/SysV specific stuff could be put in a forbidden appendix. No more ipcs please!
Could you elaborate on what makes IPCS more suited to CPU-bound tasks vs mmap? Sys V ipcs has always kind of eluded me. I think my exposure to it was mostly via Oracle Databases way back when. Cheers.
Highly, highly recommended if you want to work in SRE or system-focused programming.
which was the other?
And the answer is... both!