The Linux Channel

Vídeos :: Linux Kernel Programming

Written by: Kiran Kankipati - Published: 05-Jul-2016

Assista vídeo: 317 MySQL Database - for Systems Software Developers and Kernel Developers
317 MySQL Database - for Systems Software Developers and Kernel Developers
* Clique na imagem para assistir este vídeo no Youtube ↗
Assista vídeo: 315 Scripting in PHP - for Systems Software and Kernel Developers
315 Scripting in PHP - for Systems Software and Kernel Developers
* Clique na imagem para assistir este vídeo no Youtube ↗
Assista vídeo: 291 Systems Programming - Kernel Crash vs User-space Process Crash
291 Systems Programming - Kernel Crash vs User-space Process Crash
* Clique na imagem para assistir este vídeo no Youtube ↗

Refer:
Wiki:
Kernel panic - https://en.wikipedia.org/wiki/Kernel_panic
kdump - https://en.wikipedia.org/wiki/Kdump_(Linux)
Segmentation fault - https://en.wikipedia.org/wiki/Segmentation_fault

Assista vídeo: 292 - Why Linux Kernel is written in C-language but not in C++ ?
292 - Why Linux Kernel is written in C-language but not in C++ ?
* Clique na imagem para assistir este vídeo no Youtube ↗
Assista vídeo: 275 Q&A - Recursive APIs - why I never use them?
275 Q&A - Recursive APIs - why I never use them?
* Clique na imagem para assistir este vídeo no Youtube ↗
Assista vídeo: 215 Linux Kernel build system - hardware specs
215 Linux Kernel build system - hardware specs
* Clique na imagem para assistir este vídeo no Youtube ↗
Assista vídeo: Linux Kernel - kmalloc() and vmalloc() performance research
Linux Kernel - kmalloc() and vmalloc() performance research
* Clique na imagem para assistir este vídeo no Youtube ↗
Assista vídeo: Benchmarking performance of kmalloc() and vmalloc() allocated buffers
Benchmarking performance of kmalloc() and vmalloc() allocated buffers
* Clique na imagem para assistir este vídeo no Youtube ↗

Download this episode my entire kernel module sample code, make file, clean script HERE. And here is the source code for a quick reference.

/* kmalloc_vs_vmalloc 
 * The Linux Channel
 * Author: Kiran Kankipati
 * Updated: 23-nov-2016
 */
#include <linux/init.h>
#include <linux/module.h>
#include <linux/device.h>
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/fs.h>
#include <linux/vmalloc.h>
#include <asm/uaccess.h>


MODULE_LICENSE("GPL");
MODULE_AUTHOR("Kiran Kankipati");
MODULE_DESCRIPTION("kmalloc vs vmalloc");
MODULE_VERSION("0.1");

unsigned char *kmallocbuf;
unsigned char *vmallocbuf;

#define BUFLEN 1000

static int __init kmalloc_vs_vmalloc_init(void)
{	unsigned long js, je, jdiff;
	int i=0,j=0;
   kmallocbuf = kmalloc( BUFLEN, GFP_KERNEL);
   if(kmallocbuf)
   {	sprintf(kmallocbuf, "This is a test (kmallocbuf)\n");
     	printk("%s", kmallocbuf);
     	
     	js = jiffies;
     	for(j=0;j<100000;j++){ for(i=0;i<BUFLEN;i++) { kmallocbuf[i] = i+j; } }
     	je = jiffies;
     	printk("dummy print kmallocbuf: %02x\n", kmallocbuf[15]);
     	jdiff = je - js;
     	printk("\nEnd Time [%lu] - Start Time [%lu] - Diff [%lu]\n",je,js, jdiff);
   }
   printk("-------------------------------\n");
   
   vmallocbuf = vmalloc(BUFLEN);
   if(vmallocbuf)
   {	sprintf(vmallocbuf, "This is a test (vmallocbuf)\n");
   	printk("%s", vmallocbuf);
   	
   	js = jiffies;
   	for(j=0;j<100000;j++){ for(i=0;i<BUFLEN;i++) { vmallocbuf[i] = i+j; } }
     	je = jiffies;
     	printk("dummy print vmallocbuf: %02x\n", vmallocbuf[15]);
     	jdiff = je - js;
     	printk("\nEnd Time [%lu] - Start Time [%lu] - Diff [%lu]\n",je,js, jdiff);
   }
   return 0;
}


static void __exit kmalloc_vs_vmalloc_exit(void)
{	
   kfree(kmallocbuf);
   vfree(vmallocbuf);
}

module_init(kmalloc_vs_vmalloc_init);
module_exit(kmalloc_vs_vmalloc_exit);

Assista vídeo: Linux Kernel /proc filesystem vs /dev character device drivers
Linux Kernel /proc filesystem vs /dev character device drivers
* Clique na imagem para assistir este vídeo no Youtube ↗
Assista vídeo: GOTO Statements in Linux Kernel Source
GOTO Statements in Linux Kernel Source
* Clique na imagem para assistir este vídeo no Youtube ↗
Assista vídeo: Linux Kernel run-time performance vs GCC Compiler
Linux Kernel run-time performance vs GCC Compiler
* Clique na imagem para assistir este vídeo no Youtube ↗
Assista vídeo: How to stay in touch with latest Linux Kernel
How to stay in touch with latest Linux Kernel
* Clique na imagem para assistir este vídeo no Youtube ↗
Assista vídeo: Linux Kernel preemption model during Kernel Compilation
Linux Kernel preemption model during Kernel Compilation
* Clique na imagem para assistir este vídeo no Youtube ↗
Assista vídeo: Linux Kernel atomic_t datatype - atomic variables and APIs
Linux Kernel atomic_t datatype - atomic variables and APIs
* Clique na imagem para assistir este vídeo no Youtube ↗
Assista vídeo: Linux Kernel kmalloc() vs vmalloc() kernel space memory allocation
Linux Kernel kmalloc() vs vmalloc() kernel space memory allocation
* Clique na imagem para assistir este vídeo no Youtube ↗


Suggested Topics:


Linux Kernel programming :: Video Episodes
 Linux Operating System - User-space Processes ↗
22-Jan-2018


 Linux ioctl() API interface ↗
11-Oct-2017


 Linux Kernel Compilation ↗
05-Jul-2016


 Linux Kernel Programming ↗
05-Jul-2016


 Linux Kernel Network Programming - struct net - struct netns_ipv4 - /proc/sys/net/ipv4 ↗
21-May-2018


 Linux Kernel struct iphdr data-structure ↗
05-Jul-2016


 Linux Kernel - Containers and Namespaces ↗
11-Feb-2018


 Linux Kernel struct udphdr data-structure ↗
05-Jul-2016


 Linux Kernel Network Programming ↗
05-Nov-2017


 Linux Kernel sk_buff data-structure - Episode-11 to Episode-18 ↗
26-Mar-2017


 Linux Kernel Architecture - Generic ↗
13-May-2017


 Linux Kernel sk_buff data-structure - Episode-1 to Episode-10 ↗
05-Jul-2016


 Linux Kernel dst_entry data-structure ↗
04-May-2017


 Linux Kernel struct ethhdr data-structure ↗
02-Nov-2016


 Linux Kernel struct socket and struct sock data-structure ↗
31-Oct-2017


 Linux Kernel FileSystems Subsystem ↗
16-Dec-2017


 Linux Kernel TCP Congestion Control Algorithms ↗
20-Nov-2017


 Linux Kernel Programming - Device Drivers ↗
30-Mar-2018


 Linux Kernel struct tcphdr data-structure ↗
05-Jul-2016


 Linux Kernel /proc Interface ↗
22-Feb-2017


 Linux Kernel net_device data-structure ↗
05-Jul-2016


 Linux Kernel Networking Sub-system ↗
05-Jul-2016


 

Join The Linux Channel :: Facebook Group


Join a course:

💎 Linux, Kernel and Network Software Developer: PDF Brochure
💎 Linux, Kernel, Networking and Device Drivers: PDF Brochure
💎 PhD or equivalent (or Post Doctoral) looking for assistance: Details
💎 ... or unlimited life-time mentorship: Details


💗 Help shape the future: Sponsor/Donate


Tópicos recomendados:
Featured Video:
Assista vídeo: 0x1bd Raspberry Pi Official Universal Power Supply | DC 2.5 Amps - 5.1 Volts | Unboxing and Review
0x1bd Raspberry Pi Official Universal Power Supply | DC 2.5 Amps - 5.1 Volts | Unboxing and Review
* Clique na imagem para assistir este vídeo no Youtube ↗

Download: Linux Kernel Booting_1.pdf


Trending Video:
Assista vídeo: 230 How to become a programmer? And how companies should screen talented programmers?
230 How to become a programmer?  And how companies should screen talented programmers?
* Clique na imagem para assistir este vídeo no Youtube ↗

TUTORIALS :: Research Socket overhead in Linux vs Message Queues and benchmarking:


Linux ioctl() API interface:


Research :: Content Delivery Networks (CDN):
CDN Networks


Recommended Video:
Assista vídeo: 168 PyDelhi + PyData + ILUG-D + Linux Chix meetup mash @ Sarai on 17-Dec-2016
168 PyDelhi + PyData + ILUG-D + Linux Chix meetup mash @ Sarai on 17-Dec-2016
* Clique na imagem para assistir este vídeo no Youtube ↗