Process starvation test case on XINU

374 views Asked by At

I am trying to produce a test case for demonstrating starvation by xinu's default scheduling policy.: if 2 processes are ready for execution, the one with higher priority keeps running and if processes have equal priority than round robin algo.

The rough idea is to create 2 processes with different priority. This creation puts both the process in suspended state. After this, we call the resume sys call for process 1 which puts it into readylist schedule queue which then calls reschedule sys call which executes it.

Since xinu cant run in parallel, only after proc 1 is complete, the same happens for proc 2. Thus, I cant seems to figure out how to demonstrate starvation in xinu. I know it occurs, but i have trouble thinking a way around this.

1

There are 1 answers

0
Slow_5_0 On

You can try having the first process run an infinite loop. As long as its priority is higher than the 2nd process, the 2nd wouldn't get any processing time.