Performance of Loadable Kernel Module and User Space Module for Temperature Sensor DS18B20 on Raspberry Pi Platform
Refer this file to compile and run the code!
Directory: /user_module/
- Compile:
gcc -o user_module user_module.c -lwiringPi -lm
- Run:
sudo ./user_module
Directory: /user_thread_module/user_thread_module/
- Compile:
gcc -o user_thread_module.c -lwiringPi -lm -pthread
- Run:
sudo ./user_thread_module
Directory: /kernel_module/
- Compile:
make
(Create Makefile) - Run (Insert the module):
sudo insmod kernel_module.ko
- Observe the output:
dmesg
(last enteries) - To remove the module:
sudo rmmod kernel_module.ko
Directory: /kernel_thread_module/kernel_thread_module/
- Compile:
make
(Create Makefile) - Run (Insert the module):
sudo insmod kernel_thread_module.ko
- Observe the output:
dmesg
(last enteries) - To remove the module:
sudo rmmod kernel_thread_module.ko