mind shattering good questions

i want to make a C program that should wb able to do the following tasks.

one thing that i want to say is that we dont have to use ps and top all these commands

by C programmign only ..........

i am doing this by proc file system using CAT command in various files but .......its not correct

can anyone tell me how to see the parameters of task_struct :confused:

  1. Should be able to show the status of all the processes
  2. Should be able to show the new processes coming in
  3. Should be able to keep a log of the processes expired(The log should contain the starting time, expiry time, time slices used, total execution time, effective CPU usage time, time wasted for IO etc.)
  4. Should be able to show the CPU usage time, Transition time, Wait time in the queue, No of total time slices used to run etc.
  5. If possible should be able to show the memory usage of each process(both Physical and Virtual)
  6. If possible should be able to keep log of all this information. Also keep track of the swapping of the processes.
  7. Should be able to automatically analyse the information stored and show a graph of the usage times etc. And should suggest the best possible time slice for that environment.
  8. Should be able to show the resources used by each process. And should keep a log of resource allocation for a process.
  9. Should be able to show the percentage of Usage of CPU during a time slice by the process and a log should be maintained for this.
  10. Should be able to show the priorities of different processes and show how preemtion takes place. Also show the number of timeslices alloted for processes of different priorities.
  11. Should be able to show the processes waiting in the queue etc.