0% found this document useful (0 votes)
21 views4 pages

System Programming Course Syllabus

The System Programming Syllabus outlines a comprehensive curriculum covering various topics in system programming, including the C programming language, processes, memory allocation, threading, synchronization, deadlock, virtual memory, networking, filesystems, signals, and security. It also includes sections on honors topics, an appendix with additional resources, and post mortems of notable security incidents. Each section provides a structured approach to learning, with topics, questions, and further reading to enhance understanding.

Uploaded by

cyarahtandon
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views4 pages

System Programming Course Syllabus

The System Programming Syllabus outlines a comprehensive curriculum covering various topics in system programming, including the C programming language, processes, memory allocation, threading, synchronization, deadlock, virtual memory, networking, filesystems, signals, and security. It also includes sections on honors topics, an appendix with additional resources, and post mortems of notable security incidents. Each section provides a structured approach to learning, with topics, questions, and further reading to enhance understanding.

Uploaded by

cyarahtandon
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

System Programming Syllabus

1. Introduction
 Authors
2. Background
 Systems Architecture
 Debugging and Environments
 Valgrind
 GDB
 Homework 0
 University of Illinois Specific Guidelines
3. The C Programming Language
 History of C
 Crash course introduction to C
 Language Facilities
 The C and Linux
 Common C Functions
 C Memory Model
 Pointers
 Common Bugs
 Logic and Program flow mistakes
 Topics
 Questions/Exercises
 Rapid Fire: Pointer Arithmetic
4. Processes
 File Descriptors
 Processes
 Process Contents
 Intro to Fork
 Waiting and Executing
 exec
 The fork-exec-wait Pattern
 Further Reading
 Questions/Exercises
5. Memory Allocators
 Introduction
 C Memory Allocation API
 Intro to Allocating
 Memory Allocator Tutorial
 Case Study: Buddy Allocator, an example of a segregated list
 Case Study: SLUB Allocator, Slab allocation
 Further Reading
 Topics
 Questions/Exercises
6. Threads
 Processes vs threads
 Thread Internals
 Simple Usage
 Pthread Functions
 Race Conditions
 Topics
 Questions
7. Synchronization
 Mutex
 Condition Variables
 Thread-Safe Data Structures
 Software Solutions to the Critical Section
 Working Solutions
 Implementing Counting Semaphore
 Barriers
 Ring Buffer
 Extra: Process Synchronization
 External Resources
 Topics
 Questions
8. Deadlock
 Resource Allocation Graphs
 Coffman Conditions
 Approaches to Solving Livelock and Deadlock
 Dining Philosophers
 Viable Solutions
 Topics
 Questions
9. Virtual Memory and Interprocess Communication
 Translating Addresses
 mmap
 Pipes
 Named Pipes
 Files
 IPC Alternatives
 Topics
 Questions
10. Scheduling
 High Level Scheduler Overview
 Measurements
 Measures of Efficiency
 Scheduling Algorithms
 Topics
 Questions
11. Networking
 The OSI Model
 Layer 3: The Internet Protocol
 Layer 4: TCP and Client
 Layer 4: TCP Server
 Layer 4: UDP
 Layer 7: HTTP
 Non-Blocking IO
 Remote Procedure Calls
 Topics
 Questions
12. Filesystems
 What is a filesystem?
 Storing data on disk
 Permissions and bits
 Virtual filesystems and other filesystems
 Memory Mapped IO
 Reliable Single Disk Filesystems
 Simple Filesystem Model
 Topics
 Questions
13. Signals
 The Deep Dive of Signals
 Sending Signals
 Handling Signals
 Blocking Signals
 Signals in Child Processes and Threads
 Topics
 Questions
14. Security
 Security Terminology and Ethics
 Security in C Programs
 Cyber Security
 Topics
 Review
15. Review
 C
 Processes
 Memory
 Threading and Synchronization
 Deadlock
 IPC
 Filesystems
 Networking
 Security
 Signals
16. Honors topics
 The Linux Kernel
 Containerization
17. Appendix
 Shell
 Stack Smashing
 Compiling and Linking
 Banker’s Algorithm
 Clean/Dirty Forks (Chandy/Misra Solution)
 Actor Model
 Includes and conditionals
 threads.h
 Modern Filesystems
 Linux Scheduling
 The Curious Case of Spurious Wakeups
 Condition Wait Example
 Implementing CVs with Mutexes Alone
 Higher Order Models of Synchronization
 Actor Model and Goroutines
 Scheduling Conceptually
 Networking Extra
 Assorted Man Pages
 System Programming Jokes
18. Post Mortems
 Shell Shock
 Heartbleed
 Dirty Cow
 Meltdown
 Spectre
 Mars Pathfinder
 Mars Again
 Year 2038
 Northeast Blackout of 2003
 Apple IOS Unicode Handling
 Apple SSL Verification
 Sony Rootkit Installation
 Civilization and Ghandi
 The Woes of Shell Scripting
 Appnexus Double Free
 ATT Cascading Failures - 1990

Common questions

Powered by AI

Pointer arithmetic in C involves scaling the numerical operation based on the data type size that the pointer references. For instance, incrementing an integer pointer increases its value by sizeof(int), not by 1. The potential pitfalls include out-of-bounds errors when pointer arithmetic incorrectly assumes the memory layout of data structures, leading to undefined behavior or security vulnerabilities such as buffer overflows .

File descriptors act as an abstract indicator for accessing files or input/output resource streams within processes. In Unix systems, each process has its own file descriptor table, where descriptors 0, 1, and 2 typically refer to standard input, output, and error, respectively. Child processes inherit the parent's file descriptors, allowing for shared access to files or sockets among different processes, facilitating interprocess communication and efficient resource management .

Race conditions occur when threads in a multithreaded application attempt to modify shared resources simultaneously, leading to unexpected behavior due to inconsistent data states. Mitigating strategies include using mutexes to ensure atomic access to critical sections, employing condition variablesto synchronize order of thread execution, applying thread-safe data structures, and using barriers to force threads to wait until certain conditions are met before continuing execution. These techniques help ensure data integrity and synchronization across multiple threads .

The buddy allocator method involves splitting memory into power-of-two-sized blocks to manage memory allocation efficiently, reducing fragmentation and enabling quick allocation and deallocation. Its advantages include simplicity of implementation, quick allocation due to memory alignment, and easy coalescing of free blocks. However, disadvantages comprise internal fragmentation due to rounding up requests to the nearest power of two and complexities in managing split and coalesced blocks that can lead to wasted memory .

The Coffman conditions outline the requirements for deadlock: mutual exclusion, hold and wait, no preemption, and circular wait. These can be addressed by ensuring that at least one condition is not met. Mutual exclusion can sometimes be avoided with lock-free data structures, hold and wait can be prevented by acquiring all necessary resources beforehand, allowing preemption of resources, and breaking circular waits by imposing an order on resource acquisition or by implementing a timeout mechanism .

The fork-exec-wait pattern is a fundamental sequence in Unix systems for creating and managing processes. Fork() creates a new child process duplicating the parent process. Exec() replaces the child's memory space with a new program. Wait() allows the parent process to retrieve the child's exit status, preventing zombie processes and coordinating execution flow. This pattern is vital for resource management and efficiency, providing a structured way to run multiple programs concurrently and enabling complex process hierarchies .

Scheduling algorithms like First-Come, First-Served (FCFS), Shortest Job Next (SJN), Round Robin (RR), and Priority Scheduling each have distinct impacts on process efficiency and system performance. FCFS is simple but can result i...

You might also like