How do modern Operating Systems detect process starvation? So first off do the modern operating systems like windows and linux have a method for detecting starvation? if not, why? and if they do, then how are they going to detect starvation of a process? (this was a question in our exam) 

my take was this so correct me if this is not good or not possible:

i said we should implement a linked list of waiting processes (that are waiting for a resource or etc) then we periodically run a function(using interrupts) which checks this list and we have a variable for each process and we increase that everytime, when it reaches certain point then we would know its starving(but i still dont know how to know this "certain point")

so is this correct? if so then how can we know this "certain point"? ( I suppose one way is just look at the statistic of average waiting time of processes and do a little math?) 

if not, what is your solution?
Inline with @chi 's comment;  lets say process "x" gets starved in linux or windows, then for example if we are in the windows, wouldn't we get an error message saying the process "x" is not responding? Approximately no.

Now let's assume we want to detect process "x",before starvation nor aging;we have to read it's  arrival time, burst time,process id, priority from the text file and calculate the average waiting time and show the central processing unit utilization of each cycle,for instance;

Time 1 process X arrives

Time 2 process X runs

Time  3 process B arrives

Time 4 process X finishes..........,randomly.

Hope this can give you a little bit of insight.