Linux Inter Process Communication (IPC) from Scratch in C

所在平台: Udemy

课程主页: https://www.udemy.com/course/linuxipc/

课程评论:没有评论

第一个写评论        关注课程

课程简介

本课程《C语言从零学Linux进程间通信(IPC)》旨在教授Linux系统编程中的核心技术——进程间通信(IPC)。课程将深入探讨多种流行的IPC机制,包括Unix域套接字、消息队列、共享内存和信号。 **课程亮点:** * **深入的概念解析:** 详细讲解每种IPC机制背后的原理、设计思路以及其适用的场景。 * **实践驱动的学习:** 通过代码讲解和动手实践,展示IPC机制在发送端和接收端的具体实现。 * **项目驱动的掌握:** 课程贯穿一个项目,让学习者逐步应用所学的IPC技术,最终全面掌握IPC的使用。 * **C语言的底层揭秘:** 使用C语言教学,帮助学习者深入理解IPC在操作系统层面是如何工作的,强调C语言在系统编程中的不可替代性。 * **不依赖第三方库:** 鼓励从零开始实现IPC逻辑,最大限度地暴露底层细节(可适度使用常用数据结构库)。 **适合人群:** * 计算机科学专业的本科生。 * 希望从事系统编程的求职者和专业开发者。 * 目标加入MNC(跨国公司)的系统编程岗位的开发者。 **先修知识:** * 对C语言和操作系统有基本的了解会更有帮助。 * 课程难度会循序渐进,从基础到高级。 **内容概述:** 课程将涵盖: 1. **计算机架构概述** 2. **IPC技术介绍** * **Unix域套接字:** Socket API、消息类型、设计范式、Accept系统调用、服务器与客户端实现、多路复用(Select系统调用)、服务器状态机。 * **消息队列:** 作为内核资源、打开与创建、关闭、入队与出队、解除链接、设计视角、双向通信。 * **共享内存:** 整体设计目标、虚拟内存概念、共享内存基础、mmap()函数、设计约束、相关API。 * **信号:** Linux常见信号、信号的产生与捕获、Kill()函数的使用。 * **网络套接字:** Socket编程设计、Select系统调用、Accept系统调用、多路复用的概念、服务器状态机、Socket项目实践。 3. **多路复用在不同IPC上的应用** **重要提示:** * 虽然课程以Linux为例,但IPC概念在其他操作系统(如Windows、iOS)上也具有通用性。 * 本课程专注于进程间数据交换,不包含进程同步和锁机制。 * 课程字幕由系统自动生成,可能存在不准确之处。 通过本课程的学习,您将能够熟练运用各种IPC机制实现进程间的有效通信,为在企业级应用开发中打下坚实的基础。

课程评论(0条)

课程详情

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-requisiteIt 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 CoursesRPC (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 librariesWhatever 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.CurriculumIntroductionTable of ContentsComputer Architecture - OverviewVarious IPC TechniquesCommunication TypesIPC Technique 1 - Unix Domain SocketsSocket API IntroductionSocket Message TypesSocket Design ParadigmAccept System CallIntroducing Unix Domain SocketUnix Domain Socket Server ImplementationUnix Domain Socket Client ImplementationMultiplexingSelect System CallMultiplexing Server State machineMultiplexed Server ImplementationData Synchronization - IPC Project part 1IPC Technique 2 - Message QueueIntroductionMsgQ as a Kernel ResourceOpen & Create a MsgQClosing a MsgQEnque Data in MsgQDequeue Data from MsgQUnlinking a MsgQUsing a Msg Q - Design perspectiveBi-Directional Communication Code Walk - ImplementationDemonstrationIPC Technique 3 - Shared MemoryOverall Design GoalsConcept of Virtual Memory Program Control BlockShared Memory BasicsKernel Memorymmap() - Memory MappingDesign ConstraintShared Memory related APIsData Synchronization - IPC Project part 2IPC Technique 4 - SignalsIntroductionLinux Well knows SignalsSignals Generation and TrappingSending Signals using Kill()Data Synchronization - IPC Project part 3IPC Technique 5 - Network socketsSocket Programming DesignSelect System callAccept System callConcept of MultiplexingServer State machineProject on Socket Programming - IPC Project 4Multiplexing on Different IPCsUse select() to multiplex on different IPC interfaces

课程标签

0人关注该课程

主题相关的课程