We may earn an affiliate commission when you visit our partners.
Course image
Abhishek CSEPracticals, Shiwani Nigam, and Ekta Ekta

About This Course is about learning How Linux Processes Talk to each Other. This is a sub-domain of Linux System Programming. We shall explore various popular mechanism used in the industry through which Linux processes to exchange data with each other. We will go through the concepts in detail behind each IPC mechanism, discuss the implementation, and design and analyze the situation where the given IPC is preferred over others.

We also discuss how applications should be designed to use IPC facilities provided by underlying Linux OS.

Read more

About This Course is about learning How Linux Processes Talk to each Other. This is a sub-domain of Linux System Programming. We shall explore various popular mechanism used in the industry through which Linux processes to exchange data with each other. We will go through the concepts in detail behind each IPC mechanism, discuss the implementation, and design and analyze the situation where the given IPC is preferred over others.

We also discuss how applications should be designed to use IPC facilities provided by underlying Linux OS.

You will have Assignments wherever possible, and throughout the course, there shall be one project in which you shall be incrementally applying the new IPC technique you have learned. Towards the end of the course, you would have practiced and applied all IPC techniques learned in this course.

Each IPC mechanism, we will have a detailed code walk in which I show you how actually a given IPC mechanism is implemented on sending and receiving side.  When you would join the industry, from day 1 you will witness IPC concepts being applied all over the software in order to facilitate communication between different parts of the software.

Who should do this course ?

This course is meant for UG Computer science students, job seekers, and professional developers. This is a MUST do course for those who want to join MNCs as a developer in System Programming. In System Programming, almost all the time you have to use IPC to carry out data exchange between processes, therefore students graduating in computer science and looking to seek an opportunity in MNCs as a developer should have IPC concepts at his/her fingertips.

Pre-requisite

It shall be advantageous if you know a little about C and OS. We designed this course assuming the student is a complete beginner in Linux IPC and we raise the level of course gradually as we move from Basic to advance concepts wherever necessary.

Also, please just do not sit and watch my codes. Write your own codes, even if it is the same as mine.

Related Courses

RPC (Remote Procedure Calls) is another way of carrying out Inter-Process Communication between two processes running on separate machines in the network. You may also want to check my other course on Linux RPCs where you will learn how to implement RPCs from scratch.

Programming Language used In this course :

We have strong reasons to choose C as a language for this course:

IPC is a facility provided by the OS to developers to carry out data exchange between processes. Learning IPC using C helps you understand what is going on behind the scenes. C language really exposes the low-level details about how the system actually works. In System programming, C is the only language to be used and there is not even a remote substitute of this language when it comes to System programming.

No Third-Party libraries

Whatever logic you implement, you need to implement it from scratch. This course does not suggest taking the help of any third party library to get the jobs done. Use of external libraries completely defeats the purpose of the course. However, it is recommended to use third-party libraries for commonly used data structures such as linked lists/Trees/Queues, etc which saves a lot of time implementing these data structures.

Note1 : Though we use Linux to teach the IPC techniques, conceptually, IPC of Linux is not very different from other OS platforms such as windows, iOS, etc. So, if you are a programmer for other platforms, this course still holds great value for you.

Note2 : This Course talks about various techniques regarding exchanging data between processes, the other related topics such as process synchronization and locking is out of the scope of this course and will be covered separately.

Warning: This course has auto system-generated subtitles which may not be perfect. Please disable subtitles as per your convenience.

Curriculum

  • Introduction

    • Table of Contents

    • Computer Architecture - Overview

    • Various IPC Techniques

    • Communication Types

  • IPC Technique 1 - Unix Domain Sockets

    • Socket API Introduction

    • Socket Message Types

    • Socket Design Paradigm

    • Accept System Call

    • Introducing Unix Domain Socket

    • Unix Domain Socket Server Implementation

    • Unix Domain Socket Client Implementation

    • Multiplexing

    • Select System Call

    • Multiplexing Server State machine

    • Multiplexed Server Implementation

    • Data Synchronization - IPC Project part 1

  • IPC Technique 2 - Message Queue

    • Introduction

    • MsgQ as a Kernel Resource

    • Open & Create a MsgQ

    • Closing a MsgQ

    • Enque Data in MsgQ

    • Dequeue Data from MsgQ

    • Unlinking a MsgQ

    • Using a Msg Q - Design perspective

    • Bi-Directional Communication

    • Code Walk - Implementation

    • Demonstration

  • IPC Technique 3 - Shared Memory

    • Overall Design Goals

    • Concept of Virtual Memory

    • Program Control Block

    • Shared Memory Basics

    • Kernel Memory

    • mmap() - Memory Mapping

    • Design Constraint

    • Shared Memory related APIs

    • Data Synchronization - IPC Project part 2

  • IPC Technique 4 - Signals

    • Introduction

    • Linux Well knows Signals

    • Signals Generation and Trapping

    • Sending Signals using Kill()

    • Data Synchronization - IPC Project part 3

  • IPC Technique 5 - Network sockets

    • Socket Programming Design

    • Select System call

    • Accept System call

    • Concept of Multiplexing

    • Server State machine

    • Project on Socket Programming - IPC Project 4

  • Multiplexing on Different IPCs

    • Use select() to multiplex on different IPC interfaces

Enroll now

What's inside

Learning objectives

  • You will be able to design application which require ipc
  • Choose the best ipc mechanism depending on the application requirement
  • Understand the linux ipc programming interface
  • Understand linux os better and feel confident
  • Prepare for ipc based interview questions
  • Design a linux process which could harness benefits of various ipc mechanism at the same time

Syllabus

Table of Contents
Join Telegram Group

In this lecture, I referred malloc/free as system calls, though they are not system calls. Whether or not they are system calls is out of context for this course, pls control your adrenaline - I admit they are not system calls.

Read more

This Lecture is for those who are absolute beginners with Linux and have no prior knowledge with Linux Installation. This course do not demands user to use Linux OS. All Assignments can be done on Windows platform also, however, it is recommended to use Linux for Development work. Please switch if you are still stuck with windows.

Pls go through this tutorial which will tour you through the Linux installation steps and supporting softwares. Those who are already using Linux can safely skip this Section.

I have a separate Course in which the entire paging is explained in detail.

Course name : Linux System Program Concepts and Techniques.

An Example demonstrating a use of signal.

Traffic lights

Read about what's good
what should give you pause
and possible dealbreakers
Provides hands-on experience with various IPC mechanisms, which is valuable for understanding real-world software communication in Linux environments
Uses the C language, which allows learners to understand the low-level details of how the system actually works, especially in system programming
Includes a project that incrementally applies new IPC techniques, which helps learners solidify their understanding through practical application
Focuses on implementing logic from scratch without relying on third-party libraries, which promotes a deeper understanding of the underlying concepts
Requires familiarity with C and OS concepts, which may necessitate additional preparation for learners without prior experience in these areas
Covers process synchronization and locking separately, which means learners seeking a comprehensive understanding of IPC may need to supplement their learning

Save this course

Create your own learning path. Save this course to your list so you can find it easily later.
Save

Reviews summary

In-depth linux ipc from scratch

According to learners, this course offers an in-depth exploration using C from scratch to understand how processes communicate in Linux. Students particularly appreciate the practical approach and the inclusion of coding assignments and projects, which are seen as crucial for solidifying understanding and applying concepts like Unix Domain Sockets, Message Queues, Shared Memory, and Signals. While the course is highly valued by those seeking a deep dive into system programming and preparing for relevant roles, a few reviewers note that it can be challenging for absolute beginners and requires a decent grasp of C and OS fundamentals beforehand. The course is considered a must-do for aspiring system developers.
Code is mostly clear but needs attention.
"The code examples are helpful, but I found a few minor typos."
"The code walk-throughs are detailed, but sometimes move a bit fast."
"It's important to code along and debug yourself, as recommended."
Instructor demonstrates strong knowledge.
"The instructor is very knowledgeable about the subject."
"Explanations are generally clear, especially the low-level details."
"His command over C and Linux system programming is evident."
Explains IPC mechanisms in detail.
"This is the most detailed course I've found on Linux IPC."
"It explains each IPC mechanism with theory and implementation from scratch."
"Covers Unix Domain Sockets, Message Queues, Shared Memory, and Signals effectively."
Highly relevant for system programming roles.
"This course is essential for anyone aiming for system-level development jobs."
"It covers concepts frequently asked in technical interviews."
"Gave me confidence in tackling IPC challenges in professional projects."
Hands-on exercises solidify understanding.
"The course has very good practical examples to learn and understand the concepts of IPC."
"I really liked the hands on approach, the code walk through and implementation really helped."
"The assignments and project are vital for grasping the concepts taught."
Requires strong C and OS background.
"Prerequisites about C and OS are crucial. This is not for absolute beginners."
"Some topics might be difficult if you don't have a solid foundation in C pointers and memory."
"I struggled a bit initially without reviewing my C fundamentals."

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 Linux Inter Process Communication (IPC) from Scratch in C with these activities:
Review Operating System Concepts
Reinforce your understanding of fundamental OS concepts like processes, memory management, and system calls. This will provide a solid foundation for understanding how IPC mechanisms work under the hood.
Browse courses on Operating Systems
Show steps
  • Review your previous OS coursework or textbooks.
  • Focus on process management, memory management, and system calls.
  • Do practice questions on these topics.
Brush Up on C Programming
Sharpen your C programming skills, especially pointers and memory management. The course uses C extensively, so a strong grasp of C is essential.
Browse courses on C Programming
Show steps
  • Review C syntax and data structures.
  • Practice writing C programs that use pointers and dynamic memory allocation.
  • Familiarize yourself with common C libraries.
Read 'Advanced Programming in the UNIX Environment'
Supplement your learning with a deep dive into UNIX system programming. This book provides comprehensive coverage of the system calls used in the course.
Show steps
  • Obtain a copy of 'Advanced Programming in the UNIX Environment'.
  • Read the chapters related to IPC mechanisms.
  • Experiment with the code examples provided in the book.
Four other activities
Expand to see all activities and additional details
Show all seven activities
Implement Basic IPC Examples
Reinforce your understanding by implementing simple examples of each IPC mechanism covered in the course. This hands-on practice will solidify your knowledge.
Show steps
  • Write code to create and use Unix domain sockets.
  • Implement message queues for inter-process communication.
  • Create shared memory segments and use them to exchange data.
  • Experiment with signals for process synchronization.
Build a Simple Client-Server Application Using IPC
Apply your knowledge by building a client-server application that uses one or more IPC mechanisms. This project will test your ability to design and implement IPC-based systems.
Show steps
  • Design the architecture of your client-server application.
  • Choose the appropriate IPC mechanism(s) for your application.
  • Implement the client and server components.
  • Test and debug your application thoroughly.
Reference 'The Linux Programming Interface'
Deepen your understanding of Linux system programming with this comprehensive guide. It provides detailed explanations of the system calls used in IPC.
Show steps
  • Obtain a copy of 'The Linux Programming Interface'.
  • Refer to the relevant chapters on IPC and system calls.
  • Use the book as a reference while working on your IPC projects.
Contribute to an Open Source Project Using IPC
Apply your skills by contributing to an open-source project that utilizes IPC. This will give you real-world experience and expose you to different IPC implementations.
Show steps
  • Find an open-source project that uses IPC.
  • Study the project's codebase and identify areas where you can contribute.
  • Contribute bug fixes, new features, or documentation related to IPC.
  • Submit your contributions to the project maintainers.

Career center

Learners who complete Linux Inter Process Communication (IPC) from Scratch in C will develop knowledge and skills that may be useful to these careers:
Operating Systems Developer
An operating systems developer builds and maintains the core software that manages computer hardware and software resources. This role requires deep knowledge of how processes interact and communicate at a low level. This course, focused on Linux Inter Process Communication, is highly relevant as it explores various mechanisms used for data exchange between processes. An operating systems developer needs to understand and implement IPC to ensure that the resources of the machine are used efficiently and correctly. The detailed code walks and hands-on projects within the course provide critical practical experience that will translate directly to the work of an operating systems developer, allowing one to both contribute to and understand the inner workings of an operating system.
Systems Programmer
A systems programmer works with the core components of an operating system, often dealing directly with hardware and low-level software. They design and implement critical system software, such as device drivers, kernel modules, and system utilities. This course on Linux Inter Process Communication is directly relevant to this work because much of system programming involves careful management of shared resources and communication between different processes. The course helps build a foundation in understanding how Linux processes interact, the underlying mechanisms that enable inter-process communication, and how to design applications with these mechanisms in mind. This knowledge is often needed on a daily basis when building or maintaining system software.
Embedded Systems Engineer
Embedded systems engineers design, develop and test software for devices that are not general-purpose computers. These systems are often resource constrained, and processes need to communicate efficiently and reliably. This course on Linux Inter Process Communication is extremely valuable for this field. Embedded systems often use a form of Linux, and the techniques of interprocess communication learned in this course are vital for the efficient operation of these systems. Embedded systems engineers often must work with low-level system code. This is a great course for one who wishes to transition into or excel in embedded development.
Kernel Developer
A kernel developer works on the core of an operating system, making sure that all the software and hardware components of a computer function together. They write code that manages the system's resources, such as memory, processes, and devices. This course, with its focus on Linux Inter Process Communication, provides an exceptional foundation for kernel development. IPC is a critical aspect of kernel development, as the kernel facilitates communication between different processes in the system. The course directly addresses the mechanisms used to achieve this, including sockets, message queues, shared memory, and signals, equipping you with the knowledge needed to understand the complexities of kernel-level software. The practical approach and detailed code examples will be particularly useful for a kernel developer.
Network Programmer
A network programmer focuses on creating programs that communicate over a network, often involving low-level socket programming. This course on Linux Inter Process Communication is particularly relevant because it covers various aspects of socket programming and inter-process communication on a Linux system. Network programmers can leverage their knowledge of sockets, design paradigms, and multiplexing techniques taught in this course to build performant and robust network applications. This course is an ideal starting point to learn more about low-level network programming, offering a detailed look at how processes can communicate using sockets. The course’s focus on direct implementation and code walks provides the kind of understanding one needs to excel in the field of network programming.
Software Engineer
Software engineers design, develop, test, and maintain software applications. While this role covers a wide spectrum, understanding inter-process communication is crucial when developing multi-process or service-oriented architectures. This course provides a good understanding of different IPC mechanisms, including sockets, message queues, shared memory, and signals, each of which is essential for building robust and efficient applications that require inter-process communication. The course enables software engineers to effectively design and implement software that handles concurrent or distributed computing. This particular course is well-suited for those engineers looking to deepen their understanding of low-level system programming and concurrent applications.
Distributed Systems Engineer
A distributed systems engineer designs, builds, and maintains complex systems that involve multiple computers or processes working together. Understanding the inter-process communication mechanisms is essential for building robust, scalable, and performant distributed systems. This course on Linux Inter Process Communication covers a variety of methods, such as sockets, message queues, and shared memory, which are crucial for a distributed systems engineer to consider when designing the system. The deep dive into how these mechanisms function can help the engineer optimize for performance in distributed and concurrent environments as well as diagnose system issues. While it does not cover distributed systems directly, this course is valuable in building a low-level foundation for distributed systems knowledge.
Performance Engineer
A performance engineer analyzes and optimizes software systems for efficiency and responsiveness, often working with low-level system details. This role may require a deep understanding of inter-process communication. Linux Inter Process Communication is a relevant course for a performance engineer, because it delves into the performance characteristics of various IPC methods, such as message queues, sockets, shared memory, and signals. These concepts are crucial for understanding how data is exchanged effectively between processes. The course's focus on hands-on projects and detailed code walks will help one understand how to evaluate and optimize inter-process communication for efficiency.
Backend Developer
A backend developer builds the server-side logic of applications, often working with databases, APIs, and servers. While not always directly using IPC, there are cases when backend services need to communicate with each other efficiently, particularly in high-performance server environments. This course's exploration of Linux Inter Process Communication may be useful to a backend developer seeking a deeper understanding of how the system beneath their server works. It introduces foundational concepts of low-level system programming and how different processes within the same machine can communicate using various methods provided by the OS. While much of backend development may not directly use these concepts, an understanding of these principles can deepen a developer's knowledge of systems optimization.
Linux Systems Administrator
A Linux systems administrator is responsible for the upkeep, configuration, and reliable operation of computer systems, particularly servers running on Linux. A strong understanding of how processes interact and communicate is useful when troubleshooting or optimizing a server. This course on Linux Inter Process Communication familiarizes learners with various IPC mechanisms, such as sockets, message queues, and shared memory. With this knowledge, a Linux administrator may better understand how various services and processes are communicating within a Linux system and may be better equipped to diagnose system issues. While not directly related to all daily administrative tasks, this course provides valuable insight into the inner workings of a Linux operating system.
Application Developer
An application developer builds software programs that users interact with directly. While many applications do not directly interact with inter-process communication, there are many situations where an application developer may need to use IPC to build a robust and performant application. This course introduces several techniques of IPC and provides a strong foundation in low-level system interaction. Applications that require communication between different parts of themselves or other applications can benefit from the shared memory, message queue, or socket techniques discussed in the course. An application developer looking to expand their skill set or work on more complex applications may find this course helpful.
DevOps Engineer
A DevOps engineer works to bridge the gap between development and operations teams, focusing on infrastructure, automation, and continuous delivery. This role often involves managing and deploying applications in a Linux environment, which may involve understanding how processes interact and communicate. This course on Linux Inter Process Communication provides a strong foundation in Linux system programming that could be useful for designing and troubleshooting multi-process applications or understanding how different components of a distributed system communicate. A DevOps engineer looking to have a deeper understanding of Linux system programming may find this course helpful.
Security Engineer
A security engineer is responsible for protecting computer systems and networks from threats. Understanding system vulnerabilities and how processes communicate is important in a security role. This course on Linux Inter Process Communication familiarizes learners with how processes interact with each other via mechanisms such as shared memory, message queues, sockets, and signals. Knowing the underlying mechanisms that processes use to communicate can help a security engineer better assess security vulnerabilities and develop mitigation strategies. This course may be helpful for security engineers looking at low level system vulnerabilities.
Technical Consultant
A technical consultant advises clients on technology-related issues and can specialize in various areas, sometimes including system programming and performance. This course's emphasis on Linux Inter Process Communication may be useful when working with clients whose systems or applications are built in a Linux environment and require an understanding of how various processes communicate. Technical consultants who have an understanding of low-level system programming may be of help to clients who need to improve performance of concurrent systems. This course may be helpful for those seeking to expand their technical expertise before entering the consulting field.
Data Engineer
A data engineer builds and manages the infrastructure for data storage and processing. While this role often deals with large-scale systems, understanding inter-process communication at a fundamental level can be useful, particularly in designing custom data pipelines. This course on Linux Inter Process Communication provides insights on how processes interact on a Linux system. This may help data engineers who seek to build high-performance data tools. Data engineers may find that this course helps to expand their technical knowledge when working with data processing systems that run on a Linux environment.

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 Linux Inter Process Communication (IPC) from Scratch in C.
Classic resource for understanding UNIX system programming. It provides in-depth coverage of system calls and APIs relevant to IPC. While not strictly required, it offers a wealth of information that complements the course material and is commonly used as a textbook at academic institutions. It serves as a valuable reference for anyone working with UNIX-like systems.
Provides a comprehensive and detailed guide to Linux system programming. It covers a wide range of topics, including file I/O, memory management, and interprocess communication. It valuable reference for understanding the underlying mechanisms of Linux and how to use system calls effectively. This book is more valuable as additional reading than it is as a current reference.

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