The /proc File System solution

$25.00

Original Work ?

Download Details:

  • Name: exercise09.zip
  • Type: zip
  • Size: 230.36 KB

Category: You will Instantly receive a download link upon Payment||Click Original Work Button for Custom work

Description

5/5 - (2 votes)

Using the module concept, implement a file named clock in the directory /proc, for example /proc/michel clock. 1 When function read() is called, the module should return the time of day in the second and microsecond format. The result is returned as a string. Example: $ sudo insmod michel_clock.ko $ ls -l /proc/michel_clock -r–r–r– 1 root root 0 Feb 26 16:42 /proc/michel_clock $ cat /proc/michel_clock 1488145467 sec 920381 usec Hint: Study the Linux kernel implementation of function gettimeofday(), on The Linux Kernel Archives . Due date: April first. Submit you work on cuLearn. This exercise must be done in the C programming language under Linux (make sure it runs on Ubuntu 16.04 64-bit). Submit a single tar.gz file. Source code and a make file must be included. You are responsible for the completeness of your submission. You are responsible for submitting your work on time. Submissions that do not compile are not accepted. 1Use your cuLearn first name. 1