Skip to content

092vk/Char_Device_Driver_Linux

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Title

It is a Char Device driver for linux kernel, it consists of a dynamic circular queue, that uses IOCTL calls to talk to user programs to:

  1. Set the size of queue
  2. Push data to queue
  3. Pop data from queue

How to use the driver

  1. Clone the repo
  2. Go to /kernel folder and run
    make
    sudo insmod vk.ko
    sudo mesg -w
    
  3. Open another terminal and go to /user folder
  4. And compile and run the user programs , configurator.c filler.c and redear.c
    gcc configuartor.c -o configurator
    gcc filler.c -o filler
    gcc redear.c -o redear
    
  5. Run
    sudo ./configuartor
    sudo ./filler
    sudo ./redear
    

Features

  1. Blocking nature for POP : When the queue is empty and you try to pop some data out, the queue goes to waiting mode and waits untill received by an interupt or data is pushed by some other program.
  2. The queue uses mutex so, it can be used by multiple user programs at the same time

Input and Output

Image1
Image2

Video explaining working and the code

Watch the video

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published