Linux Inter Process Communication (IPC) from Scratch
4.2 (278 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
1,695 students enrolled

Linux Inter Process Communication (IPC) from Scratch

Linux Course - Includes Socket Programming, Linux System Programming, C programming - From Beginner to Expert
4.2 (278 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
1,695 students enrolled
Last updated 7/2020
English
English [Auto]
Current price: $13.99 Original price: $19.99 Discount: 30% off
5 hours left at this price!
30-Day Money-Back Guarantee
This course includes
  • 6 hours on-demand video
  • 4 downloadable resources
  • Full lifetime access
  • Access on mobile and TV
  • Assignments
  • Certificate of Completion
Training 5 or more people?

Get your team access to 4,000+ top Udemy courses anytime, anywhere.

Try Udemy for Business
What you'll learn
  • 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
Requirements
  • Basic C is essential
  • Basic knowledge Operating System shall be good
  • Zeal and Enthusiasm to learn
Description

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 exchange data with each other. We will go through the concepts in detail behind each IPC mechanism, discuss the implementation and design and analyse the situation where the given IPC is preferred over other.

We also discuss how application should be designed to use IPC facility 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.

For 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 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 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 finger tips.


Pre-requisite

It shall be advantageous if you know a little of C and OS. We designed this course assuming 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 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 another course on Linux RPCs where you will learn how to implement RPCs from scratch.


Programming Language used In this course :

We have a 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 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 do not suggest taking 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.


Note 1: If you have done my other course "Network Concepts and Programming from Scratch", then there are some topics in this course (In Module 1 - Unix Domain Sockets) which overlap. However, it is mandatory to make overlapping topics as part of this course to make this course a complete unit. Please feel free to watch those topics with 2x speed Or skip altogether as per your convenience.

Note 2: 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 a great value for you.


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


  • Multiplexing on Different IPCs

    • Use select() to multiplex on different IPC interfaces

Who this course is for:
  • Under graduate Computer Science Students
  • Post Graduate Students
  • Job Seekers in System programming Domain - Networking/Driver programming/Distributed Systems/IOT etc
Course content
Expand all 52 lectures 05:50:43
+ Pre-requisites - Setting up Linux Development Environment
1 lecture 05:42

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. Pls excuse, sound quality of this youtube VDO isnt that great.

Setting up Linux Development Environment
05:42
+ IPC Technique 1 - Unix Domain Sockets
16 lectures 02:32:48
Sockets Introduction
09:18
Socket Message Types
06:23
Socket Accept() System Call
04:55
Unix Domain Socket Introduction
05:00
Unix Domain Server Implementation part 1
10:12
Unix Domain Server Implementation part 2
18:53
Unix Domain Client Implementation
08:43
Unix Domain Client Server Demonstration
08:52
Unix Domain IPC - Summary and observation
03:39
Understanding select() System Call
08:52
Multiplexing State Machine
10:47
Multiplexed Unix Domain Server Implementation
22:01
Multiplexed Unix Domain Server Demonstration
04:50
Project - Data Synchronization using Unix Domain Sockets as an IPC
13:22
+ IPC Technique 2 - Message Queues
11 lectures 54:41
Introduction
04:10
MsgQ as a kernel Resource
03:26
Opening and Creating a MsgQ
11:12
Closing a MsgQ
04:28
Enque A Msg into MsgQ
04:31
Deque a Msg from a MsgQ
03:11
Unlink a MsgQ
03:17
Bidirectional Communication Using MsgQ
04:49
Code Walk and Implementation
07:57
Demonstration of msgQ as an IPC
03:11
+ IPC Technique 3 - Shared Memory
14 lectures 01:20:38
Agenda
01:06
Shared Memory Overall Design
02:37
Virtual Memory Basics
03:58
Kernel Memory
03:10
Design Constraints for using SHM as IPC
07:23
Creating a Shared Memory Region in Kernel Space - shm_open()
05:55
Resize the Shared Memory region - ftruncate()
01:23
Mapping the Shared Memory to Process Virtual Address space - mmap()
06:02
Unmapping the shared memory from process Virtual address space - munmap()
02:21
unlinking and closing the shared memory
03:04
Code Walk and Implementation
14:14
Project - Data Synchronization using Shared Memory as an IPC
11:23
+ IPC Technique 4 - Signals
5 lectures 33:58
Signals Introduction
08:05
Linux Well Known Signals
09:03
Linux Signal Generation and Signal Trapping
07:59

An Example demonstrating a use of signal.

Sending Signal using kill
03:26
Project - Data Synchronization using Signals as an IPC
05:25
+ Multiplexing on Multiple IPCs
2 lectures 07:21
Multiplexing on Multiple IPCs
06:01
I have added this project as an addition to this course. To do this project, you need a back ground on Network socket programming in C.
Project in Network Socket Programming
1 question
Bonus Lecture - Time to get some Candies !!
01:20