Free Linux System Programming Course
Master System Calls, Processes, IPC & Networking
About This free Linux System Programming Course
Welcome to the most comprehensive Linux System Programming and UNIX System Programming guide available online. This course covers everything from basic file I/O operations, process management, and memory allocation to advanced topics like POSIX threads, network programming with sockets, interprocess communication (IPC), and signal handling.
Whether you’re learning embedded systems programming, Linux kernel development, or building high-performance applications, this index will guide you through all essential topics including system calls, library functions, process synchronization, and network socket programming.
🔍 Topics Covered
📚 Part 1: Fundamentals of Linux & UNIX System Programming
History and Standards
Understanding UNIX history, Linux evolution, POSIX standards, SUSv3, SUSv4, GNU Project, C programming language standards, and Linux Standard Base (LSB)
Fundamental Concepts
Core operating system concepts: kernel architecture, shell programming, users and groups, directory hierarchy, file I/O model, processes, memory mappings, static and shared libraries, IPC mechanisms
System Programming Concepts
System calls vs library functions, GNU C Library (glibc), error handling with errno, feature test macros, system data types, portability issues in C programming
📁 Part 2: File I/O – The Universal I/O Model
File I/O: The Universal I/O Model
File descriptors, open(), read(), write(), close(), lseek(), file offset manipulation, ioctl() operations, universal I/O in Linux
File I/O: Further Details
Atomicity and race conditions, fcntl(), file status flags, duplicating file descriptors (dup/dup2), pread/pwrite, scatter-gather I/O (readv/writev), truncate operations, nonblocking I/O, large file support
File I/O Buffering
Kernel buffer cache, stdio library buffering, synchronous I/O (sync/fsync/fdatasync), direct I/O, posix_fadvise(), mixing system calls and stdio
⚙️ Part 3: Process Management and Execution
Processes
Process and program concepts, process ID (PID), parent process ID (PPID), memory layout (text, data, heap, stack), virtual memory management, command-line arguments (argc/argv), environment variables, setjmp/longjmp for nonlocal gotos
Memory Allocation
Heap memory allocation with malloc(), free(), calloc(), realloc(), program break adjustment (brk/sbrk), memory allocation implementation, stack allocation with alloca()
Process Creation
Creating processes with fork(), process termination (exit/_exit), waiting for child processes (wait/waitpid), executing programs (exec family), vfork() system call, race conditions after fork(), process synchronization
Process Termination
Process termination details, exit handlers (atexit/on_exit), interactions between fork() and stdio buffers
Monitoring Child Processes
Wait system calls (wait/waitpid/waitid), wait status values, orphan and zombie processes, SIGCHLD signal handling
Program Execution
Executing programs with execve(), exec family functions (execl, execv, execle, execvp, execlp), PATH environment variable, interpreter scripts, file descriptors and exec(), signals and exec(), system() function
Process Creation and Program Execution in More Detail
Process accounting, clone() system call, speed of process creation, effect of exec() and fork() on process attributes
🔐 Part 4: Users, Groups, and Process Credentials
Users and Groups
Password file (/etc/passwd), shadow password file (/etc/shadow), group file (/etc/group), retrieving user and group information, password encryption and user authentication
Process Credentials
Real user ID, effective user ID, saved set-user-ID, file-system user ID, set-user-ID and set-group-ID programs, supplementary group IDs, retrieving and modifying process credentials
⏰ Part 5: Time, Timers, and Date Operations
Time
Calendar time, time_t, time conversion functions, broken-down time (struct tm), time zones, locales, updating system clock, software clock (jiffies), process time measurement
Timers and Sleeping
Interval timers (setitimer/getitimer), timer scheduling and accuracy, timeout on blocking operations, sleeping functions (sleep/nanosleep), POSIX clocks, POSIX interval timers, timerfd API
📡 Part 6: Signals – Asynchronous Events
Signals: Fundamental Concepts
Signal concepts, signal types and default actions, changing signal dispositions (signal/sigaction), signal handlers, sending signals (kill/raise/killpg), signal sets, signal mask, pending signals, pause() function
Signals: Signal Handlers
Designing signal handlers, reentrant and async-signal-safe functions, global variables in signal handlers (sig_atomic_t), nonlocal goto from signal handler, abnormal process termination (abort), alternate signal stack (sigaltstack), SA_SIGINFO flag, system call interruption and restarting
Signals: Advanced Features
Core dump files, hardware-generated signals, realtime signals, waiting for signals (sigsuspend/sigwaitinfo/sigtimedwait), reading signals via file descriptor (signalfd), interprocess communication with signals
🧵 Part 7: POSIX Threads (Pthreads)
Threads: Introduction
Thread concepts, Pthreads API basics, thread creation (pthread_create), thread termination, thread IDs, joining threads (pthread_join), detaching threads, thread attributes, threads vs processes comparison
Threads: Thread Synchronization
Mutexes for protecting shared variables (pthread_mutex), mutex locking/unlocking, mutex deadlocks, mutex types, condition variables (pthread_cond) for signaling state changes, producer-consumer pattern
Threads: Thread Safety and Per-Thread Storage
Thread safety and reentrancy, one-time initialization (pthread_once), thread-specific data (TSD), thread-local storage (TLS)
Threads: Thread Cancellation
Canceling threads (pthread_cancel), cancellation state and type, cancellation points, cleanup handlers
💬 Part 8: Interprocess Communication (IPC)
Pipes and FIFOs
Creating and using pipes (pipe), bidirectional communication, pipes and stdio, FIFOs (named pipes), mkfifo(), pipe and FIFO I/O semantics, nonblocking I/O on pipes/FIFOs
System V IPC
System V IPC overview, message queues (msgget/msgsnd/msgrcv), semaphores (semget/semop/semctl), shared memory (shmget/shmat/shmdt/shmctl), IPC object permissions, IPC keys and identifiers
Memory Mappings and POSIX IPC
Memory mappings (mmap/munmap), shared memory mappings, memory-mapped I/O, POSIX message queues (mq_open/mq_send/mq_receive), POSIX semaphores (sem_open/sem_wait/sem_post), POSIX shared memory (shm_open/shm_unlink), memory protection (mprotect)
💾 Part 9: File Systems and Advanced File Operations
File Systems
Device special files, disks and partitions, file system structure, i-nodes, virtual file system (VFS), journaling file systems, mount points, mounting and unmounting (mount/umount), tmpfs virtual memory file system
File Attributes
Retrieving file information (stat/lstat/fstat), file timestamps, file ownership (chown/fchown), file permissions, set-user-ID/set-group-ID/sticky bits, umask, chmod/fchmod, extended file attributes (ext2)
Extended Attributes and Access Control Lists
Extended attributes (EA) overview, system calls for EA manipulation (setxattr/getxattr/listxattr/removexattr), Access Control Lists (ACLs), ACL permission-checking, ACL API
Directories and Links
Directories and hard links, symbolic links, creating/removing links (link/unlink), renaming files (rename), working with symbolic links (symlink/readlink), creating/removing directories (mkdir/rmdir), reading directories (opendir/readdir), file tree walking (nftw), current working directory, chroot
Monitoring File Events
inotify API for monitoring file events, inotify_init/inotify_add_watch, reading inotify events, inotify events types, queue limits
🌐 Part 10: Sockets and Network Programming
Sockets: Introduction and UNIX Domain
Socket concepts, socket(), bind(), listen(), accept(), connect(), socket addresses, stream sockets, datagram sockets, UNIX domain sockets, socketpair(), socket I/O operations
Sockets: Internet Domain and Network Programming
Internet domain sockets, IPv4 and IPv6 addresses, network byte order, host and service conversion (getaddrinfo/getnameinfo), TCP/IP fundamentals, UDP sockets, socket options (setsockopt/getsockopt), server design, inetd daemon
Alternative I/O Models
I/O multiplexing with select() and poll(), signal-driven I/O, epoll API (epoll_create/epoll_ctl/epoll_wait), comparing I/O models, edge-triggered and level-triggered notification
🚀 Part 11: Advanced System Programming Topics
Process Scheduling and Priority
Process scheduling overview, realtime scheduling policies (SCHED_FIFO, SCHED_RR), scheduling priority, CPU affinity, resource limits (getrlimit/setrlimit)
Process Groups, Sessions, and Terminals
Process groups (setpgid/getpgid), sessions (setsid), controlling terminals, foreground and background process groups, job control, terminal I/O, pseudoterminals (pty)
Shared Libraries and Dynamic Linking
Creating and using shared libraries, static libraries, library versions, soname, dynamic linking, dlopen/dlsym/dlclose, symbol visibility, library initialization and finalization
Daemons and System Logging
Daemon processes, creating daemons, daemon conventions, syslog logging facility (syslog/openlog/closelog), /var/log files
System Limits and System Information
System limits and options, sysconf/pathconf/fpathconf, /proc file system, system identification (uname), retrieving system information
File Locking
File locking overview, flock() for whole-file locking, fcntl() record locking, mandatory vs advisory locking, lock inheritance and release, lock limits and performance
📖 Recommended Learning Path
Start with Chapters 1-3 to understand UNIX/Linux history, standards, and basic system programming concepts including system calls and library functions.
Master file I/O operations (Chapters 4-5, 13) including open(), read(), write(), and buffering mechanisms – the foundation of all I/O in UNIX.
Learn process creation, execution, and management (Chapters 6-7, 24-28) including fork(), exec(), wait(), and process attributes.
Understand asynchronous event handling with signals (Chapters 20-22) including signal handlers, signal sets, and realtime signals.
Master interprocess communication mechanisms (Chapters 44-54) including pipes, message queues, semaphores, and shared memory.
Learn POSIX threads programming (Chapters 29-32) including thread creation, synchronization with mutexes and condition variables.
Build network applications (Chapters 56-63) using sockets API, TCP/IP, UDP, and advanced I/O models like epoll.
Explore advanced subjects including process scheduling, daemons, shared libraries, file locking, and terminal I/O.
🔑 Complete Topics Coverage
This Linux system programming course covers POSIX-compliant system programming, GNU/Linux programming, embedded Linux development, kernel-level programming concepts, systems software development, low-level programming in C, UNIX API programming, and Linux application development.
Learn essential topics: file descriptor management, process control, inter-thread communication, socket programming TCP UDP, POSIX message queues, shared memory programming, semaphore programming, signal handling in Linux, asynchronous I/O, memory-mapped files, virtual memory management, process scheduling algorithms, realtime programming, and concurrent programming.
Master system calls: fork() system call, exec() family, wait() and waitpid(), pipe() and mkfifo(), socket() and bind(), pthread_create(), pthread_mutex_lock(), mmap() and munmap(), select() poll() epoll(), signal() and sigaction(), open() read() write(), malloc() and free(), and hundreds more.
Start Your Linux System Programming Journey Today!
This complete index covers all essential topics in Linux and UNIX system programming. Whether you’re preparing for embedded systems development, kernel programming, or building high-performance applications, this comprehensive guide will take you from basics to advanced concepts.
Free Learning to all !!
EmbeddedPathashala.
