Question: Please answer the question thoroughly! Kernel Producer-Consumer Problem (Total points: 40 ). This exercise requires you to create a kernel driven producer and consumer. There

Please answer the question thoroughly!
Please answer the question thoroughly! Kernel Producer-Consumer Problem (Total points: 40 ).

Kernel Producer-Consumer Problem (Total points: 40 ). This exercise requires you to create a kernel driven producer and consumer. There should be two processes P and C. P reads random 8-bytes of the device /dev/urandom and passes them to the kernel via a system call, lets name it writer(). The kernel should maintain a queue of fixed length (allocated using kmalloc() function). The kernel implementation of the writer() should accept the 8-byte blocks from the user and write them the queue (and NOT a shared memory). The process C should call a reader() system call, whose kernel implementation must involve calling the function to dequeue the enqueued bytes, from the read-write queue. You would therefore need functions to enqueue and dequeue bytes from the queue. These functions must use kernel synchronization primitives like kernel reader- writer semaphores or mutexes to ensure that there are no race conditions. As a suggestion, avoid using spin locks, until and unless you are really sure about what you are doing. question: 2. A readme describing the logic of the programs with relevant description of the data structures used, including description of the kernel data structures and source files modified (which ones were modified, how and why) (5 points)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!