I am doing a project on OS and require the process scheduling data for an operating system. The data has to include the list of all processes in short-term-scheduler and long-term-scheduler along with the CPU time slice and memory requirement of every one of them. Also I need the data on when and by what process is every other process preempted. Is there a way to collect all that data in linux? How can I do that?
In linux source code, there is a structure task_struct
in include/linux/sched.h
. Is there a way to get the state of every object of that structure as well?