We may earn an affiliate commission when you visit our partners.
Matt Sawka

Overview

This course is intended to be an introductory course for those interested in systems programming. I tried to keep this course very simple and easy to understand. In order to do that I created this slide deck that is short and concise, with programming example to compliment them. I will introduce you to the main concepts so you will have a strong foundation and base point to dive deeper into these topics and cover additional topics on your own.

General Course Contents

Read more

Overview

This course is intended to be an introductory course for those interested in systems programming. I tried to keep this course very simple and easy to understand. In order to do that I created this slide deck that is short and concise, with programming example to compliment them. I will introduce you to the main concepts so you will have a strong foundation and base point to dive deeper into these topics and cover additional topics on your own.

General Course Contents

  1. System calls and how they interact with the kernel

  2. File manipulation looking at how to create, delete, and edit files using system call

  3. (briefly) Memory management and how exactly Unix deals with virtual memory addressing

  4. Processes: how to create one and what they are used for.

  5. Threads and how they are used.

  6. Synchronization issues that arise when using processes and threading

Enroll now

What's inside

Learning objectives

  • Understand how to use system calls to accomplish: file manipulation, process control, threads, and syncronization.
  • Know how to implement existing functions, such as gcc, by using system calls.
  • Review the unix operating system structure.
  • Be able to manipulate files using system calls.
  • Understand how processes work between the child and parent.
  • Learn proper technique for passing variables into a thread safe function.
  • Understand the overlap between processes and threading.
  • Know how semaphores are used to solve the bounded buffer problem.

Syllabus

Learn the foundations of systems programming in C and C++.

Lecture to cover the course contents and what you to expect!

File Manipulation using System Calls
Read more

Recognize the different categories of system calls.

Understand what a system call is and system calls are used for.

Visualize the Unix operating system structure.

Tell the difference between the user space and kernel space.

See what each layer within each space is and used for.

See the process for using systems call in C.

Become familiar with using linux "man" pages to aid in development.

Learn the different types of file streams and learn how to find the variables in header files.

Write "hello world" using a system call.

Learn and implement different file manipulation system calls.

Proper way to check the return values to ensure that an error did not occur

How to utilize the open() system call to open or create a file

How to utilize the close() system call to close a file

Become familiar with the different create modes when using the open() system call

Create file permissions using octal values

How to utilize the remove() system call to delete a file

How to utilize the read() system call to read text from a file

How to iterate over a file to read all the contents

How to write text to a file using the write() system call

How to utilize the lseek() system call to write text to different parts of a file

Using lseek() to write to the beginning, middle, and end of a file

Utilize lseek() whence argument to specify where to write text in file: SEEK_SET, SEEK_CUR, SEEK_END

Learn the basis of processes!

Learn the basis of processes

See examples of windows and linux processes in action

Process memory mapping. See how linux can use the same virtual memory address for two instances of the same program.

Understand the different process states of a process

Learn the basics of a process scheduler


Learn the main process related system calls

Utilize the fork() system call to fork a child process

Utilize the execv() system call to fork a new process & load a program into the child memory address space

Realize the differences between fork() and execv()

Implement the wait() system call and understand what it does

Write a simple fork C program to show the parent child relationship using the fork() system call

Use system calls to write unix based system calls

Use execv() system call to implement the GCC command


Learn what threads are and how to use them!

Learn the basis of threads, what they are and how to use them

Recognize that there are different libraries to create multi-threaded applications

Learn the pthread library

Learn how to create a thread

Learn how to terminate a thread

Learn how to wait for a thread to finish executing by using pthread_join

Learn the proper way to wait for multiple threads to finish executing using pthread_join

Experience create a simple thread program

Learn the technique for creating multiple threads

Learn the proper technique for waiting for multiple threads to finish executing

Recognize the challenges when passing variables to a thread safe function

Learn the proper technique for passing variables into a thread safe function


Semaphores & Bounded Buffer Problem

Learn the basics and concepts of synchronization using semaphores

Learn how to use semaphores to handle critical sections

Critical Section examples

Learn what semaphores are and how they solve synchronization issues

How to use a semaphore count

Signal() method: learn what it does and how to use it

wait() method: learn what it does and how to use it

Become aware of the common synchronization problems

Go over the bounded buffer problem

Understand the bounded buffer pseudocode

Go over an example of the bounded buffer problem

Save this course

Save Introduction to Systems Programming in C to your list so you can find it easily later:
Save

Activities

Be better prepared before your course. Deepen your understanding during and after it. Supplement your coursework and achieve mastery of the topics covered in Introduction to Systems Programming in C with these activities:
Review C Programming Fundamentals
Strengthen your understanding of C programming concepts, which are essential for systems programming.
Show steps
  • Review basic C syntax and data types.
  • Practice writing simple C programs.
  • Study pointers and memory management in C.
Read 'Understanding the Linux Kernel'
Gain a deeper understanding of the Linux kernel, which is crucial for systems programming.
Show steps
  • Read the chapters related to system calls and memory management.
  • Take notes on key concepts and kernel structures.
Pair Programming on System Call Examples
Collaborate with peers to practice using system calls and troubleshoot common issues.
Show steps
  • Partner with another student.
  • Choose a system call example to work on together.
  • Write the code collaboratively, discussing each step.
  • Test and debug the code together.
Four other activities
Expand to see all activities and additional details
Show all seven activities
Read 'Advanced Programming in the UNIX Environment'
Expand your knowledge of UNIX system programming with this comprehensive guide.
Show steps
  • Focus on chapters related to processes, file I/O, and interprocess communication.
  • Study the examples and try implementing them yourself.
Implement System Calls
Reinforce your understanding of system calls by implementing simplified versions of common utilities.
Show steps
  • Choose a system call to implement (e.g., `ls`, `cat`).
  • Write C code to mimic the functionality of the chosen system call using system calls.
  • Test your implementation thoroughly.
Document System Call Usage
Solidify your knowledge by creating documentation and examples for using specific system calls.
Show steps
  • Select a few system calls covered in the course.
  • Write clear and concise documentation for each system call, including examples.
  • Share your documentation with other students.
Build a Simple Shell
Apply your knowledge of system calls, processes, and threads to create a functional shell.
Show steps
  • Implement basic command parsing and execution.
  • Add support for built-in commands (e.g., `cd`, `exit`).
  • Implement process creation and management using `fork()` and `execv()`.
  • Add support for background processes and signal handling.

Career center

Learners who complete Introduction to Systems Programming in C will develop knowledge and skills that may be useful to these careers:
Kernel Developer
A Kernel Developer works on the core of an operating system, building and maintaining the kernel. This course is directly relevant as it is an introduction to systems programming, focusing on how software interacts with the kernel. Understanding system calls, file manipulation, memory management, processes, and threads, as covered in the course, are essential for anyone working on kernel development. The course helps build a foundation in the Unix operating system structure, which is often the basis for kernel development.
Operating Systems Developer
An Operating Systems Developer designs and implements the core software that manages computer hardware and resources. This course helps build a foundation in understanding system calls and their interaction with the kernel, which is crucial for operating system development. The course's exploration of file manipulation, memory management, processes, and threads provides an essential overview of the concepts an operating system developer deals with daily. Since the course covers the Unix operating system structure, it gives aspiring operating systems developers an understanding of how operating systems like Linux works. Further, the course's content on synchronization issues arising from processes and threading would be valuable
Performance Engineer
A Performance Engineer analyzes and optimizes software systems to improve their speed, efficiency, and scalability. This course helps build a foundation for a performance engineer by providing insight into how software interacts with the underlying operating system. The course's exploration of system calls, memory management, processes, and threads is directly applicable to identifying and resolving performance bottlenecks. The knowledge about synchronization issues gained from this course may be particularly useful for optimizing concurrent systems.
Device Driver Developer
A Device Driver Developer creates the software that allows an operating system to communicate with hardware devices. This course helps build a foundation for this role by teaching how system calls interact with the kernel. The course's content on file manipulation, memory management, processes, and threads provides insight into how drivers interact with the operating system. The course's emphasis on the Unix operating system structure could be invaluable, given that many device drivers are written for Unix-like systems.
Systems Engineer
A Systems Engineer focuses on designing, integrating, and managing complex systems throughout their lifecycle. This course helps build a foundation in the core principles of how systems operate at a low level. The course's coverage of system calls, file manipulation, memory management, processes, and threads provides insights into the building blocks of system design. The course's focus on the Unix operating system structure also helps one understand the fundamental components of a system, and how they interact with each other. It also introduces approaches for managing system resources and ensures smooth operation.
Systems Administrator
A Systems Administrator is responsible for maintaining and managing computer systems and servers, ensuring they run smoothly and efficiently. This course helps build a foundation for systems administrators by teaching about the underlying operating system and how to interact with it using system calls. The course's content on file manipulation, process control, threads, and synchronization directly relates to the tasks a systems administrator performs. The overview of the Unix operating system structure may be helpful, as many servers run on Unix-like systems.
Reverse Engineer
A Reverse Engineer analyzes software to understand its inner workings, often to identify vulnerabilities or understand proprietary code. This course introduces system calls and their interactions with the kernel, which is useful for understanding how software interacts with the operating system at a low level. The course's content on file manipulation, memory management, processes, and threads can be directly applied to reverse engineering tasks. The course's treatment of topics relevant to the Unix operating system structure makes it potentially useful for those reverse engineering programs for such systems.
Software Engineer
A Software Engineer designs, develops, and tests software applications. While this role can be broad, this course specifically focuses on providing a deep understanding of system-level interactions, which helps build a foundation for writing efficient and effective code. The course's coverage of system calls, file manipulation, processes, and threads can be directly applied to optimizing software performance and resource utilization. Exposure to the Unix operating system structure in the course may be useful, as many software applications run on Unix-like systems.
Embedded Systems Engineer
An Embedded Systems Engineer develops software for devices with dedicated functions within larger systems, such as those found in cars or appliances. This course provides an introduction to system-level programming concepts that are directly applicable to embedded systems, often programmed in C. The focus on system calls, file manipulation, memory management, processes, and threads within the course mirrors the challenges faced when programming embedded devices. The course may be useful for understanding how to design and implement embedded systems, particularly concerning resource management and process handling.
Security Engineer
A Security Engineer focuses on protecting computer systems and networks from threats and vulnerabilities. This course may be useful for security engineers who want to understand the underlying system-level interactions of software. The course's coverage of system calls, memory management, processes, and threads can be relevant to identifying and mitigating security risks. The understanding of the Unix operating system structure from the course may be helpful for securing Linux-based systems.
DevOps Engineer
A DevOps Engineer automates and streamlines the software development and deployment process. This course may be useful for DevOps engineers by improving their understanding of systems programming principles. The course's exploration of system calls, file manipulation, processes, and threads can aid in automating system-level tasks and troubleshooting issues. The content regarding the Unix operating system structure can be applicable, as DevOps often involves managing Linux-based environments. The course's treatment of processes and threading could give extra insight for containerization and orchestration.
Compiler Developer
A Compiler Developer designs and implements compilers that translate code from one language to another. This course gives insights into how system calls work, and how they can be used to implement existing functions, such as GCC. The course may be useful for those who are interested in the low-level interactions between code and the operating system. The course's coverage of memory management, processes, and threads can be helpful for understanding some of the challenges in compiler design, especially regarding optimization and parallelization.
Software Architect
A Software Architect is responsible for making high-level design choices and setting technical standards for software projects. This course may be useful for a software architect by giving insight into how systems work at a low level, which helps in making informed design decisions. The course's coverage of system calls, file manipulation, processes, and threads can be relevant to understanding the performance implications of different design choices. The content on the Unix operating system structure can provide a useful background for designing systems that run on Unix-like platforms.
Technical Lead
A Technical Lead guides a team of developers, providing technical expertise and ensuring the successful completion of projects. This course may be useful for technical leads looking to deepen their understanding of system-level programming, enabling them to make better-informed technical decisions. The course's coverage of system calls, file manipulation, processes, and threads can be helpful for understanding the performance and resource utilization aspects of software development. The course's treatment of the Unix operating system structure can be useful in environments that rely on Unix-like systems, providing them knowledge to guide their team effectively.
Database Administrator
A Database Administrator (DBA) manages and maintains database systems, ensuring their performance, security, and availability. This course may be useful for DBAs to improve their understanding of how the underlying operating system interacts with the database software. The course's coverage of file manipulation, memory management, processes, and threads can be relevant to optimizing database performance and troubleshooting issues. The understanding of the Unix operating system structure from the course can be helpful for managing databases that run on Unix-like systems.

Reading list

We've selected two books that we think will supplement your learning. Use these to develop background knowledge, enrich your coursework, and gain a deeper understanding of the topics covered in Introduction to Systems Programming in C.
Classic resource for understanding UNIX system programming. It covers system calls, file I/O, processes, and interprocess communication in detail. It valuable reference for anyone working with UNIX-based systems. This book is commonly used as a textbook at academic institutions and by industry professionals.
Provides a comprehensive overview of the Linux kernel architecture and its internal workings. It is particularly useful for understanding the system calls and memory management concepts covered in the course. While detailed, it serves as an excellent reference for those wanting to delve deeper into the OS. This book is commonly used by system programmers and operating system developers.

Share

Help others find this course page by sharing it with your friends and followers:

Similar courses

Similar courses are unavailable at this time. Please try again later.
Our mission

OpenCourser helps millions of learners each year. People visit us to learn workspace skills, ace their exams, and nurture their curiosity.

Our extensive catalog contains over 50,000 courses and twice as many books. Browse by search, by topic, or even by career interests. We'll match you to the right resources quickly.

Find this site helpful? Tell a friend about us.

Affiliate disclosure

We're supported by our community of learners. When you purchase or subscribe to courses and programs or purchase books, we may earn a commission from our partners.

Your purchases help us maintain our catalog and keep our servers humming without ads.

Thank you for supporting OpenCourser.

© 2016 - 2025 OpenCourser