I have a project assignment that I need help with. The following is the description.
//////////////////////////////////////////////////////////////////////////
There are four system calls in Linux related to creating new processes: fork, vfork, execve, and clone. (The man pages will describe for you the differences among them.) Instrument the kernel so that we can write a user-level program that will print counts of the number of times each of these four system calls has been invoked (by any process on the system); that is, I want to write a garden-variety C program that prints out the total number of invocations of each of these four system calls (by any process on the system).
To do this requires three things:
***1. Modify the kernel to keep track of this information.***
***2. Design and implement a new system call that will get this data back to the user application.***
3. Write the user application.
We'd also like to be able to reset these statistics periodically. So we need a way to clear the request information we've tracked so far. This requires either parameterizing the above system call to add a clear option, or adding another system call.
/////////////////////////////////////////////////////////////////////////////
I found these sources on how to add system calls in general.
http://www.linuxchix.org/content/cou...acking/lesson9
http://tldp.org/HOWTO/html_single/Im....6-i386/#AEN22
***I need direction on how to do step 1 and step 2.***
Here is the full project description.
http://www.cs.washington.edu/homes/z...all/proj1.html
I have part one done.
This is an independent study assignment so there are no notes or lectures and I have no kernel development experience.
Also, I have the kernel source tree but am unable to make it because the memory space on the server is too low. So I will be unable to do any testing of the kernel until the administrator fixes the memory issue. The compiling was going along for almost an hour before space ran out. Is it normal for it to take that long?
Any help will be nice.