Dynamic information of Kernel using multithreading

Hi , I am new to this forum. Can someone help me on this question, I have no clue how to proceed . Its urgent..
A continuous program should print out the following dynamic information
(average of an interval). Internally, there should be two parameters with
your program, one is the probing interval and the other one is the printing
(display) interval. e.g., the probing interval could be 1 second, and the
printing interval could be 30 seconds, thus your program can calculate the
required metrics in the last 30 collected samples.(In other words-In the dynamic information part, one thread uses the probing interval to read /proc file, the second thread displays the results with a display interval.) The Program should be written in C
� The percentage of time the processor(s) spending in user mode, system
mode, and idle.
� The percentage of available memory.
� The rate of process creations in the system.
� The rate of context switches in the kernel.
� The rate of disk read/write in the system.

Thanks,

Does the system have sar? iostat? Unless you are taking a systems programming class just use the available tools.

I dont know what do you mean by sar and iostat. I am pretty new to operating systems concepts.
Thanks for the response.

Is this for a class?

I am doing a project and this question is part of it. I am not sure how to display the dynamic information of kernel in a C program using multithreads in an interval

Something is not right here.... however: In order to do this you need to know the OS, and something about C, something about threads.

What OS?

Have you programmed threads in C?