Welcome to Angrave's crowd-sourced System Programming wiki-book! This wiki is being built by students and faculty from the University of Illinois and is a crowd-source authoring experiment by Lawrence Angrave from CS @ Illinois.
Rather than requiring an existing paper-based book this semester, we will build our own set of resources here.
0. HW0/Resources
- [[HW0]]
- [[Informal Glossary of basic terms|#Informal Glossary]]
- [[#Piazza: When And How to Ask For Help]]
- [[ Programming Tricks, Part 1 ]]
- [[ System Programming Short Stories and Songs ]]
1. Learning C
- [[C Programming, Part 1: Introduction]]
- [[C Programming, Part 2: Text Input And Output]]
- Printing to Streams
- Parsing Input
- [[C Programming, Part 3: Common Gotchas]]
- Memory Mistakes
- Logic/Programming Flow
- Other Gotchas
- [[C Programming, Part 4: Strings and Structs]]
- Strings
- Structs
- [[C Programming, Part 5: Debugging]]
- In Code Debugging
- Valgrind
- Tsan
- GDB
- [[C Programming, Review Questions]]
2. Processes
- [[Processes, Part 1: Introduction]]
- Overview
- Process Contents
- Bonus: More Contents
- [[Forking, Part 1: Introduction]]
- Introduction
- Waiting and Execing
- [[Forking, Part 2: Fork, Exec, Wait]]
- The Pattern
- Zombies
- [[Process Control, Part 1: Wait macros, using signals]]
- Wait Macros
- Signals
- [[Processes Review Questions]]
3. Memory and Allocators
- [[Memory, Part 1: Heap Memory Introduction]]
- C Dynamic Memory Allocation
- Introduction to Allocating
- [[Memory, Part 2: Implementing a Memory Allocator]]
- Memory Allocator Tutorial
- [[Memory, Part 3: Smashing the Stack Example]]
- [[Memory Review Questions]]
4. Intro to Pthreads
- [[Pthreads, Part 1: Introduction]]
- Intro to Threads
- Simple Pthreads
- [[Pthreads, Part 2: Usage in Practice]]
- More pthread Functions
- Intro to Race Conditions
- [[Pthreads, Part 3: Parallel Problems (Bonus) ]]
- [[Pthread Review Questions]]
5. Synchronization
- [[Synchronization, Part 1: Mutex Locks]]
- [[Synchronization, Part 2: Counting Semaphores]]
- [[Synchronization, Part 3: Working with Mutexes And Semaphores]]
- [[Synchronization, Part 4: The Critical Section Problem]]
- [[Synchronization, Part 5: Condition Variables]]
- [[Synchronization, Part 6: Implementing a barrier]]
- [[Synchronization, Part 7: The Reader Writer Problem]]
- [[Synchronization, Part 8: Ring Buffer Example]]
- [[Synchronization Review Questions]]
6. Deadlock
- [[Deadlock, Part 1: Resource Allocation Graph]]
- [[Deadlock, Part 2: Deadlock Conditions]]
- [[Deadlock, Part 3: Dining Philosophers]]
- [[Deadlock Review Questions]]
7. Inter-process Communication & Scheduling
- [[Virtual Memory, Part 1: Introduction to Virtual Memory]]
- [[Pipes, Part 1: Introduction to pipes]]
- [[Pipes, Part 2: Pipe programming secrets]]
- [[ Files, Part 1: Working with files]]
- [[ Scheduling, Part 1: Scheduling Processes ]]
- [[ Scheduling, Part 2: Scheduling Processes: Algorithms ]]
- [[ IPC Review Questions]]
8. Networking
- [[ POSIX, Part 1: Error handling]]
- [[ Networking, Part 1: Introduction]]
- [[ Networking, Part 2: Using getaddrinfo ]]
- [[ Networking, Part 3: Building a simple TCP Client ]]
- [[ Networking, Part 4: Building a simple TCP Server ]]
- [[ Networking, Part 5: Shutting down ports, reusing ports and other tricks ]]
- [[ Networking, Part 6: Creating a UDP server ]]
- [[ Networking, Part 7: Nonblocking I O, select(), and epoll ]]
- [[ RPC, Part 1: Introduction to Remote Procedure Calls ]]
- [[ Networking Review Questions ]]
9. File Systems
- [[ File System, Part 1: Introduction ]]
- [[ File System, Part 2: Files are inodes (everything else is just data...) ]]
- [[ File System, Part 3: Permissions ]]
- [[ File System, Part 4: Working with directories ]]
- [[ File System, Part 5: Virtual file systems ]]
- [[ File System, Part 6: Memory mapped files and Shared memory ]]
- [[ File System, Part 7: Scalable and Reliable Filesystems ]]
- [[ File System, Part 8: Removing preinstalled malware from an Android device ]]
- [[ File System, Part 9: Disk blocks example ]]
- [[ File Systems Review Questions ]]
10. Signals
- [[Process Control, Part 1: Wait macros, using signals]]
- Wait Macros
- Signals
- [[ Signals, Part 2: Pending Signals and Signal Masks ]]
- Signals in Depth
- Disposition in Threads/Children
- [[ Signals, Part 3: Raising signals ]]
- [[ Signals, Part 4: Sigaction ]]
- [[ Signals Review Questions ]]
Exam Practice Questions
Warning these are good practice but not comprehensive. The CS241 final assumes you fully understand and can apply all topics of the course. Questions will focus mostly but not entirely on topics that you have used in the lab and programming assignments.
- [[Exam Topics]]
- [[C Programming: Review Questions]]
- [[Multi-threaded Programming: Review Questions]]
- [[Synchronization Concepts: Review Questions]]
- [[Memory: Review Questions]]
- [[Pipe: Review Questions]]
- [[Filesystem: Review Questions]]
- [[Networking: Review Questions]]
- [[Signals: Review Questions]] (todo)
- [[System Programming Jokes]]