Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This exercise must be done in the C programming language under Linux kernel 4.4 (Ubuntu 16.04 has it). Build a module that creates a special

image text in transcribed

This exercise must be done in the C programming language under Linux kernel 4.4 (Ubuntu 16.04 has it).

Build a module that creates a special character device named /dev/-prime, for example /dev/michel time).1 The entry must use a dynamically allocated major device number. It must behave as if it were an infinitely long file filled with successive prime numbers. As much data as you would ty to read from /dev/prime, the system generates enough successive prime numbers starting from number 2. Using the test program test.c, you should observe the following behavior: $ sudo insmod michel_prime.ko 1s-1 /dev/michel-prime crw--- 1 root root 244, 0 Jan 29 14:45 /dev/michel_prime sudo ./test 5 test started Reading 5 prime number (s) 2 3 $ sudo ./test 100 test started Reading 100 prime number(s) 2 523 541 $ sudo rmmod michel_prime.ko 1s-1 /dev/prime ls: cannot access '/dev/prime': No such file or directory

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Processing Fundamentals Design

Authors: Marion Donnie Dutton Don F. Seaman

14th Edition Globel Edition

1292107634, 978-1292107639

More Books

Students also viewed these Databases questions

Question

6. Have you used solid reasoning in your argument?

Answered: 1 week ago