ABSTRACT
This repository is a comprehensive guide to systems-level development in C. It tracks the journey from fundamental bit manipulation and memory addressing to the construction of complex systems like custom shells, memory allocators, and web servers.
1. Lecture Examples (Theory)
The foundational concepts explained through lecture notes and diagrams.
- Intro to Systems Programming: Hashing, pointer fundamentals, and memory sizing.
- Strings and Data: Bitwise logic, signedness, and the UTF-8/Unicode standard.
- Systems and Processes: OS process lifecycles, virtual memory, and command tokenization.
- Memory Management: Heap mechanics, struct alignment, and custom allocator implementation.
- Digital Communication: Network I/O and the HTTP request/response cycle.
2. Problem Sets (Reinforcement)
Practical exercises categorized by topic to bridge the gap between lecture and projects.
- PS 1: Data & Bit Manipulation: Exercises in binary conversion, bitwise flags, and UTF-8 handling.
- O and Security: Working with standard input, hexadecimal converters, and SHA256 hashing.
- PS 3: OS & Shell Logic: Implementing
fork,exec, argument parsing, and file system navigation. - PS 4: Allocator Mechanics: Logic for pointer arithmetic, block headers, coalescing, and memory alignment.
- PS 5: Network & Web Servers: Building echo servers, URL decoders, and HTTP path recognizers.
3. Program Assessments (Mastery)
Major projects that synthesize all previous concepts into functional system applications.
| Project | Key Concepts |
|---|---|
| UTF-8 | Bitwise logic, variable-width encoding, multi-byte parsing (stripping headers vs. payload). |
| The Pioneer Shell | The Fork-Exec-Wait loop, process management, signal handling, and environment variables. |
| Malloc | The Heap, explicit free lists, block metadata (headers/footers), alignment, and coalescing. |
| Web Server | TCP Sockets, HTTP protocol parsing (GET/POST), state management, and path routing. |
| Hashing & Passwords | Data integrity, SHA256, salting, and binary-to-hexadecimal conversion. |
Learning Roadmap
- Bit-Level Mastery: Start with
Strings and DataandPS 1to understand how the CPU sees information. - Pointer & Process Control: Study
Systems and ProcessesandPS 3to learn how the OS runs programs. - Advanced Resource Management: Tackle
Memory ManagementandPS 4to understand the Heap. - Network Integration: Use
Digital CommunicationandPS 5to scale your programs to the web.