Skip to content

Latest commit

 

History

History
39 lines (31 loc) · 1.19 KB

File metadata and controls

39 lines (31 loc) · 1.19 KB

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