Writing a module to a linux kernel

Click For Summary
Writing modules for the Linux kernel is essential for adding functionality and supporting new hardware devices without the need to rebuild the entire kernel. This modular approach allows developers to create device drivers for hardware originally designed for other operating systems, enabling compatibility with Linux. Kernel modules can be loaded and unloaded dynamically, which enhances performance, especially for device handlers that require fast execution with minimal interruptions. This flexibility is a key reason why developers choose to write modules, as it simplifies the process of extending the kernel's capabilities.
mech-eng
Messages
825
Reaction score
13
I was wondering about "writing a module to a linux kernel." This question haven't asked yet. Would you please explain why linuxers write such modules to a linux kernel? What is the reason?

Thank you.
 
Computer science news on Phys.org
A device handler that needs to run fast with no interruptions should be in the kernel.
 
  • Like
Likes QuantumQuest and jedishrfu
Simple answer: You have a new device originally designed for another OS, you need to have it work with Linux. You write a driver.
 
  • Like
Likes QuantumQuest and mech-eng
mech-eng said:
I was wondering about "writing a module to a linux kernel." This question haven't asked yet. Would you please explain why linuxers write such modules to a linux kernel? What is the reason?

Linux kernel is built in a barebones fashion. The extra functionality we need is added in a modular way i.e. writing modules "on top" of that. This is an easy way to extend the functionality of the kernel without having to rebuild / recompile the kernel each time.
 
  • Like
Likes mech-eng
Thread 'ChatGPT Examples, Good and Bad'
I've been experimenting with ChatGPT. Some results are good, some very very bad. I think examples can help expose the properties of this AI. Maybe you can post some of your favorite examples and tell us what they reveal about the properties of this AI. (I had problems with copy/paste of text and formatting, so I'm posting my examples as screen shots. That is a promising start. :smile: But then I provided values V=1, R1=1, R2=2, R3=3 and asked for the value of I. At first, it said...

Similar threads

Replies
2
Views
3K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 3 ·
Replies
3
Views
529
  • · Replies 24 ·
Replies
24
Views
4K
Replies
4
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 1 ·
Replies
1
Views
5K
  • · Replies 18 ·
Replies
18
Views
2K
  • · Replies 12 ·
Replies
12
Views
3K
  • · Replies 31 ·
2
Replies
31
Views
3K