By Raghu Bharadwaj
Embedded Linux System Programming
- Over 5000+ participants have gained clarity on interconnectedness of the Embedded Linux Ecosystem Components
- Over 5000+ participants have achieved accelerated bug detection & deep problem solving skills
- Gain future-proofing skills against AI disruption
- Over 5000+ participants have enhanced their capability of reskilling & upskilling when engaged with evolving technologies at minimal turnaround time
Who is it for
Engineers looking to achieve career-defining skills in Embedded Linux & system programming. Developers struggling to work on. Engineers looking to upgrade their careers from other technology to Embedded Linux
What you will learn
This program helps you un-learn core programming concepts on Linux at a deeper level. It goes under the hood and gives you the necessary clarity and etiquettes for working on system level programming
Who will be your Mentor
Learn from Raghu Bharadwaj, India’s leading Linux mentor, consultant and author
Program Contents
Understanding the Toolchain
Introduction to Toolchain
- What is a Toolchain?
- Definition and role in software development
- High-level overview of how toolchains streamline the development process
- Importance of Toolchains
- Benefits of using a standardized toolchain
- Impact on development efficiency and software performance
Components of a Toolchain
- Overview of Toolchain Components
- Breakdown of the major components included in a typical toolchain
- How these components interact with each other
- Essential Tools Overview
- Introduction to the core tools that make up a toolchain: compilers, assemblers, linkers, libraries, and debugging tools
Compilers and Assemblers
- Understanding Compilers
- Role of compilers in transforming source code into machine code
- Examples of popular compilers: GCC, Clang
- Working with Assemblers
- Explanation of assemblers and their function in the toolchain
- Discussion on the transition from high-level code to assembly
Linkers and Libraries
- Role of Linkers
- Definition and purpose of linkers in software compilation
- Static vs. dynamic linking: pros and cons
- Using Libraries
- Types of libraries (static and shared libraries)
- Best practices for managing libraries in development projects
Source Debugging Tools
- Overview of Debugging Tools
- Role of debugging tools in maintaining software quality
- Introduction to tools like GDB.
Libraries & Linkages
Introduction to Libraries & Linkages
- Overview of Library Linkages
- Definition of libraries and their role in software development
- Importance of linkages in building and maintaining software
Types of Library Linkages
- Understanding Different Linkages
- High-level differentiation between static and dynamic linkages
- Scenarios for using different types of linkages
Static Libraries and Linkages
- Introduction to Static Libraries
- Definition and characteristics of static libraries
- Creating and using static libraries (e.g., using ar, ranlib)
- Linking with Static Libraries
- Step-by-step process on how to link static libraries in a project
- Compilation and linking examples
Shared Libraries and Linkages
- Introduction to Shared Libraries
- Benefits and drawbacks of using shared libraries
- Creating and managing shared libraries (e.g., using gcc -shared)
- Linking with Shared Libraries
- How to dynamically link shared libraries at compile time
- Setting environment variables like LD_LIBRARY_PATH
Dynamic Linking and Loaders
- Dynamic Linking Mechanics
- How dynamic linking works at runtime
- Role of the dynamic linker/loader (e.g., ld-linux.so)
- Tools for Managing Dynamic Linkages
- Using tools like ldd to inspect dynamic dependencies
- Understanding the use of ldconfig
Managing Dynamic Linkages
- Advanced Management Techniques
- Handling versioning in shared libraries
- Strategies for avoiding dependency conflicts
- Runtime Dynamic Linking
- Techniques for loading libraries at runtime using dlopen, dlsym, and dlclose
Best Practices and Common Issues
- Best Practices in Library Management
- Guidelines for effectively managing static and dynamic libraries
- Tips for maintaining binary compatibility and managing ABI (Application Binary Interface)
- Common Issues and Troubleshooting
- Diagnosing and resolving typical problems with library linkages
Cross-toolchains
Introduction to Cross-toolchain
- What is a Cross-toolchain?
- Basic definition and purpose of cross-toolchains
- Explanation of cross-compilation and its relevance in software development
Components of a Cross-toolchain
- Overview of Key Components
- Brief overview of compilers, linkers, and libraries used in cross-toolchains
- Importance of each component in the cross-compilation process
Sourcing a Cross-toolchain
- Finding Cross-toolchains
- Basic sources for obtaining cross-toolchains for popular architectures like ARM, RiscV, and PPC
- Tips on choosing a suitable cross-toolchain based on project needs
Setting up a Cross-toolchain Environment
- Environment Setup Basics
- Simple steps to configure a development environment for using a cross-toolchain
- Setting essential environment variables and understanding their roles
Generating a Simple Cross-toolchain Using Buildroot
- Introduction to Buildroot
- What is Buildroot? High-level overview of its role in generating cross-toolchains
- Simple steps to initiate Buildroot configuration for a basic toolchain
Building and Running a Simple Program
- Cross-compiling a Simple Application
- Demonstrating how to compile a basic “Hello World” program for a target architecture
Linux Kernel Project
Introduction to Operating Systems
- Overview
- Definition and main functions of an operating system.
- Generic Kernel Architecture
Types of Operating Systems
- Usage Categories
- General-Purpose, Real-Time, and Embedded systems.
Software Architectures
- Design modles
- Monolithic, Microkernel, and Modular models explained.
- Pro & Cons for each of the types
Introduction to the Linux Kernel
- Linux Kernel Overview
- Basic history and characteristics of the Linux kernel.
Linux Distributions
- Overview
- Role and examples of popular Linux distributions
Kernel Source Compile & Build
- Kernel Source Layout
- Pre-requisites
- Kernel Configuration
- Kernel Compilation
- Installing the Kernel
- Kernel Bootup
- Cross-compiling the Kernel
Virtual Address Spaces
- Need for virtual address spaces
- Kernel & User address spaces
- Application binary interface (ABI)
- User address space layout
- System calls
Introduction to Application Process
- Introduction to program loading
- Program to Process transition
- Process footprint
- Process descriptor (PCB)
- Process States
System Calls & APIs
- Understanding System Calls
- System call transitions
- Introduction to APIs
- *nix API standards
- APIs and application portability
Process Address Space & Memory Allocations
- Process address space layout
- Stack Segment: Usage & Management
- Heap Segment: Usage & Management
- Mmap Segment usage
- Dynamic memory allocations using malloc() package
- Demand Paging & Lazy Allocations
- Memory Locking
- Troubleshooting & Debugging
I/O Subsystem
- Components of I/O subsystem
- Objectives of Linux I/O model
- Virtual file system
- File system services
- I/O cache
- Understanding file descriptors & inode structures
Standard File Operations
- Introduction to common file APIs
- Accessing file attributes
- Standard I/O operations
- File control operations
I/O Multiplexing
Introduction to I/O Multiplexing
- Overview of I/O Multiplexing
- Definition and significance of I/O multiplexing
- Comparison with traditional blocking and non-blocking I/O
- Common Use Cases
- Scenarios where I/O multiplexing is essential
- Benefits of using I/O multiplexing in network applications and servers
Basics of I/O Multiplexing
- Understanding File Descriptors
- Role of file descriptors in I/O operations
- Managing file descriptors in Linux
- Blocking vs. Non-Blocking I/O
- Configuring file descriptors for non-blocking mode
- Handling I/O without blocking the main application flow
Core Multiplexing Techniques
- Select System Call
- Mechanics of the select function
- Limitations and performance considerations
- Poll System Call
- Introduction to poll
- Differences and advantages over select
Advanced Multiplexing with epoll
-
- Introduction to epoll
- Benefits of using epoll over select and poll
- Understanding the epoll API
- Implementing epoll
- Practical examples of setting up and using epoll
- Handling edge and level trigger modes
- Introduction to epoll
Process Scheduling
- Process scheduler architecture
- Policy Groups and priorities
- Fair-share policies
- Real-time Policies
- Deadline policies
- CPU affinity configuration
Signals
- What are signals ?
- Signal types & categories
- Signal generation and delivery
- Signal management data-structures
- Switching signal dispositions
- Setting up async signal handlers
- Using signals for process communication
- Blocking & Unblocking signal delivery
- Timer signals
- Use cases and best practices
Threading and Concurrency
- Introduction to concurrent applications
- Understanding need for concurrent apps
- Standard Concurrency models
UNIX Threads APIs
- Unix threads API (fork(), vfork(), execve())
- Enumerating child process
- Child process memory footprint
- Monitoring child process
- Handling child process termination events
- Copy-on-write optimization
- fork() vs vfork()
- execve() family of calls
Linux Threads API
- Linux threads API
- Light-weight process defined (LWP)
- LWP vs Process
- clone() API
- Basic capabilities
- Differences and Similarities to fork()
- CLONE_* flags
- clone() threads
- Memory sharing and Management
- Namespace isolation
POSIX Thread Library
Introduction to Pthreads
- Overview of Multithreading Concepts
- Difference between processes and threads
- Benefits and challenges of multithreading
- Introduction to the Pthreads Library
- History and standards
- Basic functions and data structures
- Platform specific extensions to standard library
Creating and Managing Threads
- Creating Threads
- Using pthread_create
- Handling thread attributes
- Thread Termination
- Exiting threads cleanly using pthread_exit
- Handling return values from threads
- Joining and Detaching Threads
- Synchronizing thread termination with pthread_join
- Detaching threads for independent operation
- Thread Attributes
- Scheduling Policies & Priorities
- Thread CPU affinity
- Thread stack management
Thread Synchronization
- Producer/Consumer models
- Readers-Writers problem solutions
- Semaphores
- Understanding and using semaphores for synchronization
- Differences between standard semaphores and Pthreads semaphores
- Condition Variables
- Using condition variables to synchronize thread activities
- pthread_cond_wait, pthread_cond_signal, and pthread_cond_broadcast
- Barrier Synchronization
- Barriers for synchronization
- Practical usage
Data Synchronization Basics
- Need for Data-Synchronization
- Understanding race conditions
- Use cases for synchronization
- Wait Locking Implementations
- Creating and destroying a lock
- Locking and unlocking
- Strategies to avoid deadlocks
- Poll-locking Implementations
- Poll locking usage
- Implementing poll-locking with Pthreads
- Read/Write Locks
-
- Understanding read/write locks for improved concurrency
- Practical examples and when to use them over mutexes
Scalability and Architectural Considerations
- Scaling Multithreaded Applications
- Challenges in scaling on multi-core and multiprocessor systems
- Techniques for maximizing performance and minimizing contention
Thread Cancellation and Cleanup
- Concepts of Thread Cancellation
- Understanding thread cancellation and its necessity
- Types of cancellation: asynchronous vs. deferred cancellation
- cancellation points
Implementing Thread Cancellation
- Initiating Cancellation
- How to send a cancellation request using pthread_cancel
- Cancellation Options
- Setting thread cancellation options with pthread_setcancelstate and pthread_setcanceltype
- Differences and implications of each cancellation type
Managing Resources During Cancellation
- Cleanup Handlers
- Registering cleanup handlers using pthread_cleanup_push and pthread_cleanup_pop
- Examples of using cleanup handlers
- Thread-Safe Resource Management
- Strategies to ensure resources are properly managed during cancellation
Network Programming & Sockets
Introduction to Socket Programming
- Overview of Socket APIs
- History and standards
- Basic concepts and functionality
- Types of Sockets
- Stream vs. Datagram
- TCP/IP sockets vs. UNIX domain sockets
- Development Environment Setup
- Required tools and libraries
Basics of TCP/IP Sockets
- Understanding TCP/IP
- Protocol layers
- TCP vs. UDP characteristics
- Creating and Managing Connections
- Establishing connections
- Client-server architecture principles
- Data Transmission
- Handling data sending and receiving
- Connection management
Advanced TCP/IP Socket Programming
- Error Handling and Debugging
- Common issues and troubleshooting
- Packet analysis tools
- Socket Options and Configuration
- Manipulating options for performance tuning
- Implementing timeouts and adjusting buffers
- Multiplexing and Non-blocking I/O
- Techniques for managing multiple connections
- Implementing asynchronous data handling
Basics of UNIX Domain Sockets
- Introduction to UNIX Domain Sockets
- Benefits and comparison with TCP/IP
- Communication patterns
- Setup and Configuration
- Establishing UNIX domain connections
- Namespace and path considerations
- Data Transfer Techniques
- Modes of data transfer
- Ensuring data integrity
IPC
Overview of IPC
-
Definition and importance of IPC
-
Different IPC mechanisms available in Linux
-
Introduction to librt
-
Role and features of the librt library
-
Setting up the environment for IPC development
Basic IPC Mechanisms
-
Pipes and FIFOs
-
Basics of pipes and named pipes (FIFOs)
-
Practical examples and use cases
-
Message Queues
-
Introduction to POSIX message queues
-
Creating, sending, and receiving messages
Shared Memory
-
Basics of Shared Memory
-
Concept of shared memory in IPC
-
Creating and mapping shared memory regions
-
Synchronization in Shared Memory
-
Using mutexes and condition variables in shared memory
-
Ensuring safe access to shared memory
Semaphores
-
Using POSIX Semaphores
-
Understanding semaphores for process synchronization
-
Creating and managing semaphores
-
Advanced Semaphore Techniques
-
Handling complex synchronization scenarios
-
Practical examples and patterns
Advanced Messaging Techniques
-
Real-time Messaging with mqueue
-
Enhancing IPC with real-time features of message queues
-
Setting attributes and real-time messaging priorities
-
Robustness and Fault Tolerance
-
Error handling and recovery in IPC scenarios
Memory-mapped Files
-
Introduction to Memory-mapped Files
-
Using mmap for efficient file access
-
Scenarios for using memory-mapped files in IPC
-
Performance Considerations
-
Advantages and trade-offs of using memory-mapped files
Synchronization Techniques
-
Advanced Synchronization
-
Barrier synchronization
-
Read-write locks for complex IPC scenarios
-
Practical Synchronization Problems
-
Solving common synchronization challenges in IPC
Who Should Enroll
-
Engineers looking to achieve career-defining skills in Embd. Linux & system programming
-
Developers struggling to work on Linux based system & embedded projects
-
Engineers looking to join the top 10% of elite, highly rewarding programming career
-
Engineers looking to upgrade their careers from other technology to Embedded Linux
Program Schedules & Fee
- Program Starts: 16th October 2024
- Program Fee: ₹17,700/- (inclusive of GST)
- Session Timings: 7:40am to 9am (Mon. to Fri.)
- Training Mode: Online, live, interactive (zoom)
- Program Duration: 8 weekends.
Support Services
- Missed sessions: Backup recording will be provided for missed sessions
- Offline support: Delivered via Whatsapp
- Batch transfers: Available within 1 year
- Placement support: Offered on program completion (any experience category)
How Raghu sir works on your thought process
Abhishek Kumar Roy (John Deer)
Raghu sir taught me how to reason
Farheen Hussain (L&T)
Now I can say I really know things
Deepjyoti Roy
Interested. Apply Now
On receiving the application, we will contact you with further registration process
Know your trainer
Raghu Bharadwaj
- Leading Linux mentor. Trained over 40 clients including Xilinx, Qualcomm, Broadcom, NXP, Harman, Mercedes among others
- Trained over 3000 participants across 7 nations
- Attended by professionals from over 100 companies
- Leading authority and speaker on the Linux Kernel
FAQs
What are the pre-requisite skills to enroll for this program?
You must be good at C programming and familiar with basic Linux commands, vi/vim editor
How is the program delivered?
This program is delivered online through a live, interactive session. You must login whenever there is a live session to access it. This program may have few recorded sessions.
What if I miss some sessions due to work or other issues?
Do not worry, we have it covered. If you miss any session due to any reason, you can request to listen the backup recording at your convenient time
What is the validity of my registration?
Your registration is valid for a period of 1 year. That is, after you make the payment you can take the program once within 1 year