HOMEVIDEOSCOURSESSTUDENTSSPONSORSDONATIONSEVENTSTUTORIALSLINKSNEWSCONTACT


VIDEOS 》 Linux Kernel vs User-space - Library APIs - Linux Kernel Programming

One of the important aspects a beginner who is into Linux Kernel space systems software development has to understand is that unlike user-space C/C++ programming, where you can freely include any library APIs via respective #include files (which are dynamically linked during run-time via those /lib .so files), in the case of Kernel space programming, these library APIs are written within the Kernel source itself.

What are those library APIs:
These are the fundamental APIs which we commonly use, such as memcpy(), memcmp(), strlen(), strcpy(), strcpy() and so on. Unlike user-space in which these APIs are cross-compiled as a part of tool-chain for that respective CPU platform, in the case of Kernel space, you find various variants of the same done for each and every CPU platform (such as ARM, x86, MIPS, etc). You can find the source code of the same usually in the /arch folder of the Linux kernel source. And each implementation is highly optimized for that specific CPU platform. Sometimes you can often find even in-line assembly in combination with the typical native kernel C source code.

The primary reason for such an approach in Kernel source is that all the code i.e libraries as well other kernel dependent (CPU platform independent) code is all packed in a self-sustained source repository. Because in the case of kernel, we cannot expect to have other external third-party run-time dependency files like we get in user-space, hence it is important to understand the same as you start your journey towards kernel space programming.

Whoops: Linux's strcmp() For The m68k Has Always Been Broken:
Refer Phoronix News Article - https://www.phoronix.com/news/Linux-m68k-strcm ...

So here is an interesting news article about a specific API such as in this case strcmp() written for native m68k (Motorola 68000) has always been broken and only now uncovered at the end of 2022.

So here is my detailed Youtube video episode on the same with live demo, walk-through and examples.

I also conduct sessions/classes on Systems and Network software programming and architecture. If you are interested, click HERE for more details.



Suggested Topics:


Video Episodes :: Linux Kernel programming

What is purpose of Kernel Development - Example SMOAD Networks SDWAN Orchestrator Firewall Kernel Engine ↗
Monday' 18-Jul-2022
Often aspiring students may have this question, that what is the purpose of Linux Kernel Development. Since Linux Kernel is very mature and it has almost everything one would need. Usually, we need custom kernel development in the case of any new driver development for new upcoming hardware. And this happens on and on. But at times we may also come across few features/modules/components which are already provided by the Linux Kernel which are not adequate or atleast not the way we exactly intended to use. So, this is the real-world example, sometimes no matter what Linux Kernel provides as a part of stock Kernel/OS features, sometimes we have to write our own custom kernel stack or module(s) which can specifically cater our exact needs.

Linux Kernel - Containers and Namespaces ↗
Saturday' 13-Mar-2021

Linux Operating System - User-space Processes ↗
Saturday' 14-May-2022

Linux Kernel vs User-space - Library APIs - Linux Kernel Programming ↗
Tuesday' 17-Jan-2023
One of the important aspects a beginner who is into Linux Kernel space systems software development has to understand is that unlike user-space C/C++ programming, where you can freely include any library APIs via respective #include files (which are dynamically linked during run-time via those /lib .so files), in the case of Kernel space programming, these library APIs are written within the Kernel source itself. These are the fundamental APIs which we commonly use, such as memcpy(), memcmp(), strlen(), strcpy(), strcpy() and so on. So here is my detailed Youtube video episode on the same with live demo, walk-through and examples.

Linux Kernel Programming ↗
Saturday' 13-Mar-2021

Linux Kernel FileSystems Subsystem ↗
Saturday' 13-Mar-2021

Linux Kernel /proc Interface ↗
Wednesday' 18-May-2022
/proc is one of the most popular kernel to user-space interface which you can leverage to add an interface to your Kernel code such as Kernel modules, Kernel Device Drivers, etc. Personally I prefer /proc interface than other alternatives such as /sysfs, ioctl() and so on for my personal Kernel modules/stack. So here is my detailed multi-episode Youtube video series on /sysfs Interface. I also conduct sessions/classes on Systems and Network software programming and architecture.

Linux Kernel Architecture ↗
Wednesday' 18-May-2022

Linux Kernel Programming - Device Drivers ↗
Saturday' 13-Mar-2021
Watch detailed videos and read topics on Linux Kernel Programming - Device Drivers

Linux Kernel Compilation ↗
Wednesday' 18-May-2022

Linux ioctl() API interface ↗
Saturday' 13-Mar-2021
Watch detailed videos and read topics on Linux Kernel Programming and Linux ioctl() API interface

Linux Kernel /sysfs Interface ↗
Saturday' 14-May-2022
/sysfs is one of the most popular kernel to user-space interface which you can leverage to add an interface to your Kernel code such as Kernel modules, Kernel Device Drivers, etc. Although personally I prefer /proc interface than other alternatives such as /sysfs, ioctl() and so on for my personal Kernel modules/stack. So here is my detailed multi-episode Youtube video series on /sysfs Interface.

Join The Linux Channel :: Facebook Group ↗

Visit The Linux Channel :: on Youtube ↗


💗 Help shape the future: Sponsor/Donate


Recommended Topics:
Featured Video:
Watch on Youtube - [966//0] 291 Systems Programming - Kernel Crash vs User-space Process Crash ↗

What is purpose of Kernel Development - Example SMOAD Networks SDWAN Orchestrator Firewall Kernel Engine ↗
Monday' 18-Jul-2022
Often aspiring students may have this question, that what is the purpose of Linux Kernel Development. Since Linux Kernel is very mature and it has almost everything one would need. Usually, we need custom kernel development in the case of any new driver development for new upcoming hardware. And this happens on and on. But at times we may also come across few features/modules/components which are already provided by the Linux Kernel which are not adequate or atleast not the way we exactly intended to use. So, this is the real-world example, sometimes no matter what Linux Kernel provides as a part of stock Kernel/OS features, sometimes we have to write our own custom kernel stack or module(s) which can specifically cater our exact needs.

Roadmap - How to become Systems Software Developer ↗
Friday' 13-May-2022
When you are at the beginning of your career or a student, and aspire to become a software developer, one of the avenues to choose is to become a hard-core Systems Software Developer. However it is easier said than done, since there are many aspects to it as you explore further. As a part of systems developer, you can get into core kernel space developer, kernel device drivers developer, embedded developer and get into things like board bring-up, porting, etc, or can become a user-space systems programmer, and so on. So here is my detailed multi-episode Youtube video series on Roadmap - How to become Systems Software Developer.

The Linux Channel :: Sponsors ↗
Monday' 30-May-2022
Here is a list of all The Linux Channel sponsors/donors (individual/companies).

Linux Kernel vs User-space - Library APIs - Linux Kernel Programming ↗
Tuesday' 17-Jan-2023
One of the important aspects a beginner who is into Linux Kernel space systems software development has to understand is that unlike user-space C/C++ programming, where you can freely include any library APIs via respective #include files (which are dynamically linked during run-time via those /lib .so files), in the case of Kernel space programming, these library APIs are written within the Kernel source itself. These are the fundamental APIs which we commonly use, such as memcpy(), memcmp(), strlen(), strcpy(), strcpy() and so on. So here is my detailed Youtube video episode on the same with live demo, walk-through and examples.

Linux Kernel Driver Device Trees ↗
Tuesday' 17-Jan-2023
The Linux kernel is the backbone of the Linux operating system. A device tree is a hierarchical tree structure that describes the various devices that are present in a system, including their properties and relationships to one another. The device tree is used by the Linux kernel to identify and initialize the different devices on a system, and to provide a consistent interface for interacting with them.

Linux Kernel /sysfs Interface ↗
Saturday' 14-May-2022
/sysfs is one of the most popular kernel to user-space interface which you can leverage to add an interface to your Kernel code such as Kernel modules, Kernel Device Drivers, etc. Although personally I prefer /proc interface than other alternatives such as /sysfs, ioctl() and so on for my personal Kernel modules/stack. So here is my detailed multi-episode Youtube video series on /sysfs Interface.

Rockchip ROC-RK3566-PC from Firefly | OpenWRT ↗
Monday' 23-Jan-2023
Here is my multi-episode video series on evaluation of Rockchip ROC-RK3566-PC from Firefly with stock OpenWRT firmware.

Support, Donate and Contribute - The Linux Channel ↗
Saturday' 13-Mar-2021
Help shape the future and make an impact by donating/sponsor The Linux Channel. Your donation will transform lives !

Research Socket overhead in Linux vs Message Queues and benchmarking ↗
Saturday' 13-Mar-2021

Linux Kernel Data-Structures ↗
Saturday' 13-Mar-2021
Here is a quick reference of important Linux Kernel Data Structures of various assorted Kernel Subsystems such as: Process, Memory Management, Networking, File System, Device Drives, IPC and so on. So when you write custom Kernel code, it is often you may need to populate a new instance of one of these data-structures or just access the existing ones. Hence it is very important to know some of these and get familiarized with. You can bookmark this page, so that you can use this as a quick reference when you write your own custom Linux Kernel Modules.


Trending Video:
Watch on Youtube - [459//0] 0x202 Circular Ring Buffers Live Visual Demo | Linux Kernel | Device Drivers | Network Stack | P2 ↗

Building my own Userspace Network Stack - Platform/OS and Hardware Independent ↗
Saturday' 13-Mar-2021



Recommended Video:
Watch on Youtube - [440//0] 328 Network Latency and Bandwidth Assessment - for Network Admins and Infrastructure Architects ↗