Skip to content

This repository contains a Linux kernel module implementation for message slots, primarily written in C with supporting Makefiles. The project includes functionalities for inter-process communication through message slots, demonstrating kernel module programming and low-level system interaction techniques.

Notifications You must be signed in to change notification settings

arbelklein/Message-Slot-Kernel-Module

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Message-Slot-Kernel-Module

Description

This repository contains a kernel module that provides a new inter-process communication (IPC) mechanism called a message slot. A message slot is a character device file through which processes can communicate. Each message slot device can have multiple message channels active concurrently, allowing multiple processes to use it. The module supports setting a channel ID using ioctl(), and sending/receiving messages using write() and read() system calls.

Usage

  1. Compile the kernel module:
    make
  2. Load the kernel module:
    sudo insmod message_slot.ko
  3. Create a message slot device file:
    sudo mknod /dev/slot0 c 235 0
    sudo chmod 666 /dev/slot0

Example Session

  1. Load the kernel module:
    sudo insmod message_slot.ko
  2. Create a message slot file:
    sudo mknod /dev/slot0 c 235 0
    sudo chmod 666 /dev/slot0
  3. Send a message:
    ./message_sender /dev/slot0 1 "Hello, World!"
  4. Read the message:
    ./message_reader /dev/slot0 1
    Hello, World!

About

This repository contains a Linux kernel module implementation for message slots, primarily written in C with supporting Makefiles. The project includes functionalities for inter-process communication through message slots, demonstrating kernel module programming and low-level system interaction techniques.

Topics

Resources

Stars

Watchers

Forks