If the only other processes you have in memory are running, and you have
gone to sleep thus triggering your swapout then we would try and swap out the
running process, which isn't supported (because we avoid the cost of a swapper
process we pay that small cost here).
c = getproc_nextp;
do {
- if (c->p_page) { /* No point swapping someone in swap! */
+ if (c->p_page && c != udata.u_ptab) { /* No point swapping someone in swap! */
/* Find the last entry before us */
if (c->p_status == P_READY)
r = c;