How do modern Operating Systems detect process starvation?
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.