Total count statistics for all process in the system


Write a program using c language to find the page fault for individual processes, group of processes and the system as a whole using the following system call int sys_pgfltstats(pid_t pid,int flag,pf_info_struct *info)

where pf_info_struct should contain fields of
1. total number of major page faults
2. total number of major page faults
3. number of processes included in these counts 

If pid is:

* -1: then return total count statistics for all processes in the system.
* positive then look at the flag field and do the following:
1. flag is PGFLTSTAT_PROC: then return count statistics for the single process with the matching pid
2. flag is PGFLTSTAT_OWNER: then return the total count statistics for all process in the system with the same owner as the specified pid. 

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: Total count statistics for all process in the system
Reference No:- TGS0142131

Expected delivery within 24 Hours