Skip to content

A Linux kernel module that returns the number of running processes using /proc/count

Notifications You must be signed in to change notification settings

awest25/A-Kernel-Seedling

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A Kernel Seedling

A kernel module that returns the number of processes in using /proc/count.
Developed for CS 111, Operating System Principles with Paul Eggert.

Building

In the lab0 directory, type make.
The resulting proc_count.ko file is the kernel module.

Running

To run the module, type sudo insmod proc_count.ko.
Now, if we run lsmod | grep proc_count we can see the module is running.
To list the number of processes, type cat /proc/count. This should write an integer of how many processes there are followed by a newline.

Cleaning Up

To remove the module, type sudo rmmod proc_count.

Testing

Tested on kernel verison 5.14.8

Testing scripts: the included test_lab0.py script was used to ensure the module could correctly build and to ensure it exhibited the correct behavior. In addition, the number of active proccesses were counted and compared to the returned integer. The number of active programs were close enough to be accurate.e

About

A Linux kernel module that returns the number of running processes using /proc/count

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published