Ưu đãi trong tuần: Nhập mã UD50 giảm 50k cho đơn từ 300k!
Trang chủ
Menu

Linux Inter Process Communication (IPC) from Scratch in C

Giao Tiếp Liên Tiến Trình (IPC) trên Linux từ Cơ Bản bằng C

Giao Tiếp Liên Tiến Trình (IPC) trên Linux từ Cơ Bản bằng C

Khóa học Linux - Bao gồm Lập trình Socket, Lập trình Hệ thống Linux, Lập trình C - Từ Người mới đến Chuyên gia

4.5
(1,425 đánh giá)
9,727 học viên
Phụ đề Việt chất lượng cao Phụ đề tiếng Anh Bán chạy Đánh giá cao
50.000đ 349.000đ -86%
✓ Xem giỏ hàng và thanh toán
Bao gồm phụ đề tiếng Việt, tiếng Anh
8.0 giờ video
78 bài giảng
Truy cập vĩnh viễn
Học trên mọi thiết bị
Cập nhật: 02/07/2026

Bạn sẽ học được gì

Bạn sẽ có khả năng Thiết kế Ứng dụng yêu cầu IPC
Lựa chọn cơ chế IPC tối ưu nhất dựa trên yêu cầu ứng dụng
Hiểu rõ giao diện lập trình IPC trên Linux
Hiểu sâu hơn về Hệ điều hành Linux và cảm thấy tự tin
Chuẩn bị cho các Câu hỏi Phỏng vấn liên quan đến IPC
Thiết kế một tiến trình Linux có thể tận dụng lợi ích của nhiều cơ chế IPC cùng lúc

Yêu cầu

Kiến thức C cơ bản là bắt buộc
Kiến thức cơ bản về Hệ điều hành sẽ rất hữu ích
Sự nhiệt tình và hăng hái học hỏi

Đối tượng phù hợp

Sinh viên Khoa học Máy tính bậc Đại học
Sinh viên bậc Sau đại học
Người tìm việc trong lĩnh vực Lập trình Hệ thống - Mạng/Lập trình Driver/Hệ thống Phân tán/IoT, v.v.

Nội dung khóa học

9 phần • 72 bài giảng
1 Mục lục
2 Tham gia Nhóm Telegram
3 Giới thiệu
1 Thiết lập Môi trường Phát triển Linux trên Windows
1 Giới thiệu về Sockets
2 Các Loại Thông điệp Socket
3 Thiết kế Socket
4 Lệnh Hệ thống Socket Accept()
5 Giới thiệu Unix Domain Socket
6 Triển khai Máy chủ Unix Domain phần 1
7 Triển khai Máy chủ Unix Domain phần 2
8 Triển khai Máy khách Unix Domain
9 Minh họa Máy chủ - Máy khách Unix Domain
10 IPC Unix Domain - Tổng kết và nhận xét
11 Khái niệm Đa hợp (Multiplexing)
12 Hiểu về Lệnh Hệ thống select()
13 Máy trạng thái Đa hợp
14 Triển khai Máy chủ Unix Domain có Đa hợp
15 Minh họa Máy chủ Unix Domain có Đa hợp
16 Dự án - Đồng bộ Dữ liệu sử dụng Unix Domain Sockets làm IPC
1 Giới thiệu
2 MsgQ như một Tài nguyên Hạt nhân
3 Mở và Tạo một MsgQ
4 Đóng một MsgQ
5 Đưa Thông điệp vào Hàng đợi MsgQ
6 Lấy Thông điệp từ Hàng đợi MsgQ
7 Hủy liên kết một MsgQ
8 Cách sử dụng MsgQ làm IPC
9 Đi qua và Triển khai Mã nguồn
10 Minh họa sử dụng msgQ làm IPC
1 Nội dung chính
2 Ôn tập Phân trang và Ánh xạ Bộ nhớ
3 Cách thức hoạt động của Ánh xạ Bộ nhớ
4 Bộ nhớ Dùng chung
5 Sử dụng RAM làm Bộ nhớ Dùng chung
6 Ví dụ Mã nguồn
7 Làm quen với mmap()
8 Chương trình Demo - Ánh xạ Tệp Văn bản vào Bộ nhớ Ảo của Tiến trình
9 Ràng buộc Thiết kế khi sử dụng SHM làm IPC
10 Dự án - Đồng bộ Dữ liệu sử dụng Bộ nhớ Dùng chung làm IPC
1 Giới thiệu về Tín hiệu
2 Các Tín hiệu Phổ biến trên Linux
3 Tạo và Bẫy Tín hiệu trên Linux
4 Gửi Tín hiệu bằng kill
5 Dự án - Đồng bộ Dữ liệu sử dụng Tín hiệu làm IPC
1 Lưu ý
2 Giới thiệu về Lập trình Socket
3 Thiết kế Máy chủ
4 Lệnh hệ thống Accept
5 Lệnh hệ thống Select
6 Triển khai Đa hợp với các Lệnh Hệ thống Accept & Select
7 Ví dụ Máy chủ TCP - phần 1
8 Ví dụ Máy chủ TCP - phần 2
9 Ví dụ Máy chủ TCP - phần 3
10 Nhận xét Thiết kế Máy chủ TCP
11 Thiết kế và Triển khai Máy khách TCP
12 Minh họa Máy chủ - Máy khách TCP
13 Máy chủ TCP có Đa hợp - Thiết kế Cấp cao - Phần 1
14 Máy chủ TCP có Đa hợp - Triển khai - phần 2
15 Máy chủ TCP có Đa hợp - Minh họa - phần 3
16 Kết luận Lập trình Socket
17 Dự án về Lập trình Thiết kế Máy chủ TCP
1 Đa hợp trên Nhiều IPC
1 Mục tiêu Dự án
2 Triển khai Dự án
3 Thuật toán Yêu cầu PUT
4 Thuật toán Yêu cầu GET
5 Các Loại Thông điệp
6 Xử lý Thông điệp
7 Mã giả của Dự án
8 Lời cuối trước khi Viết mã
9 Quà tặng

Giới thiệu khóa học

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

Khóa học liên quan

Khám phá thêm các khoá học cùng chủ đề

Hiển thị tất cả khoá học C Programming
Hiển thị tất cả khoá học Linux Development
Hiển thị tất cả khoá học Operating Systems
Hiển thị tất cả khoá học Systems Programming
Zalo
Tôi có thể tư vấn khoá học cho bạn 😊