4 ms·
I have been curious about OS, particularly how a process for a command is handled through it's life cycle, and also things like how redirection works (for thing
by sntran 6y ago
I have been curious about OS, particularly how a process for a command is handled through it's life cycle, and also things like how redirection works (for things like named pipes). Is there some resources on that topic? Searching for how OS works is very vague or too details in other aspects.
- halayli 6y agoYou'll find all the answers in the book 'Advanced Programming in the UNIX environment' by Richard Stevens. It's also referred to by the acronym APUE.
- higerordermap 6y ago> particularly how a process for a command is handled through it's life cycle fork(), execve(), waitpid() and friends > also things like how redirection works dup() ing file descriptors. dup2 is atomic alternative to separately closing a file descriptor and dup'ing to it. xv6 book is freely available on MIT website - it teaches implementation of toy Unix like operating system.. as another commenter mentioned APUE is pretty popular too.
- lex0r 6y agoI really liked the Book „Three Easy Pieces“. You can read it online for free and it gives you a good mental model of how stuff works!
- sntran 6y agoThanks y'all! I have enough material to read through!